using Newtonsoft.Json;

namespace Model;

public class FlightPlanEditor
{
    [JsonProperty("飞机参数")]
    public AircraftParameter aircraftparameter;
    public CityWeather cityweather;
    
    [JsonProperty("基地参数")]
    public Base originbase;
    [JsonProperty("巡护航线参数")]
    public AirRoute[] airroute = new AirRoute[1];
  
    [JsonProperty("任务点")]
    public MissionPoint missionpoint = new MissionPoint();
    [JsonProperty("火点")]
    public FirePoint[] firepoint = new FirePoint[1];
    [JsonProperty("搜救目标初始点")]
    public TargetPoint[] targetpoint = new TargetPoint[1];

    public static FlightPlanEditor Create(AircraftParameter aircraftparameter, CityWeather cityweather, Base originbase, AirRoute[] airroute, MissionPoint missionpoint, FirePoint[] firepoint)
    {
        FlightPlanEditor flightPlanEditor = new FlightPlanEditor();
        flightPlanEditor.aircraftparameter = aircraftparameter;
        flightPlanEditor.cityweather = cityweather;
        flightPlanEditor.originbase = originbase;
        flightPlanEditor.airroute = airroute;
        flightPlanEditor.missionpoint = missionpoint;
        flightPlanEditor.firepoint = firepoint;
        return flightPlanEditor;
    }
    public static FlightPlanEditor Create(AircraftParameter aircraftparameter, CityWeather cityweather, Base originbase,  MissionPoint missionpoint, FirePoint[] firepoint)
    {
        FlightPlanEditor flightPlanEditor = new FlightPlanEditor();
        flightPlanEditor.aircraftparameter = aircraftparameter;
        flightPlanEditor.cityweather = cityweather;
        flightPlanEditor.originbase = originbase;
        flightPlanEditor.missionpoint = missionpoint;
        flightPlanEditor.firepoint = firepoint;
        return flightPlanEditor;
    }
    
    public static FlightPlanEditor Create(AircraftParameter aircraftparameter, CityWeather cityweather, Base originbase,  TargetPoint[] targetPoints)
    {
        FlightPlanEditor flightPlanEditor = new FlightPlanEditor();
        flightPlanEditor.aircraftparameter = aircraftparameter;
        flightPlanEditor.cityweather = cityweather;
        flightPlanEditor.originbase = originbase;
        flightPlanEditor.targetpoint = targetPoints;
        return flightPlanEditor;
    }
}