using System.Collections.Generic;
using CounterDrone.Core.Models;

namespace CounterDrone.Core.Services
{
    /// <summary>想定管理服务</summary>
    public interface IScenarioService
    {
        SimTask CreateTask(string name, string taskNumber);
        void DeleteTask(string id);
        PagedResult<SimTask> SearchTasks(string keyword, string? dateFrom, string? dateTo, int page, int pageSize);
        TaskFullConfig? GetTaskDetail(string id);

        void SaveScene(string taskId, CombatScene scene);
        void SaveControlZones(string taskId, List<ControlZone> zones);
        void SaveTarget(string taskId, TargetConfig target);
        void SaveDeployment(string taskId, List<EquipmentDeployment> equips);

        /// <summary>添加单个探测设备（独立于 SaveDeployment，不覆盖火力单元）</summary>
        void AddDetection(string taskId, EquipmentDeployment detection);
        /// <summary>删除探测设备</summary>
        void DeleteDetection(string detectionId);
        /// <summary>获取任务的所有探测设备（EquipmentRole.Detection）</summary>
        List<EquipmentDeployment> GetDetections(string taskId);

        void SaveCloudDispersal(string taskId, CloudDispersal cloud);
        void SaveRoute(string taskId, string waveId, RoutePlan route, List<Waypoint> waypoints);
        void UpdateStep(string taskId, int step);
    }
}
