using RobotNet.Script.Shares;

namespace RobotNet.WebApp.Scripts.Models;

public class ScriptMissionModel(int index, ScriptMissionDto data)
{
    public int Index { get; } = index;
    public string Name { get; } = data.Name;
    public string Code { get; } = data.Code;
    public IEnumerable<ScriptValueModel> Parameters { get; } = [.. data.Parameters.Select(p => new ScriptValueModel(p.Name, p.Type, p.Default ?? ""))];
}
