using RobotNet.MapShares.Enums;

namespace RobotNet.MapShares.Dtos;

#nullable disable

public class MapInfoExportDto
{
    public double OriginX { get; set; }
    public double OriginY { get; set; }
    public double Resolution { get; set; }
    public double ViewX { get; set; }
    public double ViewY { get; set; }
    public double ViewWidth { get; set; }
    public double ViewHeight { get; set; }
    public string VDA5050 { get; set; }
}

public class ElementModelExportDto : ElementModelDto
{
    public byte[] ImageOpenData { get; set; } = [];
    public byte[] ImageCloseData { get; set; } = [];
}

public class MapDataExportDto
{
    public long NodeCount { get; set; }
    public NodeDto[] Nodes { get; set; } = [];
    public EdgeDto[] Edges { get; set; } = [];
    public ZoneDto[] Zones { get; set; } = [];
    public ActionDto[] Actions { get; set; } = [];
    public ElementModelExportDto[] ElementModels { get; set; } = [];
    public ElementDto[] Elements { get; set; } = [];
    public byte[] ImageData { get; set; } = [];
}

public class MapSettingExportDto
{
    public bool NodeNameAutoGenerate { get; set; }
    public string NodeNameTemplate { get; set; }
    public double NodeAllowedDeviationXy { get; set; }
    public double NodeAllowedDeviationTheta { get; set; }

    public double EdgeMinLength { get; set; }
    public double EdgeStraightMaxSpeed { get; set; }
    public double EdgeCurveMaxSpeed { get; set; }
    public double EdgeMaxHeight { get; set; }
    public double EdgeMinHeight { get; set; }
    public double EdgeMaxRotationSpeed { get; set; }
    public DirectionAllowed EdgeDirectionAllowed { get; set; }
    public bool EdgeRotationAllowed { get; set; }
    public double EdgeAllowedDeviationXy { get; set; }
    public double EdgeAllowedDeviationTheta { get; set; }

    public double ZoneMinSquare { get; set; }
}

public class MapExportDto
{
    public Guid Id { get; set; }
    public string Name { get; set; }
    public string Description { get; set; } = "";
    public MapInfoExportDto Info { get; set; } = new();
    public MapDataExportDto Data { get; set; } = new();
    public MapSettingExportDto Setting { get; set; } = new();
}
