using Flyshot.Core.Domain;
using Flyshot.Core.Planning;
using Flyshot.Core.Triggering;

namespace Flyshot.ControllerClientCompat;

/// <summary>
/// 表示兼容层执行轨迹前生成的完整规划结果包。
/// </summary>
public sealed class PlannedExecutionBundle
{
    /// <summary>
    /// 初始化一份执行规划结果包。
    /// </summary>
    /// <param name="plannedTrajectory">规划后的轨迹。</param>
    /// <param name="shotTimeline">飞拍触发时间轴。</param>
    /// <param name="result">对运行时和监控层暴露的规划结果。</param>
    public PlannedExecutionBundle(PlannedTrajectory plannedTrajectory, ShotTimeline shotTimeline, TrajectoryResult result)
    {
        PlannedTrajectory = plannedTrajectory ?? throw new ArgumentNullException(nameof(plannedTrajectory));
        ShotTimeline = shotTimeline ?? throw new ArgumentNullException(nameof(shotTimeline));
        Result = result ?? throw new ArgumentNullException(nameof(result));
    }

    /// <summary>
    /// 获取规划后的轨迹。
    /// </summary>
    public PlannedTrajectory PlannedTrajectory { get; }

    /// <summary>
    /// 获取飞拍触发时间轴。
    /// </summary>
    public ShotTimeline ShotTimeline { get; }

    /// <summary>
    /// 获取运行时可消费的规划结果。
    /// </summary>
    public TrajectoryResult Result { get; }
}
