using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OCPPPackage.Profiles
{
    public static class StandardConfiguration
    {
        #region Core Profile
        public const string AllowOfflineTxForUnknownId = "AllowOfflineTxForUnknownId";

        public const string AuthorizationCacheEnabled = "AuthorizationCacheEnabled";

        public const string AuthorizeRemoteTxRequests = "AuthorizeRemoteTxRequests";

        public const string BlinkRepeat = "BlinkRepeat";

        public const string ClockAlignedDataInterval = "ClockAlignedDataInterval";

        public const string ConnectionTimeOut = "ConnectionTimeOut";

        public const string GetConfigurationMaxKeys = "GetConfigurationMaxKeys";

        public const string HeartbeatInterval = "HeartbeatInterval";

        public const string LightIntensity = "LightIntensity";

        public const string LocalAuthorizeOffline = "LocalAuthorizeOffline";

        public const string LocalPreAuthorize = "LocalPreAuthorize";

        public const string MaxEnergyOnInvalidId = "MaxEnergyOnInvalidId";

        public const string MeterValuesAlignedData = "MeterValuesAlignedData";

        public const string MeterValuesAlignedDataMaxLength = "MeterValuesAlignedDataMaxLength";

        public const string MeterValuesSampledData = "MeterValuesSampledData";

        public const string MeterValuesSampledDataMaxLength = "MeterValuesSampledDataMaxLength";

        public const string MeterValueSampleInterval = "MeterValueSampleInterval";

        public const string MinimumStatusDuration = "MinimumStatusDuration";

        public const string NumberOfConnectors = "NumberOfConnectors";

        public const string ResetRetries = "ResetRetries";

        public const string ConnectorPhaseRotation = "ConnectorPhaseRotation";

        public const string ConnectorPhaseRotationMaxLength = "ConnectorPhaseRotationMaxLength";

        public const string StopTransactionOnEVSideDisconnect = "StopTransactionOnEVSideDisconnect";

        public const string StopTransactionOnInvalidId = "StopTransactionOnInvalidId";

        public const string StopTxnAlignedData = "StopTxnAlignedData";

        public const string StopTxnAlignedDataMaxLength = "StopTxnAlignedDataMaxLength";

        public const string StopTxnSampledData = "StopTxnSampledData";

        public const string StopTxnSampledDataMaxLength = "StopTxnSampledDataMaxLength";

        public const string SupportedFeatureProfiles = "SupportedFeatureProfiles";

        public const string SupportedFeatureProfilesMaxLength = "SupportedFeatureProfilesMaxLength";

        public const string TransactionMessageAttempts = "TransactionMessageAttempts";

        public const string TransactionMessageRetryInterval = "TransactionMessageRetryInterval";

        public const string UnlockConnectorOnEVSideDisconnect = "UnlockConnectorOnEVSideDisconnect";

        public const string WebSocketPingInterval = "WebSocketPingInterval";

        #endregion

        #region Local Auth List Management Profile
        public const string LocalAuthListEnabled = "LocalAuthListEnabled";

        public const string LocalAuthListMaxLength = "LocalAuthListMaxLength";

        public const string SendLocalListMaxLength = "SendLocalListMaxLength";

        #endregion

        #region Reservation Profile
        public const string ReserveConnectorZeroSupported = "ReserveConnectorZeroSupported";
        #endregion

        #region Smart Charging Profile
        public const string ChargeProfileMaxStackLevel = "ChargeProfileMaxStackLevel";

        public const string ChargingScheduleAllowedChargingRateUnit = "ChargingScheduleAllowedChargingRateUnit";

        public const string ChargingScheduleMaxPeriods = "ChargingScheduleMaxPeriods";

        public const string ConnectorSwitch3to1PhaseSupported = "ConnectorSwitch3to1PhaseSupported";

        public const string MaxChargingProfilesInstalled = "MaxChargingProfilesInstalled";
        #endregion


        #region Security
        public const string AdditionalRootCertificateCheck = "AdditionalRootCertificateCheck";
        public const string AuthorizationKey = "AuthorizationKey";
        public const string CertificateSignedMaxChainSize = "CertificateSignedMaxChainSize";
        public const string CertificateStoreMaxLength = "CertificateStoreMaxLength";
        public const string CpoName = "CpoName";
        public const string SecurityProfile = "SecurityProfile";
 

        #endregion



        public static readonly List<string> AllConfigs = new List<string>()
        {
           GetConfigurationMaxKeys,
           SupportedFeatureProfiles,
           NumberOfConnectors,
           SupportedFeatureProfilesMaxLength,
           StopTransactionOnEVSideDisconnect,
           StopTransactionOnInvalidId,
           StopTxnAlignedData,
           StopTxnAlignedDataMaxLength,
           StopTxnSampledData,
           StopTxnSampledDataMaxLength,   
           TransactionMessageAttempts,
           TransactionMessageRetryInterval,
           MaxEnergyOnInvalidId,
           MeterValuesAlignedData,
           MeterValuesAlignedDataMaxLength,
           MeterValuesSampledData,
           MeterValuesSampledDataMaxLength,
           WebSocketPingInterval,
           MeterValueSampleInterval,
           MinimumStatusDuration,       
           UnlockConnectorOnEVSideDisconnect,
           ResetRetries,
           AllowOfflineTxForUnknownId,
           AuthorizationCacheEnabled,
           AuthorizeRemoteTxRequests,
           BlinkRepeat,
           ClockAlignedDataInterval,
           ConnectionTimeOut,
           ConnectorPhaseRotation,
           ConnectorPhaseRotationMaxLength,       
           HeartbeatInterval,
           LightIntensity,
           LocalAuthorizeOffline,
           LocalPreAuthorize,
           LocalAuthListEnabled,
           LocalAuthListMaxLength,
           SendLocalListMaxLength,
           ReserveConnectorZeroSupported,
           ChargeProfileMaxStackLevel,
           ChargingScheduleAllowedChargingRateUnit,
           ChargingScheduleMaxPeriods,
           ConnectorSwitch3to1PhaseSupported,
           MaxChargingProfilesInstalled,



        };


        public static bool Contains(List<string> configs)
        {
            foreach (var item in configs)
            {
                if (!AllConfigs.Contains(item))
                    return false;
            }

            return true;

        }

       


     


    }
}