"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 level_control_element_exports = {};
__export(level_control_element_exports, {
  LevelControl: () => LevelControl
});
module.exports = __toCommonJS(level_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 LevelControl = (0, import_elements.ClusterElement)(
  { name: "LevelControl", id: 8, classification: "application" },
  (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 7 }),
  (0, import_elements.AttributeElement)(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    (0, import_elements.FieldElement)({ name: "OO", conformance: "O", constraint: "0", default: 1, title: "OnOff" }),
    (0, import_elements.FieldElement)({ name: "LT", conformance: "O", constraint: "1", default: 0, title: "Lighting" }),
    (0, import_elements.FieldElement)({ name: "FQ", conformance: "P", constraint: "2", default: 0, title: "Frequency" })
  ),
  (0, import_elements.AttributeElement)({
    name: "CurrentLevel",
    id: 0,
    type: "uint8",
    access: "R V",
    conformance: "M",
    constraint: "minLevel to maxLevel",
    quality: "X N S Q"
  }),
  (0, import_elements.AttributeElement)({ name: "RemainingTime", id: 1, type: "uint16", access: "R V", conformance: "LT", quality: "Q" }),
  (0, import_elements.AttributeElement)({
    name: "MinLevel",
    id: 2,
    type: "uint8",
    access: "R V",
    conformance: "Rev >= v7, O",
    constraint: "max 254",
    default: 1,
    quality: "F"
  }),
  (0, import_elements.AttributeElement)({
    name: "MaxLevel",
    id: 3,
    type: "uint8",
    access: "R V",
    conformance: "Rev >= v7, O",
    constraint: "minLevel to 254",
    default: 254,
    quality: "F"
  }),
  (0, import_elements.AttributeElement)({
    name: "CurrentFrequency",
    id: 4,
    type: "uint16",
    access: "R V",
    conformance: "FQ",
    constraint: "minFrequency to maxFrequency",
    quality: "S Q"
  }),
  (0, import_elements.AttributeElement)({ name: "MinFrequency", id: 5, type: "uint16", access: "R V", conformance: "FQ" }),
  (0, import_elements.AttributeElement)({ name: "MaxFrequency", id: 6, type: "uint16", access: "R V", conformance: "FQ", constraint: "min minFrequency" }),
  (0, import_elements.AttributeElement)({ name: "OnOffTransitionTime", id: 16, type: "uint16", access: "RW VO", conformance: "O", default: 0 }),
  (0, import_elements.AttributeElement)({
    name: "OnLevel",
    id: 17,
    type: "uint8",
    access: "RW VO",
    conformance: "M",
    constraint: "minLevel to maxLevel",
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({
    name: "OnTransitionTime",
    id: 18,
    type: "uint16",
    access: "RW VO",
    conformance: "O",
    default: null,
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({
    name: "OffTransitionTime",
    id: 19,
    type: "uint16",
    access: "RW VO",
    conformance: "O",
    default: null,
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({
    name: "DefaultMoveRate",
    id: 20,
    type: "uint8",
    access: "RW VO",
    conformance: "O",
    constraint: "min 1",
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({ name: "Options", id: 15, type: "OptionsBitmap", access: "RW VO", conformance: "M", constraint: "desc" }),
  (0, import_elements.AttributeElement)({
    name: "StartUpCurrentLevel",
    id: 16384,
    type: "uint8",
    access: "RW VM",
    conformance: "LT",
    constraint: "desc",
    quality: "X N"
  }),
  (0, import_elements.CommandElement)(
    { name: "MoveToLevel", id: 0, access: "O", conformance: "M", direction: "request", response: "status" },
    (0, import_elements.FieldElement)({ name: "Level", id: 0, type: "uint8", conformance: "M", constraint: "max 254" }),
    (0, import_elements.FieldElement)({ name: "TransitionTime", id: 1, type: "uint16", conformance: "M", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "OptionsMask", id: 2, type: "OptionsBitmap", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "OptionsOverride", id: 3, type: "OptionsBitmap", conformance: "M", constraint: "desc" })
  ),
  (0, import_elements.CommandElement)(
    { name: "Move", id: 1, access: "O", conformance: "M", direction: "request", response: "status" },
    (0, import_elements.FieldElement)({ name: "MoveMode", id: 0, type: "MoveModeEnum", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "Rate", id: 1, type: "uint8", conformance: "M", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "OptionsMask", id: 2, type: "OptionsBitmap", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "OptionsOverride", id: 3, type: "OptionsBitmap", conformance: "M", constraint: "desc" })
  ),
  (0, import_elements.CommandElement)(
    { name: "Step", id: 2, access: "O", conformance: "M", direction: "request", response: "status" },
    (0, import_elements.FieldElement)({ name: "StepMode", id: 0, type: "StepModeEnum", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "StepSize", id: 1, type: "uint8", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "TransitionTime", id: 2, type: "uint16", conformance: "M", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "OptionsMask", id: 3, type: "OptionsBitmap", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "OptionsOverride", id: 4, type: "OptionsBitmap", conformance: "M", constraint: "desc" })
  ),
  (0, import_elements.CommandElement)(
    { name: "Stop", id: 3, access: "O", conformance: "M", direction: "request", response: "status" },
    (0, import_elements.FieldElement)({ name: "OptionsMask", id: 0, type: "OptionsBitmap", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "OptionsOverride", id: 1, type: "OptionsBitmap", conformance: "M", constraint: "desc" })
  ),
  (0, import_elements.CommandElement)({
    name: "MoveToLevelWithOnOff",
    id: 4,
    type: "MoveToLevel",
    access: "O",
    conformance: "M",
    direction: "request",
    response: "status"
  }),
  (0, import_elements.CommandElement)({
    name: "MoveWithOnOff",
    id: 5,
    type: "Move",
    access: "O",
    conformance: "M",
    direction: "request",
    response: "status"
  }),
  (0, import_elements.CommandElement)({
    name: "StepWithOnOff",
    id: 6,
    type: "Step",
    access: "O",
    conformance: "M",
    direction: "request",
    response: "status"
  }),
  (0, import_elements.CommandElement)({
    name: "StopWithOnOff",
    id: 7,
    type: "Stop",
    access: "O",
    conformance: "M",
    direction: "request",
    response: "status"
  }),
  (0, import_elements.CommandElement)(
    {
      name: "MoveToClosestFrequency",
      id: 8,
      access: "O",
      conformance: "FQ",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "Frequency", id: 0, type: "uint16", conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "OptionsBitmap", type: "map8" },
    (0, import_elements.FieldElement)({ name: "ExecuteIfOff", constraint: "0" }),
    (0, import_elements.FieldElement)({ name: "CoupleColorTempToLevel", constraint: "1" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "MoveModeEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Up", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Down", id: 1, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "StepModeEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Up", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Down", id: 1, conformance: "M" })
  )
);
import_MatterDefinition.MatterDefinition.children.push(LevelControl);
//# sourceMappingURL=level-control.element.js.map
