"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 on_off_element_exports = {};
__export(on_off_element_exports, {
  OnOff: () => OnOff
});
module.exports = __toCommonJS(on_off_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 OnOff = (0, import_elements.ClusterElement)(
  { name: "OnOff", id: 6, classification: "application" },
  (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 6 }),
  (0, import_elements.AttributeElement)(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    (0, import_elements.FieldElement)({ name: "LT", conformance: "[!OFFONLY]", constraint: "0", title: "Lighting" }),
    (0, import_elements.FieldElement)({ name: "DF", conformance: "[!OFFONLY]", constraint: "1", title: "DeadFrontBehavior" }),
    (0, import_elements.FieldElement)({ name: "OFFONLY", conformance: "[!(LT | DF)]", constraint: "2", title: "OffOnly" })
  ),
  (0, import_elements.AttributeElement)({ name: "OnOff", id: 0, type: "bool", access: "R V", conformance: "M", quality: "N S" }),
  (0, import_elements.AttributeElement)({ name: "GlobalSceneControl", id: 16384, type: "bool", access: "R V", conformance: "LT" }),
  (0, import_elements.AttributeElement)({ name: "OnTime", id: 16385, type: "uint16", access: "RW VO", conformance: "LT" }),
  (0, import_elements.AttributeElement)({ name: "OffWaitTime", id: 16386, type: "uint16", access: "RW VO", conformance: "LT" }),
  (0, import_elements.AttributeElement)({
    name: "StartUpOnOff",
    id: 16387,
    type: "StartUpOnOffEnum",
    access: "RW VM",
    conformance: "LT",
    constraint: "desc",
    quality: "X N"
  }),
  (0, import_elements.CommandElement)({ name: "Off", id: 0, access: "O", conformance: "M", direction: "request", response: "status" }),
  (0, import_elements.CommandElement)({ name: "On", id: 1, access: "O", conformance: "!OFFONLY", direction: "request", response: "status" }),
  (0, import_elements.CommandElement)({ name: "Toggle", id: 2, access: "O", conformance: "!OFFONLY", direction: "request", response: "status" }),
  (0, import_elements.CommandElement)(
    { name: "OffWithEffect", id: 64, access: "O", conformance: "LT", direction: "request", response: "status" },
    (0, import_elements.FieldElement)({ name: "EffectIdentifier", id: 0, type: "EffectIdentifierEnum", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "EffectVariant", id: 1, type: "enum8", conformance: "M", constraint: "desc" })
  ),
  (0, import_elements.CommandElement)({
    name: "OnWithRecallGlobalScene",
    id: 65,
    access: "O",
    conformance: "LT",
    direction: "request",
    response: "status"
  }),
  (0, import_elements.CommandElement)(
    { name: "OnWithTimedOff", id: 66, access: "O", conformance: "LT", direction: "request", response: "status" },
    (0, import_elements.FieldElement)({ name: "OnOffControl", id: 0, type: "OnOffControlBitmap", conformance: "M", constraint: "0 to 1" }),
    (0, import_elements.FieldElement)({ name: "OnTime", id: 1, type: "uint16", conformance: "M", constraint: "max 65534" }),
    (0, import_elements.FieldElement)({ name: "OffWaitTime", id: 2, type: "uint16", conformance: "M", constraint: "max 65534" })
  ),
  (0, import_elements.DatatypeElement)({ name: "OnOffControlBitmap", type: "map8" }, (0, import_elements.FieldElement)({ name: "AcceptOnlyWhenOn", constraint: "0" })),
  (0, import_elements.DatatypeElement)(
    { name: "StartUpOnOffEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Off", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "On", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Toggle", id: 2, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "EffectIdentifierEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "DelayedAllOff", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "DyingLight", id: 1, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "DelayedAllOffEffectVariantEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "DelayedOffFastFade", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "NoFade", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "DelayedOffSlowFade", id: 2, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "DyingLightEffectVariantEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "DyingLightFadeOff", id: 0, conformance: "M" })
  )
);
import_MatterDefinition.MatterDefinition.children.push(OnOff);
//# sourceMappingURL=on-off.element.js.map
