using EVCB_OCPP.Packet.Features.SmartCharging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EVCB_OCPP.Packet.Features
{
    

    public class SmartChargingProfile : Profile
    {
        public SmartChargingProfile()
        {
            Name = "SmartCharging";
            //加入支援的Features
            features.Add(new ClearChargingProfileFeature());
            features.Add(new GetCompositeScheduleFeature());
            features.Add(new SetChargingProfileFeature());


            actions.Add(Actions.ClearChargingProfile.ToString());
            actions.Add(Actions.GetCompositeSchedule.ToString());
            actions.Add(Actions.SetChargingProfile.ToString());



        }

        public string GetActionFromConfirmation(Type seekType)
        {
            return features.Where(x => x.GetConfirmationType() == seekType).FirstOrDefault().GetAction();
        }

        public string GetActionFromRequest(Type seekType)
        {
            return GetFeaturebyType(seekType).GetAction();
        }




    }
}
