"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 electrical_power_measurement_element_exports = {};
__export(electrical_power_measurement_element_exports, {
  ElectricalPowerMeasurement: () => ElectricalPowerMeasurement
});
module.exports = __toCommonJS(electrical_power_measurement_element_exports);
var import_MatterDefinition = require("../MatterDefinition.js");
var import_elements = require("../../elements/index.js");
/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const ElectricalPowerMeasurement = (0, import_elements.ClusterElement)(
  { name: "ElectricalPowerMeasurement", id: 144, 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: "DIRC", conformance: "O.a+", constraint: "0", title: "DirectCurrent" }),
    (0, import_elements.FieldElement)({ name: "ALTC", conformance: "O.a+", constraint: "1", title: "AlternatingCurrent" }),
    (0, import_elements.FieldElement)({ name: "POLY", conformance: "[ALTC]", constraint: "2", title: "PolyphasePower" }),
    (0, import_elements.FieldElement)({ name: "HARM", conformance: "[ALTC]", constraint: "3", title: "Harmonics" }),
    (0, import_elements.FieldElement)({ name: "PWRQ", conformance: "[ALTC]", constraint: "4", title: "PowerQuality" })
  ),
  (0, import_elements.AttributeElement)({ name: "PowerMode", id: 0, type: "PowerModeEnum", access: "R V", conformance: "M" }),
  (0, import_elements.AttributeElement)({
    name: "NumberOfMeasurementTypes",
    id: 1,
    type: "uint8",
    access: "R V",
    conformance: "M",
    constraint: "max 32",
    quality: "F"
  }),
  (0, import_elements.AttributeElement)(
    {
      name: "Accuracy",
      id: 2,
      type: "list",
      access: "R V",
      conformance: "M",
      constraint: "1 to numberOfMeasurementTypes",
      quality: "F"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "MeasurementAccuracyStruct" })
  ),
  (0, import_elements.AttributeElement)(
    {
      name: "Ranges",
      id: 3,
      type: "list",
      access: "R V",
      conformance: "O",
      constraint: "0 to numberOfMeasurementTypes",
      default: [],
      quality: "Q"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "MeasurementRangeStruct" })
  ),
  (0, import_elements.AttributeElement)({ name: "Voltage", id: 4, type: "voltage-mV", access: "R V", conformance: "O", default: null, quality: "X Q" }),
  (0, import_elements.AttributeElement)({
    name: "ActiveCurrent",
    id: 5,
    type: "amperage-mA",
    access: "R V",
    conformance: "O",
    default: null,
    quality: "X Q"
  }),
  (0, import_elements.AttributeElement)({
    name: "ReactiveCurrent",
    id: 6,
    type: "amperage-mA",
    access: "R V",
    conformance: "[ALTC]",
    default: null,
    quality: "X Q"
  }),
  (0, import_elements.AttributeElement)({
    name: "ApparentCurrent",
    id: 7,
    type: "amperage-mA",
    access: "R V",
    conformance: "[ALTC]",
    default: null,
    quality: "X Q"
  }),
  (0, import_elements.AttributeElement)({ name: "ActivePower", id: 8, type: "power-mW", access: "R V", conformance: "M", quality: "X Q" }),
  (0, import_elements.AttributeElement)({
    name: "ReactivePower",
    id: 9,
    type: "power-mVAR",
    access: "R V",
    conformance: "[ALTC]",
    default: null,
    quality: "X Q"
  }),
  (0, import_elements.AttributeElement)({
    name: "ApparentPower",
    id: 10,
    type: "power-mVA",
    access: "R V",
    conformance: "[ALTC]",
    default: null,
    quality: "X Q"
  }),
  (0, import_elements.AttributeElement)({
    name: "RmsVoltage",
    id: 11,
    type: "voltage-mV",
    access: "R V",
    conformance: "[ALTC]",
    default: null,
    quality: "X Q"
  }),
  (0, import_elements.AttributeElement)({
    name: "RmsCurrent",
    id: 12,
    type: "amperage-mA",
    access: "R V",
    conformance: "[ALTC]",
    default: null,
    quality: "X Q"
  }),
  (0, import_elements.AttributeElement)({
    name: "RmsPower",
    id: 13,
    type: "power-mW",
    access: "R V",
    conformance: "[ALTC]",
    default: null,
    quality: "X Q"
  }),
  (0, import_elements.AttributeElement)({
    name: "Frequency",
    id: 14,
    type: "int64",
    access: "R V",
    conformance: "[ALTC]",
    constraint: "0 to 1000000",
    default: null,
    quality: "X Q"
  }),
  (0, import_elements.AttributeElement)(
    {
      name: "HarmonicCurrents",
      id: 15,
      type: "list",
      access: "R V",
      conformance: "HARM",
      constraint: "max 25",
      quality: "X Q"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "HarmonicMeasurementStruct" })
  ),
  (0, import_elements.AttributeElement)(
    {
      name: "HarmonicPhases",
      id: 16,
      type: "list",
      access: "R V",
      conformance: "PWRQ",
      constraint: "max 25",
      quality: "X Q"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "HarmonicMeasurementStruct" })
  ),
  (0, import_elements.AttributeElement)({
    name: "PowerFactor",
    id: 17,
    type: "int64",
    access: "R V",
    conformance: "[ALTC]",
    constraint: "-10000 to 10000",
    default: null,
    quality: "X Q"
  }),
  (0, import_elements.AttributeElement)({
    name: "NeutralCurrent",
    id: 18,
    type: "amperage-mA",
    access: "R V",
    conformance: "[POLY]",
    default: null,
    quality: "X Q"
  }),
  (0, import_elements.EventElement)(
    { name: "MeasurementPeriodRanges", id: 0, access: "V", conformance: "Ranges", priority: "info" },
    (0, import_elements.FieldElement)(
      {
        name: "Ranges",
        id: 0,
        type: "list",
        access: "R V",
        conformance: "M",
        constraint: "1 to numberOfMeasurementTypes",
        default: []
      },
      (0, import_elements.FieldElement)({ name: "entry", type: "MeasurementRangeStruct" })
    )
  ),
  (0, import_elements.DatatypeElement)(
    { name: "PowerModeEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Unknown", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Dc", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Ac", id: 2, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "MeasurementTypeEnum", type: "enum16" },
    (0, import_elements.FieldElement)({ name: "Unspecified", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Voltage", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ActiveCurrent", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ReactiveCurrent", id: 3, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ApparentCurrent", id: 4, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ActivePower", id: 5, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ReactivePower", id: 6, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ApparentPower", id: 7, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "RmsVoltage", id: 8, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "RmsCurrent", id: 9, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "RmsPower", id: 10, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Frequency", id: 11, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "PowerFactor", id: 12, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "NeutralCurrent", id: 13, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ElectricalEnergy", id: 14, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ReactiveEnergy", id: 15, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ApparentEnergy", id: 16, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "MeasurementRangeStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "MeasurementType", id: 0, type: "MeasurementTypeEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Min", id: 1, type: "int64", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Max", id: 2, type: "int64", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "StartTimestamp", id: 3, type: "epoch-s", conformance: "EndTimestamp" }),
    (0, import_elements.FieldElement)({ name: "EndTimestamp", id: 4, type: "epoch-s", conformance: "desc", constraint: "min startTimestamp + 1" }),
    (0, import_elements.FieldElement)({ name: "MinTimestamp", id: 5, type: "epoch-s", conformance: "EndTimestamp" }),
    (0, import_elements.FieldElement)({
      name: "MaxTimestamp",
      id: 6,
      type: "epoch-s",
      conformance: "EndTimestamp",
      constraint: "min minTimestamp + 1"
    }),
    (0, import_elements.FieldElement)({ name: "StartSystime", id: 7, type: "systime-ms", conformance: "EndSystime" }),
    (0, import_elements.FieldElement)({ name: "EndSystime", id: 8, type: "systime-ms", conformance: "desc", constraint: "min startSystime + 1" }),
    (0, import_elements.FieldElement)({ name: "MinSystime", id: 9, type: "systime-ms", conformance: "EndSystime" }),
    (0, import_elements.FieldElement)({
      name: "MaxSystime",
      id: 10,
      type: "systime-ms",
      conformance: "EndSystime",
      constraint: "min minSystime + 1"
    })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "HarmonicMeasurementStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Order", id: 0, type: "uint8", conformance: "M", constraint: "min 1" }),
    (0, import_elements.FieldElement)({ name: "Measurement", id: 1, type: "int64", conformance: "M", quality: "X" })
  )
);
import_MatterDefinition.MatterDefinition.children.push(ElectricalPowerMeasurement);
//# sourceMappingURL=electrical-power-measurement.element.js.map
