"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 switch_element_exports = {};
__export(switch_element_exports, {
  Switch: () => Switch
});
module.exports = __toCommonJS(switch_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 Switch = (0, import_elements.ClusterElement)(
  { name: "Switch", id: 59, 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: "LS", conformance: "O.a", constraint: "0", title: "LatchingSwitch" }),
    (0, import_elements.FieldElement)({ name: "MS", conformance: "O.a", constraint: "1", title: "MomentarySwitch" }),
    (0, import_elements.FieldElement)({ name: "MSR", conformance: "[MS & !AS]", constraint: "2", title: "MomentarySwitchRelease" }),
    (0, import_elements.FieldElement)({ name: "MSL", conformance: "[MS & (MSR | AS)]", constraint: "3", title: "MomentarySwitchLongPress" }),
    (0, import_elements.FieldElement)({ name: "MSM", conformance: "AS, [MS & MSR]", constraint: "4", title: "MomentarySwitchMultiPress" }),
    (0, import_elements.FieldElement)({ name: "AS", conformance: "[MS]", constraint: "5", title: "ActionSwitch" })
  ),
  (0, import_elements.AttributeElement)({
    name: "NumberOfPositions",
    id: 0,
    type: "uint8",
    access: "R V",
    conformance: "M",
    constraint: "min 2",
    quality: "F"
  }),
  (0, import_elements.AttributeElement)({
    name: "CurrentPosition",
    id: 1,
    type: "uint8",
    access: "R V",
    conformance: "M",
    constraint: "max numberOfPositions - 1",
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({
    name: "MultiPressMax",
    id: 2,
    type: "uint8",
    access: "R V",
    conformance: "MSM",
    constraint: "min 2",
    quality: "F"
  }),
  (0, import_elements.EventElement)(
    { name: "SwitchLatched", id: 0, access: "V", conformance: "LS", priority: "info" },
    (0, import_elements.FieldElement)({ name: "NewPosition", id: 0, type: "uint8", conformance: "M", constraint: "0 to numberOfPositions - 1" })
  ),
  (0, import_elements.EventElement)(
    { name: "InitialPress", id: 1, access: "V", conformance: "MS", priority: "info" },
    (0, import_elements.FieldElement)({ name: "NewPosition", id: 0, type: "uint8", conformance: "M", constraint: "0 to numberOfPositions - 1" })
  ),
  (0, import_elements.EventElement)(
    { name: "LongPress", id: 2, access: "V", conformance: "MSL", priority: "info" },
    (0, import_elements.FieldElement)({ name: "NewPosition", id: 0, type: "uint8", conformance: "M", constraint: "0 to numberOfPositions - 1" })
  ),
  (0, import_elements.EventElement)(
    { name: "ShortRelease", id: 3, access: "V", conformance: "MSR", priority: "info" },
    (0, import_elements.FieldElement)({
      name: "PreviousPosition",
      id: 0,
      type: "uint8",
      conformance: "M",
      constraint: "0 to numberOfPositions - 1"
    })
  ),
  (0, import_elements.EventElement)(
    { name: "LongRelease", id: 4, access: "V", conformance: "MSL", priority: "info" },
    (0, import_elements.FieldElement)({
      name: "PreviousPosition",
      id: 0,
      type: "uint8",
      conformance: "M",
      constraint: "0 to numberOfPositions - 1"
    })
  ),
  (0, import_elements.EventElement)(
    { name: "MultiPressOngoing", id: 5, access: "V", conformance: "MSM & !AS", priority: "info" },
    (0, import_elements.FieldElement)({ name: "NewPosition", id: 0, type: "uint8", conformance: "M", constraint: "0 to numberOfPositions - 1" }),
    (0, import_elements.FieldElement)({
      name: "CurrentNumberOfPressesCounted",
      id: 1,
      type: "uint8",
      conformance: "M",
      constraint: "2 to multiPressMax"
    })
  ),
  (0, import_elements.EventElement)(
    { name: "MultiPressComplete", id: 6, access: "V", conformance: "MSM", priority: "info" },
    (0, import_elements.FieldElement)({
      name: "PreviousPosition",
      id: 0,
      type: "uint8",
      conformance: "M",
      constraint: "0 to numberOfPositions - 1"
    }),
    (0, import_elements.FieldElement)({
      name: "TotalNumberOfPressesCounted",
      id: 1,
      type: "uint8",
      conformance: "M",
      constraint: "max multiPressMax"
    })
  )
);
import_MatterDefinition.MatterDefinition.children.push(Switch);
//# sourceMappingURL=switch.element.js.map
