using RobotNet.MapShares.Enums;

namespace RobotNet.MapShares.Dtos;

public class EdgeDto
{
    public Guid Id { get; set; }
    public Guid MapId { get; set; }
    public Guid StartNodeId { get; set; }
    public Guid EndNodeId { get; set; }

    public double ControlPoint1X { get; set; }
    public double ControlPoint1Y { get; set; }
    public double ControlPoint2X { get; set; }
    public double ControlPoint2Y { get; set; }
    public TrajectoryDegree TrajectoryDegree { get; set; }

    public double MaxHeight { get; set; }
    public double MinHeight { get; set; }
    public DirectionAllowed DirectionAllowed { get; set; }
    public bool RotationAllowed { get; set; }
    public double MaxRotationSpeed { get; set; }
    public double MaxSpeed { get; set; }
    public double AllowedDeviationXy { get; set; }
    public double AllowedDeviationTheta { get; set; }

    public string Actions { get; set; } = "";

    public NodeDto? StartNode { get; set; }
    public NodeDto? EndNode { get; set; }
}

public class EdgeCreateModel
{
    public Guid MapId { get; set; }
    public double X1 { get; set; }
    public double Y1 { get; set; }
    public double X2 { get; set; }
    public double Y2 { get; set; }
    public TrajectoryDegree TrajectoryDegree { get; set; }
    public double ControlPoint1X { get; set; }
    public double ControlPoint1Y { get; set; }
    public double ControlPoint2X { get; set; }
    public double ControlPoint2Y { get; set; }
}

public class EdgeCreateDto
{
    public IEnumerable<EdgeDto> EdgesDto { get; set; } = [];
    public IEnumerable<Guid> RemoveEdge { get; set; } = [];
}

public class EdgeUpdateModel
{
    public Guid Id { get; set; }
    public double MaxSpeed { get; set; }
    public double MaxHeight { get; set; }
    public double MinHeight { get; set; }
    public bool RotationAllowed { get; set; }
    public double MaxRotationSpeed { get; set; }
    public double ControlPoint1X { get; set; }
    public double ControlPoint1Y { get; set; }
    public double ControlPoint2X { get; set; }
    public double ControlPoint2Y { get; set; }
    public DirectionAllowed DirectionAllowed { get; set; }
    public Guid[] Actions { get; set; } = [];
    public double AllowedDeviationXy { get; set; }
    public double AllowedDeviationTheta { get; set; }
}

public class EdgeMapCopyModel : EdgeCreateModel
{
    public Guid StartNodeId { get; set; }
    public Guid EndNodeId { get; set; }
    public double MaxSpeed { get; set; }
    public double MaxHeight { get; set; }
    public double MinHeight { get; set; }
    public bool RotationAllowed { get; set; }
    public double MaxRotationSpeed { get; set; }
    public DirectionAllowed DirectionAllowed { get; set; }
    public string Actions { get; set; } = "";
    public double AllowedDeviationXy { get; set; }
    public double AllowedDeviationTheta { get; set; }
}

public class EdgeCaculatorModel : EdgeCreateModel { }