"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 valve_configuration_and_control_element_exports = {};
__export(valve_configuration_and_control_element_exports, {
  ValveConfigurationAndControl: () => ValveConfigurationAndControl
});
module.exports = __toCommonJS(valve_configuration_and_control_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 ValveConfigurationAndControl = (0, import_elements.ClusterElement)(
  { name: "ValveConfigurationAndControl", id: 129, 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: "TS", conformance: "desc", constraint: "0", title: "TimeSync" }),
    (0, import_elements.FieldElement)({ name: "LVL", conformance: "O", constraint: "1", title: "Level" })
  ),
  (0, import_elements.AttributeElement)({
    name: "OpenDuration",
    id: 0,
    type: "elapsed-s",
    access: "R V",
    conformance: "M",
    constraint: "min 1",
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({
    name: "DefaultOpenDuration",
    id: 1,
    type: "elapsed-s",
    access: "RW VO",
    conformance: "M",
    constraint: "min 1",
    quality: "X N"
  }),
  (0, import_elements.AttributeElement)({ name: "AutoCloseTime", id: 2, type: "epoch-us", access: "R V", conformance: "TS", quality: "X" }),
  (0, import_elements.AttributeElement)({ name: "RemainingDuration", id: 3, type: "elapsed-s", access: "R V", conformance: "M", quality: "X Q" }),
  (0, import_elements.AttributeElement)({ name: "CurrentState", id: 4, type: "ValveStateEnum", access: "R V", conformance: "M", quality: "X" }),
  (0, import_elements.AttributeElement)({ name: "TargetState", id: 5, type: "ValveStateEnum", access: "R V", conformance: "M", quality: "X" }),
  (0, import_elements.AttributeElement)({ name: "CurrentLevel", id: 6, type: "percent", access: "R V", conformance: "LVL", quality: "X" }),
  (0, import_elements.AttributeElement)({ name: "TargetLevel", id: 7, type: "percent", access: "R V", conformance: "LVL", quality: "X" }),
  (0, import_elements.AttributeElement)({
    name: "DefaultOpenLevel",
    id: 8,
    type: "percent",
    access: "RW VO",
    conformance: "[LVL]",
    constraint: "1 to 100",
    default: 100,
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({ name: "ValveFault", id: 9, type: "ValveFaultBitmap", access: "R V", conformance: "O", default: 0 }),
  (0, import_elements.AttributeElement)({
    name: "LevelStep",
    id: 10,
    type: "uint8",
    access: "R V",
    conformance: "[LVL]",
    constraint: "1 to 50",
    default: 1,
    quality: "F"
  }),
  (0, import_elements.EventElement)(
    { name: "ValveStateChanged", id: 0, access: "V", conformance: "O", priority: "info" },
    (0, import_elements.FieldElement)({ name: "ValveState", id: 0, type: "ValveStateEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ValveLevel", id: 1, type: "percent", conformance: "LVL" })
  ),
  (0, import_elements.EventElement)(
    { name: "ValveFault", id: 1, access: "V", conformance: "O", priority: "info" },
    (0, import_elements.FieldElement)({ name: "ValveFault", id: 0, type: "ValveFaultBitmap", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    { name: "Open", id: 0, access: "O", conformance: "M", direction: "request", response: "status" },
    (0, import_elements.FieldElement)({ name: "OpenDuration", id: 0, type: "elapsed-s", conformance: "O", constraint: "min 1", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "TargetLevel", id: 1, type: "percent", conformance: "[LVL]", constraint: "min 1" })
  ),
  (0, import_elements.CommandElement)({ name: "Close", id: 1, access: "O", conformance: "M", direction: "request", response: "status" }),
  (0, import_elements.DatatypeElement)(
    { name: "ValveFaultBitmap", type: "map16" },
    (0, import_elements.FieldElement)({ name: "GeneralFault", constraint: "0" }),
    (0, import_elements.FieldElement)({ name: "Blocked", constraint: "1" }),
    (0, import_elements.FieldElement)({ name: "Leaking", constraint: "2" }),
    (0, import_elements.FieldElement)({ name: "NotConnected", constraint: "3" }),
    (0, import_elements.FieldElement)({ name: "ShortCircuit", constraint: "4" }),
    (0, import_elements.FieldElement)({ name: "CurrentExceeded", constraint: "5" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "ValveStateEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Closed", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Open", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Transitioning", id: 2, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "StatusCodeEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "FailureDueToFault", id: 2, conformance: "M" })
  )
);
import_MatterDefinition.MatterDefinition.children.push(ValveConfigurationAndControl);
//# sourceMappingURL=valve-configuration-and-control.element.js.map
