"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 water_heater_management_element_exports = {};
__export(water_heater_management_element_exports, {
  WaterHeaterManagement: () => WaterHeaterManagement
});
module.exports = __toCommonJS(water_heater_management_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 WaterHeaterManagement = (0, import_elements.ClusterElement)(
  { name: "WaterHeaterManagement", id: 148, classification: "application" },
  (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 2 }),
  (0, import_elements.AttributeElement)(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    (0, import_elements.FieldElement)({ name: "EM", conformance: "O", constraint: "0", title: "EnergyManagement" }),
    (0, import_elements.FieldElement)({ name: "TP", conformance: "O", constraint: "1", title: "TankPercent" })
  ),
  (0, import_elements.AttributeElement)({
    name: "HeaterTypes",
    id: 0,
    type: "WaterHeaterHeatSourceBitmap",
    access: "R V",
    conformance: "M",
    quality: "F"
  }),
  (0, import_elements.AttributeElement)({ name: "HeatDemand", id: 1, type: "WaterHeaterHeatSourceBitmap", access: "R V", conformance: "M" }),
  (0, import_elements.AttributeElement)({ name: "TankVolume", id: 2, type: "uint16", access: "R V", conformance: "EM" }),
  (0, import_elements.AttributeElement)({
    name: "EstimatedHeatRequired",
    id: 3,
    type: "energy-mWh",
    access: "R V",
    conformance: "EM",
    constraint: "min 0"
  }),
  (0, import_elements.AttributeElement)({ name: "TankPercentage", id: 4, type: "percent", access: "R V", conformance: "TP" }),
  (0, import_elements.AttributeElement)({ name: "BoostState", id: 5, type: "BoostStateEnum", access: "R V", conformance: "M" }),
  (0, import_elements.EventElement)(
    { name: "BoostStarted", id: 0, access: "V", conformance: "M", priority: "info" },
    (0, import_elements.FieldElement)({ name: "BoostInfo", id: 0, type: "WaterHeaterBoostInfoStruct", conformance: "M" })
  ),
  (0, import_elements.EventElement)({ name: "BoostEnded", id: 1, access: "V", conformance: "M", priority: "info" }),
  (0, import_elements.CommandElement)(
    { name: "Boost", id: 0, access: "M", conformance: "M", direction: "request", response: "status" },
    (0, import_elements.FieldElement)({ name: "BoostInfo", id: 0, type: "WaterHeaterBoostInfoStruct", conformance: "M" })
  ),
  (0, import_elements.CommandElement)({ name: "CancelBoost", id: 1, access: "M", conformance: "M", direction: "request", response: "status" }),
  (0, import_elements.DatatypeElement)(
    { name: "WaterHeaterHeatSourceBitmap", type: "map8" },
    (0, import_elements.FieldElement)({ name: "ImmersionElement1", constraint: "0" }),
    (0, import_elements.FieldElement)({ name: "ImmersionElement2", constraint: "1" }),
    (0, import_elements.FieldElement)({ name: "HeatPump", constraint: "2" }),
    (0, import_elements.FieldElement)({ name: "Boiler", constraint: "3" }),
    (0, import_elements.FieldElement)({ name: "Other", constraint: "4" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "BoostStateEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Inactive", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Active", id: 1, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "WaterHeaterBoostInfoStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Duration", id: 0, type: "elapsed-s", conformance: "M", constraint: "min 1" }),
    (0, import_elements.FieldElement)({ name: "OneShot", id: 1, type: "bool", conformance: "[!TP], [TP].a-", default: false }),
    (0, import_elements.FieldElement)({ name: "EmergencyBoost", id: 2, type: "bool", conformance: "O", default: false }),
    (0, import_elements.FieldElement)({ name: "TemporarySetpoint", id: 3, type: "temperature", conformance: "O", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "TargetPercentage", id: 4, type: "percent", conformance: "TargetReheat, [TP]" }),
    (0, import_elements.FieldElement)({ name: "TargetReheat", id: 5, type: "percent", conformance: "[TP].a-", constraint: "max targetPercentage" })
  )
);
import_MatterDefinition.MatterDefinition.children.push(WaterHeaterManagement);
//# sourceMappingURL=water-heater-management.element.js.map
