"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_grid_conditions_element_exports = {};
__export(electrical_grid_conditions_element_exports, {
  ElectricalGridConditions: () => ElectricalGridConditions
});
module.exports = __toCommonJS(electrical_grid_conditions_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 ElectricalGridConditions = (0, import_elements.ClusterElement)(
  { name: "ElectricalGridConditions", id: 160, classification: "application" },
  (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
  (0, import_elements.AttributeElement)(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    (0, import_elements.FieldElement)({ name: "FORE", conformance: "O", constraint: "0", title: "Forecasting" })
  ),
  (0, import_elements.AttributeElement)({ name: "LocalGenerationAvailable", id: 0, type: "bool", access: "RW VO", conformance: "M", quality: "X" }),
  (0, import_elements.AttributeElement)({
    name: "CurrentConditions",
    id: 1,
    type: "ElectricalGridConditionsStruct",
    access: "R V",
    conformance: "M",
    quality: "X"
  }),
  (0, import_elements.AttributeElement)(
    { name: "ForecastConditions", id: 2, type: "list", access: "R V", conformance: "FORE", constraint: "max 56" },
    (0, import_elements.FieldElement)({ name: "entry", type: "ElectricalGridConditionsStruct" })
  ),
  (0, import_elements.EventElement)(
    { name: "CurrentConditionsChanged", id: 0, access: "V", conformance: "O", priority: "info" },
    (0, import_elements.FieldElement)({ name: "CurrentConditions", id: 0, type: "ElectricalGridConditionsStruct", conformance: "M", quality: "X" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "ThreeLevelEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Low", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Medium", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "High", id: 2, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "ElectricalGridConditionsStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "PeriodStart", id: 0, type: "epoch-s", conformance: "M" }),
    (0, import_elements.FieldElement)({
      name: "PeriodEnd",
      id: 1,
      type: "epoch-s",
      conformance: "M",
      constraint: "min periodStart + 1",
      quality: "X"
    }),
    (0, import_elements.FieldElement)({ name: "GridCarbonIntensity", id: 2, type: "int16", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "GridCarbonLevel", id: 3, type: "ThreeLevelEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "LocalCarbonIntensity", id: 4, type: "int16", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "LocalCarbonLevel", id: 5, type: "ThreeLevelEnum", conformance: "M" })
  )
);
import_MatterDefinition.MatterDefinition.children.push(ElectricalGridConditions);
//# sourceMappingURL=electrical-grid-conditions.element.js.map
