"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var energy_evse_cluster_element_exports = {};
__export(energy_evse_cluster_element_exports, {
  EnergyEvse: () => EnergyEvse
});
module.exports = __toCommonJS(energy_evse_cluster_element_exports);
var import_MatterDefinition = require("../MatterDefinition.js");
var import_elements = require("../../elements/index.js");
/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const EnergyEvse = (0, import_elements.ClusterElement)(
  { name: "EnergyEvse", id: 153, classification: "application" },
  (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 3 }),
  (0, import_elements.AttributeElement)(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    (0, import_elements.FieldElement)({ name: "PREF", conformance: "M", constraint: "0", title: "ChargingPreferences" }),
    (0, import_elements.FieldElement)({ name: "SOC", conformance: "P, O", constraint: "1", title: "SoCReporting" }),
    (0, import_elements.FieldElement)({ name: "PNC", conformance: "P, O", constraint: "2", title: "PlugAndCharge" }),
    (0, import_elements.FieldElement)({ name: "RFID", conformance: "O", constraint: "3", title: "Rfid" }),
    (0, import_elements.FieldElement)({ name: "V2X", conformance: "P, O", constraint: "4", title: "V2X" })
  ),
  (0, import_elements.AttributeElement)({ name: "State", id: 0, type: "StateEnum", access: "R V", conformance: "M", quality: "X" }),
  (0, import_elements.AttributeElement)({ name: "SupplyState", id: 1, type: "SupplyStateEnum", access: "R V", conformance: "M" }),
  (0, import_elements.AttributeElement)({ name: "FaultState", id: 2, type: "FaultStateEnum", access: "R V", conformance: "M" }),
  (0, import_elements.AttributeElement)({ name: "ChargingEnabledUntil", id: 3, type: "epoch-s", access: "R V", conformance: "M", quality: "X N" }),
  (0, import_elements.AttributeElement)({ name: "DischargingEnabledUntil", id: 4, type: "epoch-s", access: "R V", conformance: "V2X", quality: "X N" }),
  (0, import_elements.AttributeElement)({
    name: "CircuitCapacity",
    id: 5,
    type: "amperage-mA",
    access: "R V",
    conformance: "M",
    constraint: "min 0",
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({
    name: "MinimumChargeCurrent",
    id: 6,
    type: "amperage-mA",
    access: "R V",
    conformance: "M",
    constraint: "min 0",
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({
    name: "MaximumChargeCurrent",
    id: 7,
    type: "amperage-mA",
    access: "R V",
    conformance: "M",
    constraint: "min 0",
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({
    name: "MaximumDischargeCurrent",
    id: 8,
    type: "amperage-mA",
    access: "R V",
    conformance: "V2X",
    constraint: "min 0",
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({
    name: "UserMaximumChargeCurrent",
    id: 9,
    type: "amperage-mA",
    access: "RW VM",
    conformance: "O",
    constraint: "desc",
    default: 0,
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({
    name: "RandomizationDelayWindow",
    id: 10,
    type: "elapsed-s",
    access: "RW VM",
    conformance: "O",
    constraint: "max 86400",
    default: 600,
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({ name: "NextChargeStartTime", id: 35, type: "epoch-s", access: "R V", conformance: "PREF", quality: "X" }),
  (0, import_elements.AttributeElement)(
    { name: "NextChargeTargetTime", id: 36, type: "epoch-s", access: "R V", conformance: "PREF", quality: "X" }
  ),
  (0, import_elements.AttributeElement)({
    name: "NextChargeRequiredEnergy",
    id: 37,
    type: "energy-mWh",
    access: "R V",
    conformance: "PREF",
    constraint: "min 0",
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({ name: "NextChargeTargetSoC", id: 38, type: "percent", access: "R V", conformance: "PREF", quality: "X" }),
  (0, import_elements.AttributeElement)({
    name: "ApproximateEvEfficiency",
    id: 39,
    type: "uint16",
    access: "RW VM",
    conformance: "[PREF]",
    constraint: "desc",
    default: null,
    quality: "X N"
  }),
  (0, import_elements.AttributeElement)({ name: "StateOfCharge", id: 48, type: "percent", access: "R V", conformance: "SOC", quality: "X" }),
  (0, import_elements.AttributeElement)({
    name: "BatteryCapacity",
    id: 49,
    type: "energy-mWh",
    access: "R V",
    conformance: "SOC",
    constraint: "min 0",
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({
    name: "VehicleId",
    id: 50,
    type: "string",
    access: "R V",
    conformance: "PNC",
    constraint: "max 32",
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({ name: "SessionId", id: 64, type: "uint32", access: "R V", conformance: "M", quality: "X N" }),
  (0, import_elements.AttributeElement)({ name: "SessionDuration", id: 65, type: "elapsed-s", access: "R V", conformance: "M", quality: "X N Q" }),
  (0, import_elements.AttributeElement)({
    name: "SessionEnergyCharged",
    id: 66,
    type: "energy-mWh",
    access: "R V",
    conformance: "M",
    constraint: "min 0",
    quality: "X N Q"
  }),
  (0, import_elements.AttributeElement)({
    name: "SessionEnergyDischarged",
    id: 67,
    type: "energy-mWh",
    access: "R V",
    conformance: "V2X",
    constraint: "min 0",
    quality: "X N Q"
  }),
  (0, import_elements.EventElement)(
    { name: "EvConnected", id: 0, access: "V", conformance: "M", priority: "info" },
    (0, import_elements.FieldElement)({ name: "SessionId", id: 0, type: "uint32", conformance: "M" })
  ),
  (0, import_elements.EventElement)(
    { name: "EvNotDetected", id: 1, access: "V", conformance: "M", priority: "info" },
    (0, import_elements.FieldElement)({ name: "SessionId", id: 0, type: "uint32", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "State", id: 1, type: "StateEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "SessionDuration", id: 2, type: "elapsed-s", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "SessionEnergyCharged", id: 3, type: "energy-mWh", conformance: "M", constraint: "min 0" }),
    (0, import_elements.FieldElement)({ name: "SessionEnergyDischarged", id: 4, type: "energy-mWh", conformance: "V2X", constraint: "min 0" })
  ),
  (0, import_elements.EventElement)(
    { name: "EnergyTransferStarted", id: 2, access: "V", conformance: "M", priority: "info" },
    (0, import_elements.FieldElement)({ name: "SessionId", id: 0, type: "uint32", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "State", id: 1, type: "StateEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "MaximumCurrent", id: 2, type: "amperage-mA", conformance: "M", constraint: "min 0" }),
    (0, import_elements.FieldElement)({ name: "MaximumDischargeCurrent", id: 3, type: "amperage-mA", conformance: "V2X", constraint: "min 0" })
  ),
  (0, import_elements.EventElement)(
    { name: "EnergyTransferStopped", id: 3, access: "V", conformance: "M", priority: "info" },
    (0, import_elements.FieldElement)({ name: "SessionId", id: 0, type: "uint32", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "State", id: 1, type: "StateEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Reason", id: 2, type: "EnergyTransferStoppedReasonEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "EnergyTransferred", id: 4, type: "energy-mWh", conformance: "M", constraint: "min 0" }),
    (0, import_elements.FieldElement)({ name: "EnergyDischarged", id: 5, type: "energy-mWh", conformance: "V2X", constraint: "min 0" })
  ),
  (0, import_elements.EventElement)(
    { name: "Fault", id: 4, access: "V", conformance: "M", priority: "critical" },
    (0, import_elements.FieldElement)({ name: "SessionId", id: 0, type: "uint32", conformance: "M", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "State", id: 1, type: "StateEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "FaultStatePreviousState", id: 2, type: "FaultStateEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "FaultStateCurrentState", id: 4, type: "FaultStateEnum", conformance: "M" })
  ),
  (0, import_elements.EventElement)(
    { name: "Rfid", id: 5, access: "V", conformance: "[RFID]", priority: "info" },
    (0, import_elements.FieldElement)({ name: "Uid", id: 0, type: "octstr", conformance: "M", constraint: "max 10" })
  ),
  (0, import_elements.CommandElement)({ name: "Disable", id: 1, access: "O T", conformance: "M", direction: "request", response: "status" }),
  (0, import_elements.CommandElement)(
    { name: "EnableCharging", id: 2, access: "O T", conformance: "M", direction: "request", response: "status" },
    (0, import_elements.FieldElement)({ name: "ChargingEnabledUntil", id: 0, type: "epoch-s", conformance: "M", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "MinimumChargeCurrent", id: 1, type: "amperage-mA", conformance: "M", constraint: "min 0" }),
    (0, import_elements.FieldElement)({ name: "MaximumChargeCurrent", id: 2, type: "amperage-mA", conformance: "M", constraint: "min 0" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "EnableDischarging",
      id: 3,
      access: "O T",
      conformance: "V2X",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "DischargingEnabledUntil", id: 0, type: "epoch-s", conformance: "M", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "MaximumDischargeCurrent", id: 1, type: "amperage-mA", conformance: "M", constraint: "min 0" })
  ),
  (0, import_elements.CommandElement)({ name: "StartDiagnostics", id: 4, access: "O T", conformance: "O", direction: "request", response: "status" }),
  (0, import_elements.CommandElement)(
    { name: "SetTargets", id: 5, access: "O T", conformance: "PREF", direction: "request", response: "status" },
    (0, import_elements.FieldElement)(
      { name: "ChargingTargetSchedules", id: 0, type: "list", conformance: "M", constraint: "max 7" },
      (0, import_elements.FieldElement)({ name: "entry", type: "ChargingTargetScheduleStruct" })
    )
  ),
  (0, import_elements.CommandElement)({
    name: "GetTargets",
    id: 6,
    access: "O T",
    conformance: "PREF",
    direction: "request",
    response: "GetTargetsResponse"
  }),
  (0, import_elements.CommandElement)(
    { name: "ClearTargets", id: 7, access: "O T", conformance: "PREF", direction: "request", response: "status" }
  ),
  (0, import_elements.CommandElement)(
    { name: "GetTargetsResponse", id: 0, conformance: "PREF", direction: "response" },
    (0, import_elements.FieldElement)(
      { name: "ChargingTargetSchedules", id: 0, type: "list", conformance: "M", constraint: "max 7" },
      (0, import_elements.FieldElement)({ name: "entry", type: "ChargingTargetScheduleStruct" })
    )
  ),
  (0, import_elements.DatatypeElement)(
    { name: "TargetDayOfWeekBitmap", type: "map8" },
    (0, import_elements.FieldElement)({ name: "Sunday", constraint: "0" }),
    (0, import_elements.FieldElement)({ name: "Monday", constraint: "1" }),
    (0, import_elements.FieldElement)({ name: "Tuesday", constraint: "2" }),
    (0, import_elements.FieldElement)({ name: "Wednesday", constraint: "3" }),
    (0, import_elements.FieldElement)({ name: "Thursday", constraint: "4" }),
    (0, import_elements.FieldElement)({ name: "Friday", constraint: "5" }),
    (0, import_elements.FieldElement)({ name: "Saturday", constraint: "6" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "StateEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "NotPluggedIn", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "PluggedInNoDemand", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "PluggedInDemand", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "PluggedInCharging", id: 3, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "PluggedInDischarging", id: 4, conformance: "V2X" }),
    (0, import_elements.FieldElement)({ name: "SessionEnding", id: 5, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Fault", id: 6, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "SupplyStateEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Disabled", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ChargingEnabled", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "DischargingEnabled", id: 2, conformance: "[V2X]" }),
    (0, import_elements.FieldElement)({ name: "DisabledError", id: 3, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "DisabledDiagnostics", id: 4, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Enabled", id: 5, conformance: "[V2X]" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "FaultStateEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "NoError", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "MeterFailure", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "OverVoltage", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "UnderVoltage", id: 3, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "OverCurrent", id: 4, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ContactWetFailure", id: 5, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ContactDryFailure", id: 6, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "GroundFault", id: 7, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "PowerLoss", id: 8, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "PowerQuality", id: 9, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "PilotShortCircuit", id: 10, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "EmergencyStop", id: 11, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "EvDisconnected", id: 12, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "WrongPowerSupply", id: 13, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "LiveNeutralSwap", id: 14, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "OverTemperature", id: 15, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Other", id: 255, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "EnergyTransferStoppedReasonEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "EvStopped", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "EvseStopped", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Other", id: 2, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "ChargingTargetStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "TargetTimeMinutesPastMidnight", id: 0, type: "uint16", conformance: "M", constraint: "max 1439" }),
    (0, import_elements.FieldElement)({ name: "TargetSoC", id: 1, type: "percent", conformance: "SOC, O.a+", default: 0 }),
    (0, import_elements.FieldElement)({
      name: "AddedEnergy",
      id: 2,
      type: "energy-mWh",
      conformance: "[SOC], O.a+",
      constraint: "min 0",
      default: 0
    })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "ChargingTargetScheduleStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "DayOfWeekForSequence", id: 0, type: "TargetDayOfWeekBitmap", conformance: "M" }),
    (0, import_elements.FieldElement)(
      { name: "ChargingTargets", id: 1, type: "list", conformance: "M", constraint: "max 10" },
      (0, import_elements.FieldElement)({ name: "entry", type: "ChargingTargetStruct" })
    )
  )
);
import_MatterDefinition.MatterDefinition.children.push(EnergyEvse);
//# sourceMappingURL=energy-evse-cluster.element.js.map
