"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 occupancy_sensing_element_exports = {};
__export(occupancy_sensing_element_exports, {
  OccupancySensing: () => OccupancySensing
});
module.exports = __toCommonJS(occupancy_sensing_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 OccupancySensing = (0, import_elements.ClusterElement)(
  { name: "OccupancySensing", id: 1030, classification: "application" },
  (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 5 }),
  (0, import_elements.AttributeElement)(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    (0, import_elements.FieldElement)({ name: "OTHER", conformance: "O.a+", constraint: "0", title: "Other" }),
    (0, import_elements.FieldElement)({ name: "PIR", conformance: "O.a+", constraint: "1", title: "PassiveInfrared" }),
    (0, import_elements.FieldElement)({ name: "US", conformance: "O.a+", constraint: "2", title: "Ultrasonic" }),
    (0, import_elements.FieldElement)({ name: "PHY", conformance: "O.a+", constraint: "3", title: "PhysicalContact" }),
    (0, import_elements.FieldElement)({ name: "AIR", conformance: "O.a+", constraint: "4", title: "ActiveInfrared" }),
    (0, import_elements.FieldElement)({ name: "RAD", conformance: "O.a+", constraint: "5", title: "Radar" }),
    (0, import_elements.FieldElement)({ name: "RFS", conformance: "O.a+", constraint: "6", title: "RfSensing" }),
    (0, import_elements.FieldElement)({ name: "VIS", conformance: "O.a+", constraint: "7", title: "Vision" })
  ),
  (0, import_elements.AttributeElement)({
    name: "Occupancy",
    id: 0,
    type: "OccupancyBitmap",
    access: "R V",
    conformance: "M",
    constraint: "0 to 1",
    quality: "P"
  }),
  (0, import_elements.AttributeElement)({
    name: "OccupancySensorType",
    id: 1,
    type: "OccupancySensorTypeEnum",
    access: "R V",
    conformance: "M, D",
    constraint: "desc",
    quality: "F"
  }),
  (0, import_elements.AttributeElement)({
    name: "OccupancySensorTypeBitmap",
    id: 2,
    type: "OccupancySensorTypeBitmap",
    access: "R V",
    conformance: "M, D",
    constraint: "0 to 7",
    quality: "F"
  }),
  (0, import_elements.AttributeElement)({
    name: "HoldTime",
    id: 3,
    type: "uint16",
    access: "RW VM",
    conformance: "O",
    constraint: "holdTimeLimits.holdTimeMin to holdTimeLimits.holdTimeMax",
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({
    name: "HoldTimeLimits",
    id: 4,
    type: "HoldTimeLimitsStruct",
    access: "R V",
    conformance: "HoldTime",
    quality: "F"
  }),
  (0, import_elements.AttributeElement)({
    name: "PirOccupiedToUnoccupiedDelay",
    id: 16,
    type: "uint16",
    access: "RW VM",
    conformance: "[HoldTime & (PIR | !PIR & !US & !PHY)], D",
    default: 0,
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({
    name: "PirUnoccupiedToOccupiedDelay",
    id: 17,
    type: "uint16",
    access: "RW VM",
    conformance: "HoldTime & (PIR | !PIR & !US & !PHY) & PirUnoccupiedToOccupiedThreshold, [HoldTime & (PIR | !PIR & !US & !PHY)], D",
    default: 0,
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({
    name: "PirUnoccupiedToOccupiedThreshold",
    id: 18,
    type: "uint8",
    access: "RW VM",
    conformance: "HoldTime & (PIR | !PIR & !US & !PHY) & PirUnoccupiedToOccupiedDelay, [HoldTime & (PIR | !PIR & !US & !PHY)], D",
    constraint: "1 to 254",
    default: 1,
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({
    name: "UltrasonicOccupiedToUnoccupiedDelay",
    id: 32,
    type: "uint16",
    access: "RW VM",
    conformance: "[HoldTime & US], D",
    default: 0,
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({
    name: "UltrasonicUnoccupiedToOccupiedDelay",
    id: 33,
    type: "uint16",
    access: "RW VM",
    conformance: "HoldTime & US & UltrasonicUnoccupiedToOccupiedThreshold, [HoldTime & US], D",
    default: 0,
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({
    name: "UltrasonicUnoccupiedToOccupiedThreshold",
    id: 34,
    type: "uint8",
    access: "RW VM",
    conformance: "HoldTime & US & UltrasonicUnoccupiedToOccupiedDelay, [HoldTime & US], D",
    constraint: "1 to 254",
    default: 1,
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({
    name: "PhysicalContactOccupiedToUnoccupiedDelay",
    id: 48,
    type: "uint16",
    access: "RW VM",
    conformance: "[HoldTime & PHY], D",
    default: 0,
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({
    name: "PhysicalContactUnoccupiedToOccupiedDelay",
    id: 49,
    type: "uint16",
    access: "RW VM",
    conformance: "HoldTime & PHY & PhysicalContactUnoccupiedToOccupiedThreshold, [HoldTime & PHY], D",
    default: 0,
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({
    name: "PhysicalContactUnoccupiedToOccupiedThreshold",
    id: 50,
    type: "uint8",
    access: "RW VM",
    conformance: "HoldTime & PHY & PhysicalContactUnoccupiedToOccupiedDelay, [HoldTime & PHY], D",
    constraint: "1 to 254",
    default: 1,
    quality: "N"
  }),
  (0, import_elements.EventElement)(
    { name: "OccupancyChanged", id: 0, access: "V", conformance: "O", priority: "info" },
    (0, import_elements.FieldElement)({ name: "Occupancy", id: 0, type: "OccupancyBitmap", conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)({ name: "OccupancyBitmap", type: "map8" }, (0, import_elements.FieldElement)({ name: "Occupied", constraint: "0" })),
  (0, import_elements.DatatypeElement)(
    { name: "OccupancySensorTypeBitmap", type: "map8" },
    (0, import_elements.FieldElement)({ name: "Pir", constraint: "0" }),
    (0, import_elements.FieldElement)({ name: "Ultrasonic", constraint: "1" }),
    (0, import_elements.FieldElement)({ name: "PhysicalContact", constraint: "2" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "OccupancySensorTypeEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Pir", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Ultrasonic", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "PirAndUltrasonic", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "PhysicalContact", id: 3, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "HoldTimeLimitsStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "HoldTimeMin", id: 0, type: "uint16", conformance: "M", constraint: "min 1" }),
    (0, import_elements.FieldElement)({ name: "HoldTimeMax", id: 1, type: "uint16", conformance: "M", constraint: "min maxOf(holdTimeMin, 10)" }),
    (0, import_elements.FieldElement)({
      name: "HoldTimeDefault",
      id: 2,
      type: "uint16",
      conformance: "M",
      constraint: "holdTimeMin to holdTimeMax"
    })
  )
);
import_MatterDefinition.MatterDefinition.children.push(OccupancySensing);
//# sourceMappingURL=occupancy-sensing.element.js.map
