using System.Collections.Generic;
using SimpleLite.RCS.CarTypes;
using StandardScene.Signal.Model;
using StandardScene.Signal.Plc;

namespace StandardScene.Signal.Logic
{
    /// <summary>对齐反编译 StarSignManage：配置点停稳则停充并放行。</summary>
    public static class ReleasePointHandler
    {
        public static void OnStopped(Car car, int sit, IReadOnlyDictionary<int, ReleasePointModel> points)
        {
            if (points == null || !points.TryGetValue(sit, out var p) || p == null || !p.IsUse)
                return;
            SignalCarAdapter.StopCharge(car);
            SignalCarAdapter.Start(car);
        }
    }
}
