/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MatterDefinition } from "../MatterDefinition.js";
import {
  ClusterElement as Cluster,
  AttributeElement as Attribute,
  FieldElement as Field,
  EventElement as Event,
  DatatypeElement as Datatype
} from "../../elements/index.js";
const PowerSource = Cluster(
  { name: "PowerSource", id: 47, classification: "node" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 3 }),
  Attribute(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    Field({ name: "WIRED", conformance: "O.a", constraint: "0", title: "Wired" }),
    Field({ name: "BAT", conformance: "O.a", constraint: "1", title: "Battery" }),
    Field({ name: "RECHG", conformance: "[BAT]", constraint: "2", title: "Rechargeable" }),
    Field({ name: "REPLC", conformance: "[BAT]", constraint: "3", title: "Replaceable" })
  ),
  Attribute(
    { name: "Status", id: 0, type: "PowerSourceStatusEnum", access: "R V", conformance: "M", constraint: "desc" }
  ),
  Attribute({ name: "Order", id: 1, type: "uint8", access: "R V", conformance: "M", quality: "N" }),
  Attribute({
    name: "Description",
    id: 2,
    type: "string",
    access: "R V",
    conformance: "M",
    constraint: "max 60",
    quality: "F"
  }),
  Attribute({
    name: "WiredAssessedInputVoltage",
    id: 3,
    type: "uint32",
    access: "R V",
    conformance: "[WIRED]",
    quality: "X C"
  }),
  Attribute({
    name: "WiredAssessedInputFrequency",
    id: 4,
    type: "uint16",
    access: "R V",
    conformance: "[WIRED]",
    quality: "X C"
  }),
  Attribute({
    name: "WiredCurrentType",
    id: 5,
    type: "WiredCurrentTypeEnum",
    access: "R V",
    conformance: "WIRED",
    constraint: "desc",
    quality: "F"
  }),
  Attribute({ name: "WiredAssessedCurrent", id: 6, type: "uint32", access: "R V", conformance: "[WIRED]", quality: "X C" }),
  Attribute(
    { name: "WiredNominalVoltage", id: 7, type: "uint32", access: "R V", conformance: "[WIRED]", quality: "F" }
  ),
  Attribute(
    { name: "WiredMaximumCurrent", id: 8, type: "uint32", access: "R V", conformance: "[WIRED]", quality: "F" }
  ),
  Attribute({ name: "WiredPresent", id: 9, type: "bool", access: "R V", conformance: "[WIRED]" }),
  Attribute(
    {
      name: "ActiveWiredFaults",
      id: 10,
      type: "list",
      access: "R V",
      conformance: "[WIRED]",
      constraint: "max 8"
    },
    Field({ name: "entry", type: "WiredFaultEnum" })
  ),
  Attribute({ name: "BatVoltage", id: 11, type: "uint32", access: "R V", conformance: "[BAT]", quality: "X C" }),
  Attribute({
    name: "BatPercentRemaining",
    id: 12,
    type: "uint8",
    access: "R V",
    conformance: "[BAT]",
    constraint: "max 200",
    quality: "X Q"
  }),
  Attribute({ name: "BatTimeRemaining", id: 13, type: "uint32", access: "R V", conformance: "[BAT]", quality: "X Q" }),
  Attribute({
    name: "BatChargeLevel",
    id: 14,
    type: "BatChargeLevelEnum",
    access: "R V",
    conformance: "BAT",
    constraint: "desc"
  }),
  Attribute({ name: "BatReplacementNeeded", id: 15, type: "bool", access: "R V", conformance: "BAT" }),
  Attribute({
    name: "BatReplaceability",
    id: 16,
    type: "BatReplaceabilityEnum",
    access: "R V",
    conformance: "BAT",
    quality: "F"
  }),
  Attribute({ name: "BatPresent", id: 17, type: "bool", access: "R V", conformance: "[BAT]" }),
  Attribute(
    { name: "ActiveBatFaults", id: 18, type: "list", access: "R V", conformance: "[BAT]", constraint: "max 8" },
    Field({ name: "entry", type: "BatFaultEnum" })
  ),
  Attribute({
    name: "BatReplacementDescription",
    id: 19,
    type: "string",
    access: "R V",
    conformance: "REPLC",
    constraint: "max 60",
    quality: "F"
  }),
  Attribute({
    name: "BatCommonDesignation",
    id: 20,
    type: "BatCommonDesignationEnum",
    access: "R V",
    conformance: "[REPLC]",
    constraint: "desc",
    quality: "F"
  }),
  Attribute({
    name: "BatAnsiDesignation",
    id: 21,
    type: "string",
    access: "R V",
    conformance: "[REPLC]",
    constraint: "max 20",
    quality: "F"
  }),
  Attribute({
    name: "BatIecDesignation",
    id: 22,
    type: "string",
    access: "R V",
    conformance: "[REPLC]",
    constraint: "max 20",
    quality: "F"
  }),
  Attribute({
    name: "BatApprovedChemistry",
    id: 23,
    type: "BatApprovedChemistryEnum",
    access: "R V",
    conformance: "[REPLC]",
    constraint: "desc",
    quality: "F"
  }),
  Attribute(
    { name: "BatCapacity", id: 24, type: "uint32", access: "R V", conformance: "[REPLC | RECHG]", quality: "F" }
  ),
  Attribute({ name: "BatQuantity", id: 25, type: "uint8", access: "R V", conformance: "REPLC", quality: "F" }),
  Attribute({
    name: "BatChargeState",
    id: 26,
    type: "BatChargeStateEnum",
    access: "R V",
    conformance: "RECHG",
    constraint: "desc"
  }),
  Attribute({ name: "BatTimeToFullCharge", id: 27, type: "uint32", access: "R V", conformance: "[RECHG]", quality: "X Q" }),
  Attribute({ name: "BatFunctionalWhileCharging", id: 28, type: "bool", access: "R V", conformance: "RECHG" }),
  Attribute(
    { name: "BatChargingCurrent", id: 29, type: "uint32", access: "R V", conformance: "[RECHG]", quality: "X C" }
  ),
  Attribute(
    {
      name: "ActiveBatChargeFaults",
      id: 30,
      type: "list",
      access: "R V",
      conformance: "[RECHG]",
      constraint: "max 16"
    },
    Field({ name: "entry", type: "BatChargeFaultEnum" })
  ),
  Attribute(
    { name: "EndpointList", id: 31, type: "list", access: "R V", conformance: "M" },
    Field({ name: "entry", type: "endpoint-no" })
  ),
  Event(
    { name: "WiredFaultChange", id: 0, access: "V", conformance: "[WIRED]", priority: "info" },
    Field(
      { name: "Current", id: 0, type: "list", conformance: "M", constraint: "max 8", default: [] },
      Field({ name: "entry", type: "WiredFaultEnum" })
    ),
    Field(
      { name: "Previous", id: 1, type: "list", conformance: "M", constraint: "max 8", default: [] },
      Field({ name: "entry", type: "WiredFaultEnum" })
    )
  ),
  Event(
    { name: "BatFaultChange", id: 1, access: "V", conformance: "[BAT]", priority: "info" },
    Field(
      { name: "Current", id: 0, type: "list", conformance: "M", constraint: "max 8", default: [] },
      Field({ name: "entry", type: "BatFaultEnum" })
    ),
    Field(
      { name: "Previous", id: 1, type: "list", conformance: "M", constraint: "max 8", default: [] },
      Field({ name: "entry", type: "BatFaultEnum" })
    )
  ),
  Event(
    { name: "BatChargeFaultChange", id: 2, access: "V", conformance: "[RECHG]", priority: "info" },
    Field(
      { name: "Current", id: 0, type: "list", conformance: "M", constraint: "max 16", default: [] },
      Field({ name: "entry", type: "BatChargeFaultEnum" })
    ),
    Field(
      { name: "Previous", id: 1, type: "list", conformance: "M", constraint: "max 16", default: [] },
      Field({ name: "entry", type: "BatChargeFaultEnum" })
    )
  ),
  Datatype(
    { name: "WiredFaultEnum", type: "enum8" },
    Field({ name: "Unspecified", id: 0, conformance: "M" }),
    Field({ name: "OverVoltage", id: 1, conformance: "M" }),
    Field({ name: "UnderVoltage", id: 2, conformance: "M" })
  ),
  Datatype(
    { name: "BatFaultEnum", type: "enum8" },
    Field({ name: "Unspecified", id: 0, conformance: "M" }),
    Field({ name: "OverTemp", id: 1, conformance: "M" }),
    Field({ name: "UnderTemp", id: 2, conformance: "M" })
  ),
  Datatype(
    { name: "BatChargeFaultEnum", type: "enum8" },
    Field({ name: "Unspecified", id: 0, conformance: "M" }),
    Field({ name: "AmbientTooHot", id: 1, conformance: "M" }),
    Field({ name: "AmbientTooCold", id: 2, conformance: "M" }),
    Field({ name: "BatteryTooHot", id: 3, conformance: "M" }),
    Field({ name: "BatteryTooCold", id: 4, conformance: "M" }),
    Field({ name: "BatteryAbsent", id: 5, conformance: "M" }),
    Field({ name: "BatteryOverVoltage", id: 6, conformance: "M" }),
    Field({ name: "BatteryUnderVoltage", id: 7, conformance: "M" }),
    Field({ name: "ChargerOverVoltage", id: 8, conformance: "M" }),
    Field({ name: "ChargerUnderVoltage", id: 9, conformance: "M" }),
    Field({ name: "SafetyTimeout", id: 10, conformance: "M" })
  ),
  Datatype(
    { name: "PowerSourceStatusEnum", type: "enum8" },
    Field({ name: "Unspecified", id: 0, conformance: "M" }),
    Field({ name: "Active", id: 1, conformance: "M" }),
    Field({ name: "Standby", id: 2, conformance: "M" }),
    Field({ name: "Unavailable", id: 3, conformance: "M" })
  ),
  Datatype(
    { name: "WiredCurrentTypeEnum", type: "enum8" },
    Field({ name: "Ac", id: 0, conformance: "M" }),
    Field({ name: "Dc", id: 1, conformance: "M" })
  ),
  Datatype(
    { name: "BatChargeLevelEnum", type: "enum8" },
    Field({ name: "Ok", id: 0, conformance: "M" }),
    Field({ name: "Warning", id: 1, conformance: "M" }),
    Field({ name: "Critical", id: 2, conformance: "M" })
  ),
  Datatype(
    { name: "BatReplaceabilityEnum", type: "enum8" },
    Field({ name: "Unspecified", id: 0, conformance: "M" }),
    Field({ name: "NotReplaceable", id: 1, conformance: "M" }),
    Field({ name: "UserReplaceable", id: 2, conformance: "M" }),
    Field({ name: "FactoryReplaceable", id: 3, conformance: "M" })
  ),
  Datatype(
    { name: "BatCommonDesignationEnum", type: "enum16" },
    Field({ name: "Unspecified", id: 0, conformance: "M" }),
    Field({ name: "Aaa", id: 1, conformance: "M" }),
    Field({ name: "Aa", id: 2, conformance: "M" }),
    Field({ name: "C", id: 3, conformance: "M", title: "Common type is as specified" }),
    Field({ name: "D", id: 4, conformance: "M", title: "Common type is as specified" }),
    Field({ name: "4V5", id: 5, conformance: "M" }),
    Field({ name: "6V0", id: 6, conformance: "M" }),
    Field({ name: "9V0", id: 7, conformance: "M" }),
    Field({ name: "12Aa", id: 8, conformance: "M" }),
    Field({ name: "Aaaa", id: 9, conformance: "M" }),
    Field({ name: "A", id: 10, conformance: "M", title: "Common type is as specified" }),
    Field({ name: "B", id: 11, conformance: "M", title: "Common type is as specified" }),
    Field({ name: "F", id: 12, conformance: "M", title: "Common type is as specified" }),
    Field({ name: "N", id: 13, conformance: "M", title: "Common type is as specified" }),
    Field({ name: "No6", id: 14, conformance: "M" }),
    Field({ name: "SubC", id: 15, conformance: "M" }),
    Field({ name: "A23", id: 16, conformance: "M" }),
    Field({ name: "A27", id: 17, conformance: "M" }),
    Field({ name: "Ba5800", id: 18, conformance: "M" }),
    Field({ name: "Duplex", id: 19, conformance: "M" }),
    Field({ name: "4Sr44", id: 20, conformance: "M" }),
    Field({ name: "523", id: 21, conformance: "M" }),
    Field({ name: "531", id: 22, conformance: "M" }),
    Field({ name: "15V0", id: 23, conformance: "M" }),
    Field({ name: "22V5", id: 24, conformance: "M" }),
    Field({ name: "30V0", id: 25, conformance: "M" }),
    Field({ name: "45V0", id: 26, conformance: "M" }),
    Field({ name: "67V5", id: 27, conformance: "M" }),
    Field({ name: "J", id: 28, conformance: "M", title: "Common type is as specified" }),
    Field({ name: "Cr123A", id: 29, conformance: "M" }),
    Field({ name: "Cr2", id: 30, conformance: "M" }),
    Field({ name: "2Cr5", id: 31, conformance: "M" }),
    Field({ name: "CrP2", id: 32, conformance: "M" }),
    Field({ name: "CrV3", id: 33, conformance: "M" }),
    Field({ name: "Sr41", id: 34, conformance: "M" }),
    Field({ name: "Sr43", id: 35, conformance: "M" }),
    Field({ name: "Sr44", id: 36, conformance: "M" }),
    Field({ name: "Sr45", id: 37, conformance: "M" }),
    Field({ name: "Sr48", id: 38, conformance: "M" }),
    Field({ name: "Sr54", id: 39, conformance: "M" }),
    Field({ name: "Sr55", id: 40, conformance: "M" }),
    Field({ name: "Sr57", id: 41, conformance: "M" }),
    Field({ name: "Sr58", id: 42, conformance: "M" }),
    Field({ name: "Sr59", id: 43, conformance: "M" }),
    Field({ name: "Sr60", id: 44, conformance: "M" }),
    Field({ name: "Sr63", id: 45, conformance: "M" }),
    Field({ name: "Sr64", id: 46, conformance: "M" }),
    Field({ name: "Sr65", id: 47, conformance: "M" }),
    Field({ name: "Sr66", id: 48, conformance: "M" }),
    Field({ name: "Sr67", id: 49, conformance: "M" }),
    Field({ name: "Sr68", id: 50, conformance: "M" }),
    Field({ name: "Sr69", id: 51, conformance: "M" }),
    Field({ name: "Sr516", id: 52, conformance: "M" }),
    Field({ name: "Sr731", id: 53, conformance: "M" }),
    Field({ name: "Sr712", id: 54, conformance: "M" }),
    Field({ name: "Lr932", id: 55, conformance: "M" }),
    Field({ name: "A5", id: 56, conformance: "M" }),
    Field({ name: "A10", id: 57, conformance: "M" }),
    Field({ name: "A13", id: 58, conformance: "M" }),
    Field({ name: "A312", id: 59, conformance: "M" }),
    Field({ name: "A675", id: 60, conformance: "M" }),
    Field({ name: "Ac41E", id: 61, conformance: "M" }),
    Field({ name: "10180", id: 62, conformance: "M" }),
    Field({ name: "10280", id: 63, conformance: "M" }),
    Field({ name: "10440", id: 64, conformance: "M" }),
    Field({ name: "14250", id: 65, conformance: "M" }),
    Field({ name: "14430", id: 66, conformance: "M" }),
    Field({ name: "14500", id: 67, conformance: "M" }),
    Field({ name: "14650", id: 68, conformance: "M" }),
    Field({ name: "15270", id: 69, conformance: "M" }),
    Field({ name: "16340", id: 70, conformance: "M" }),
    Field({ name: "Rcr123A", id: 71, conformance: "M" }),
    Field({ name: "17500", id: 72, conformance: "M" }),
    Field({ name: "17670", id: 73, conformance: "M" }),
    Field({ name: "18350", id: 74, conformance: "M" }),
    Field({ name: "18500", id: 75, conformance: "M" }),
    Field({ name: "18650", id: 76, conformance: "M" }),
    Field({ name: "19670", id: 77, conformance: "M" }),
    Field({ name: "25500", id: 78, conformance: "M" }),
    Field({ name: "26650", id: 79, conformance: "M" }),
    Field({ name: "32600", id: 80, conformance: "M" })
  ),
  Datatype(
    { name: "BatApprovedChemistryEnum", type: "enum16" },
    Field({ name: "Unspecified", id: 0, conformance: "M" }),
    Field({ name: "Alkaline", id: 1, conformance: "M" }),
    Field({ name: "LithiumCarbonFluoride", id: 2, conformance: "M" }),
    Field({ name: "LithiumChromiumOxide", id: 3, conformance: "M" }),
    Field({ name: "LithiumCopperOxide", id: 4, conformance: "M" }),
    Field({ name: "LithiumIronDisulfide", id: 5, conformance: "M" }),
    Field({ name: "LithiumManganeseDioxide", id: 6, conformance: "M" }),
    Field({ name: "LithiumThionylChloride", id: 7, conformance: "M" }),
    Field({ name: "Magnesium", id: 8, conformance: "M" }),
    Field({ name: "MercuryOxide", id: 9, conformance: "M" }),
    Field({ name: "NickelOxyhydride", id: 10, conformance: "M" }),
    Field({ name: "SilverOxide", id: 11, conformance: "M" }),
    Field({ name: "ZincAir", id: 12, conformance: "M" }),
    Field({ name: "ZincCarbon", id: 13, conformance: "M" }),
    Field({ name: "ZincChloride", id: 14, conformance: "M" }),
    Field({ name: "ZincManganeseDioxide", id: 15, conformance: "M" }),
    Field({ name: "LeadAcid", id: 16, conformance: "M" }),
    Field({ name: "LithiumCobaltOxide", id: 17, conformance: "M" }),
    Field({ name: "LithiumIon", id: 18, conformance: "M" }),
    Field({ name: "LithiumIonPolymer", id: 19, conformance: "M" }),
    Field({ name: "LithiumIronPhosphate", id: 20, conformance: "M" }),
    Field({ name: "LithiumSulfur", id: 21, conformance: "M" }),
    Field({ name: "LithiumTitanate", id: 22, conformance: "M" }),
    Field({ name: "NickelCadmium", id: 23, conformance: "M" }),
    Field({ name: "NickelHydrogen", id: 24, conformance: "M" }),
    Field({ name: "NickelIron", id: 25, conformance: "M" }),
    Field({ name: "NickelMetalHydride", id: 26, conformance: "M" }),
    Field({ name: "NickelZinc", id: 27, conformance: "M" }),
    Field({ name: "SilverZinc", id: 28, conformance: "M" }),
    Field({ name: "SodiumIon", id: 29, conformance: "M" }),
    Field({ name: "SodiumSulfur", id: 30, conformance: "M" }),
    Field({ name: "ZincBromide", id: 31, conformance: "M" }),
    Field({ name: "ZincCerium", id: 32, conformance: "M" })
  ),
  Datatype(
    { name: "BatChargeStateEnum", type: "enum8" },
    Field({ name: "Unknown", id: 0, conformance: "M" }),
    Field({ name: "IsCharging", id: 1, conformance: "M" }),
    Field({ name: "IsAtFullCharge", id: 2, conformance: "M" }),
    Field({ name: "IsNotCharging", id: 3, conformance: "M" })
  )
);
MatterDefinition.children.push(PowerSource);
export {
  PowerSource
};
//# sourceMappingURL=power-source-cluster.element.js.map
