import{r as e,o as a,c as n,a as l,w as t,e as r,F as o,d as i,v as s,t as u,f as c,m as d,A as p,g as v}from "./index.js";let R={id:"ConfigurationIndex",class:"page-container"},_={class:"panel-group span-12"},A={class:"panel-container"},D=l("h3",{class:"panel-title"},"Value Property",-1),F={class:"panel-content"},W=l("h3",{class:"panel-title"},"Boolean Property",-1),G={class:"panel-group span-8"},O=l("h3",{class:"panel-title"},"Change Username",-1),Q=l("h3",{class:"panel-title"},"Change Password",-1),$=l("h3",{class:"panel-title"},"Setting Property",-1),QQ=l("h3",{class:"panel-title"},"Set Date/Time",-1),Y={__name:"configuration",setup(h){let C=["ApWifiPassword","BlinkRepeat","ChargePointHighTempThreshold","ChargePointId","ChargePointMaxCurrentLimit","ChargePointOverVoltageThreshold","ChargePointUnderVoltageThreshold","ChargePointWeakSignalThreshold","ChargeProfileMaxStackLevel","ChargingScheduleMaxPeriods","ClockAlignedDataInterval","CompositePlannedInterval","ConnectionTimeOut","ConnectorDefaultCurrentLimit","ConnectorDefaultMinCurrent","ConnectorId1ChargeLimitEnergy","ConnectorId1ChargeLimitTime","ConnectorId1QrcodeSuffix","connectorId1UserCurrentLimit","ConnectorId2ChargeLimitEnergy","ConnectorId2ChargeLimitTime","ConnectorId2QrcodeSuffix","connectorId2UserCurrentLimit","CpuHighTempThreshold","CsmsWebsocketUrl","CurrentSensorCT1Type","CurrentSensorCT2Type","CurrentSensorCT3Type","DebugModeCsmsWsUrl","EcoPlusModeMinGreenLevel","EcsRoutinePcbaCode","FreeVendingModeIdTag","GridLimitFuseCurrent","GroupLoadBalanceFollowerNumber","GroupLoadBalanceGridFuseCurrent","GroupLoadBalanceIdentifyId","HeartbeatInterval","HigherLevelMeasuringDeviceCurrent","HmiCapTouchType","HmiGuideContext","HmiLogoDispalyHoldTime","HmiTouchDetectedThreshold","HmiTouchReleasedThreshold","HomeSolarPvMainChargerAllocateLevel","LightIntensity","LocationTimeZone","ManageWebPassword","ManageWebUsername","MaxChargingProfilesInstalled","MaxEnergyOnInvalidId","MeterPollSyncWaitMilliseconds","MeterValuesAlignedData","MeterValueSampleInterval","MeterValuesSampledData","MicroGenerationChargingMode","MinimumStatusDuration","ModbusTcpWhiteListIp","model","NetworkAddress","NetworkConfiguredIface","NetworkGateway","NetworkIfaceName","NetworkNetmask","NetworkWifiPassword","NetworkWifiSsid","NtcBCoefficient","NtcNominalResistance","NtpServerPort","NtpServerUrl","NumberOfConnectors","OcppCustomConfig","OfflineRfidCardSecureKey","OpenCardModeRechargeAmount","QrcodeContext","RandomisedDelaysRanges","RemoteClosedReconnectingWait","ResetRetries","RfidReaderWorkingMode","serialNumber","SimCardAPN","SimCardPassword","SimCardUsername","StationColumnLightBarNumber","StopTxnAlignedData","StopTxnSampledData","SupperRfidCardIdTag","SuspendedEvStatusTimeout","SystemLoggerFileDays","TimePeriodEnergyPriceList","TransactionMessageAttempts","TransactionMessageRetryInterval","UkStandardPenFuseCurrent","UserCurrentLimitList","vendorId","vendorName","VendorTelephone","VendorWebsite","WebSocketPingInterval","WeekdaysPeakHoursList","WiFiAcceptPointNamePrefix","WsHttpAuthIdentity","WsHttpAuthorization",],m=e({key:C[0],val:""});function g(){let e=m.value.key,a=m.value.val;if(!e)return d.warning("The name is empty");let n={};(n[e]=a),p.Common[a?"keySet":"keyGet"](n).then((e)=>{console.log("handleValueProperty res:",e),d.success("Success"),a||(m.value.val=e.keys[0].value)}).catch((e)=>{console.log("handleValueProperty err:",e),d.error("Failure")})}
let y=["AcLineDetectCheckEnable","AcPenForceCheckEnable","AllowOfflineTxForUnknownId","ApWifiEnable","AuthorizationCacheEnabled","AuthorizeRemoteTxRequests","BootstarpModeRecordSupperRfidCard","CellularContinueLossResetEnable","ChargeCurrentPriorityEnable","ChargePointSelfCheckEnable","CompositeScheduleDebugEnable","ConnectorId1AlwaysLocked","ConnectorId2AlwaysLocked","ConnectorLockerSupported","ConnectorSaeJ1772Enable","CrashChargingRecoveryEnable","DoubleLineConnectorLightEnable","EmergencyUnlockConnectorEnable","FullChargedSelfStopEnable","GroupLoadBalanceCcPriorityEnable","GroupLoadBalanceLeaderRoleEnable","HighLevelCurrentCtEnable","HomeSolarPvMainChargerEnable","IEC61851CarWakeupEnable","LocalAuthListEnabled","LocalAuthorizeOffline","LocalEnergyCostCalculateEnable","LocalPreAuthorize","LockerErrorClearConnectorDisconnect","ManageWebAuthenticate","MidPowerMeterEnable","ModbusTcpEnable","ModeTypeSwitchCodeEnable","NfcRfidReaderEnable","OffPeakOptimumChargingEnable","OpenDoorTamperProtectionEnable","PowerMeterSinglePhaseEnv","RandomisedDelaysEnable","RcmuErrorClearConnectorDisconnect","ReserveConnectorZeroSupported","RfidReaderUidUpperHex","sampledValuePowerPhaseAbsent","SmartChargeProfileForConnector","StationColumnLightBarEnable","StationFreeVendingModeEnable","StopTransactionOnEVSideDisconnect","StopTransactionOnInvalidId","SupperRfidCardStopPairStartEnable","TransactionOfflineCacheEnable","UkStandardPenFunctionEnable","UnlockConnectorOnEVSideDisconnect","UserCurrentLimitChangeAlwaysEnable","VlanOnWifiStaModeEnable","WebModeRecordSupperRfidCard","WifiConnectRebootSystemEnable",],S=["--------","true","false"],b=e({key:y[0],val:S[0]});function k(){let e=b.value.key,a=b.value.val;if(!e)return d.warning("The name is empty");let n="keySet";"--------"===a&&((n="keyGet"),(a=""));let l={};(l[e]=a),p.Common[n](l).then((e)=>{console.log("handleBooleanProperty res:",e),d.success("Success"),"keyGet"===n&&(b.value.val=e.keys[0].value)}).catch((e)=>{console.log("handleBooleanProperty err:",e),d.error("Failure")})}
function P(e){switch((console.log("handleKeyChange key:",e),e)){case "valueProperty":m.value.val="";break;case "booleanProperty":b.value.val=S[0]}}
let f=e({val1:"",val2:""});function w(){let e=f.value.val1,a=f.value.val2;return e?a?e!==a?d.warning("Please check the inputs"):void p.Common.keySet({ManageWebUsername:e}).then((e)=>{console.log("handleChangeUsername res:",e),d.success("Success")}).catch((e)=>{console.log("handleChangeUsername err:",e),d.error("Failure")}):d.warning("Please repeat new username"):d.warning("Please input new username")}
let T=e({key:"SyncSystemUnixTime",val:""});function E(){T.value.val||(T.value.val=Date.now().toString().substr(0,10));let e=T.value.key,a=T.value.val,n="Value must be in unix timestamp format (10 numbers). ";if(/^[0-9]{9}$/.test(a))return d.warning(n);if(1687060800>parseInt(a,10))return d.warning(n+"Value must be greater than 1687060800");if(parseInt(a,10)>2e9)return d.warning(n+"Only numbers ess than 2000000000 are allowed");let l={};(l[e]=a),p.Common[a?"keySet":"keyGet"](l).then((e)=>{console.log("handleValueProperty res:",e),d.success("Time successfully saved"),a||(T.value.val=e.keys[0].value)}).catch((e)=>{console.log("handleValueProperty err:",e),d.error("Failure")})}
let L=e({val1:"",val2:""});function I(){let e=L.value.val1,a=L.value.val2;return e?a?e!==a?d.warning("Please check the inputs"):void p.Common.keySet({ManageWebPassword:e}).then((e)=>{console.log("handleChangePassword res:",e),d.success("Success")}).catch((e)=>{console.log("handleChangePassword err:",e),d.error("Failure")}):d.warning("Please repeat new password"):d.warning("Please input new password")}
let M=e({key:"",val:""});function U(){let e=M.value.key,a=M.value.val;if(!e)return d.warning("The name is empty");let n={};(n[e]=a),p.Common[a?"keySet":"keyGet"](n).then((e)=>{console.log("handleValueProperty res:",e),d.success("Success"),a||(M.value.val=e.keys[0].value)}).catch((e)=>{console.log("handleValueProperty err:",e),d.error("Failure")})}
return(e,d)=>{let p=v("a-input-password");return(a(),n("div",R,[l("div",_,[l("div",A,[D,l("div",F,[t(l("select",{"onUpdate:modelValue":d[0]||(d[0]=(e)=>(m.value.key=e)),placeholder:"key",onChange:d[1]||(d[1]=(e)=>P("valueProperty"))},[(a(),n(o,null,i(C,(e,a)=>l("option",{key:a},u(e),1)),64)),],544),[[r,m.value.key]]),t(l("input",{"onUpdate:modelValue":d[2]||(d[2]=(e)=>(m.value.val=e)),placeholder:"value"},null,512),[[s,m.value.val]]),l("button",{type:"button",class:"primary",onClick:g},u(m.value.val?"Set":"Get"),1),]),]),l("div",A,[W,l("div",F,[t(l("select",{"onUpdate:modelValue":d[3]||(d[3]=(e)=>(b.value.key=e)),placeholder:"key",onChange:d[4]||(d[4]=(e)=>P("booleanProperty"))},[(a(),n(o,null,i(y,(e,a)=>l("option",{key:a},u(e),1)),64)),],544),[[r,b.value.key]]),t(l("select",{"onUpdate:modelValue":d[5]||(d[5]=(e)=>(b.value.val=e)),placeholder:"value"},[(a(),n(o,null,i(S,(e,a)=>l("option",{key:a},u(e),1)),64)),],512),[[r,b.value.val]]),l("button",{type:"button",class:"primary",onClick:k},u("--------"===b.value.val?"Get":"Set"),1),]),]),]),l("div",G,[l("div",A,[O,l("div",F,[t(l("input",{"onUpdate:modelValue":d[6]||(d[6]=(e)=>(f.value.val1=e)),placeholder:"Input new username"},null,512),[[s,f.value.val1]]),t(l("input",{"onUpdate:modelValue":d[7]||(d[7]=(e)=>(f.value.val2=e)),placeholder:"Repeat new username"},null,512),[[s,f.value.val2]]),l("button",{type:"button",class:"primary",onClick:w},"Change"),]),]),l("div",A,[Q,l("div",F,[c(p,{value:L.value.val1,"onUpdate:value":d[8]||(d[8]=(e)=>(L.value.val1=e)),placeholder:"Input new password"},null,8,["value"]),c(p,{value:L.value.val2,"onUpdate:value":d[9]||(d[9]=(e)=>(L.value.val2=e)),placeholder:"Repeat new password"},null,8,["value"]),l("button",{type:"button",class:"primary",onClick:I},"Change"),]),]),l("div",A,[$,l("div",F,[t(l("input",{"onUpdate:modelValue":d[10]||(d[10]=(e)=>(M.value.key=e)),placeholder:"name"},null,512),[[s,M.value.key]]),t(l("input",{"onUpdate:modelValue":d[11]||(d[11]=(e)=>(M.value.val=e)),placeholder:"value"},null,512),[[s,M.value.val]]),l("button",{type:"button",class:"primary",onClick:U},u(M.value.val?"Set":"Get"),1),]),]),l("div",A,[QQ,l("div",F,[t(l("input",{"onUpdate:modelValue":d[12]||(d[12]=(e)=>(T.value.val=e)),placeholder:"Input timestamp (e.g. 1687060800)"},null,512),[[s,T.value.val]]),l("button",{type:"button",class:"primary",onClick:E},u(T.value.val?"Set specified time":"Set time from Computer"),1),]),]),]),]))}},};export{Y as default}