"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 camera_av_settings_user_level_management_element_exports = {};
__export(camera_av_settings_user_level_management_element_exports, {
  CameraAvSettingsUserLevelManagement: () => CameraAvSettingsUserLevelManagement
});
module.exports = __toCommonJS(camera_av_settings_user_level_management_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 CameraAvSettingsUserLevelManagement = (0, import_elements.ClusterElement)(
  { name: "CameraAvSettingsUserLevelManagement", id: 1362, 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: "DPTZ", conformance: "O.a+", constraint: "0", title: "DigitalPtz" }),
    (0, import_elements.FieldElement)({ name: "MPAN", conformance: "O.a+", constraint: "1", title: "MechanicalPan" }),
    (0, import_elements.FieldElement)({ name: "MTILT", conformance: "O.a+", constraint: "2", title: "MechanicalTilt" }),
    (0, import_elements.FieldElement)({ name: "MZOOM", conformance: "O.a+", constraint: "3", title: "MechanicalZoom" }),
    (0, import_elements.FieldElement)({ name: "MPRESETS", conformance: "[MPAN | MTILT | MZOOM]", constraint: "4", title: "MechanicalPresets" })
  ),
  (0, import_elements.AttributeElement)({
    name: "MptzPosition",
    id: 0,
    type: "MPTZStruct",
    access: "R V",
    conformance: "MPAN | MTILT | MZOOM",
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({ name: "MaxPresets", id: 1, type: "uint8", access: "R V", conformance: "MPRESETS", quality: "F" }),
  (0, import_elements.AttributeElement)(
    {
      name: "MptzPresets",
      id: 2,
      type: "list",
      access: "R V",
      conformance: "MPRESETS",
      constraint: "max maxPresets",
      quality: "N"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "MPTZPresetStruct" })
  ),
  (0, import_elements.AttributeElement)(
    { name: "DptzStreams", id: 3, type: "list", access: "R V", conformance: "DPTZ", quality: "N" },
    (0, import_elements.FieldElement)({ name: "entry", type: "DPTZStruct" })
  ),
  (0, import_elements.AttributeElement)({ name: "ZoomMax", id: 4, type: "uint8", access: "R V", conformance: "MZOOM", constraint: "2 to 100" }),
  (0, import_elements.AttributeElement)({ name: "TiltMin", id: 5, type: "int16", access: "R V", conformance: "MTILT", constraint: "-180 to 0" }),
  (0, import_elements.AttributeElement)({ name: "TiltMax", id: 6, type: "int16", access: "R V", conformance: "MTILT", constraint: "1 to 180" }),
  (0, import_elements.AttributeElement)({ name: "PanMin", id: 7, type: "int16", access: "R V", conformance: "MPAN", constraint: "-180 to 0" }),
  (0, import_elements.AttributeElement)({ name: "PanMax", id: 8, type: "int16", access: "R V", conformance: "MPAN", constraint: "1 to 180" }),
  (0, import_elements.AttributeElement)({
    name: "MovementState",
    id: 9,
    type: "PhysicalMovementEnum",
    access: "R V",
    conformance: "MPAN | MTILT | MZOOM"
  }),
  (0, import_elements.CommandElement)(
    {
      name: "MptzSetPosition",
      id: 0,
      access: "O",
      conformance: "MPAN | MTILT | MZOOM",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "Pan", id: 0, type: "int16", conformance: "[MPAN].b+", constraint: "panMin to panMax" }),
    (0, import_elements.FieldElement)({ name: "Tilt", id: 1, type: "int16", conformance: "[MTILT].b+", constraint: "tiltMin to tiltMax" }),
    (0, import_elements.FieldElement)({ name: "Zoom", id: 2, type: "uint8", conformance: "[MZOOM].b+", constraint: "1 to zoomMax" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "MptzRelativeMove",
      id: 1,
      access: "O",
      conformance: "MPAN | MTILT | MZOOM",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({
      name: "PanDelta",
      id: 0,
      type: "int16",
      conformance: "[MPAN].c+",
      constraint: "-1 * (panMax - panMin) to panMax - panMin",
      default: 0
    }),
    (0, import_elements.FieldElement)({
      name: "TiltDelta",
      id: 1,
      type: "int16",
      conformance: "[MTILT].c+",
      constraint: "-1 * (tiltMax - tiltMin) to tiltMax - tiltMin",
      default: 0
    }),
    (0, import_elements.FieldElement)({
      name: "ZoomDelta",
      id: 2,
      type: "int8",
      conformance: "[MZOOM].c+",
      constraint: "-1 * (zoomMax - 1) to zoomMax - 1",
      default: 0
    })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "MptzMoveToPreset",
      id: 2,
      access: "O",
      conformance: "MPRESETS",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "PresetId", id: 0, type: "uint8", conformance: "M", constraint: "1 to maxPresets" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "MptzSavePreset",
      id: 3,
      access: "O",
      conformance: "MPRESETS",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "PresetId", id: 0, type: "uint8", conformance: "O", constraint: "1 to maxPresets" }),
    (0, import_elements.FieldElement)({ name: "Name", id: 1, type: "string", conformance: "M", constraint: "max 32" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "MptzRemovePreset",
      id: 4,
      access: "O",
      conformance: "MPRESETS",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "PresetId", id: 0, type: "uint8", conformance: "M", constraint: "1 to maxPresets" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "DptzSetViewport",
      id: 5,
      access: "O",
      conformance: "DPTZ",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "VideoStreamId", id: 0, type: "CameraAvStreamManagement.VideoStreamID", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Viewport", id: 1, type: "ViewportStruct", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "DptzRelativeMove",
      id: 6,
      access: "O",
      conformance: "[DPTZ]",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "VideoStreamId", id: 0, type: "CameraAvStreamManagement.VideoStreamID", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "DeltaX", id: 1, type: "int16", conformance: "O.d+", default: 0 }),
    (0, import_elements.FieldElement)({ name: "DeltaY", id: 2, type: "int16", conformance: "O.d+", default: 0 }),
    (0, import_elements.FieldElement)({ name: "ZoomDelta", id: 3, type: "int8", conformance: "O.d+", constraint: "-100 to 100", default: 0 })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "PhysicalMovementEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Idle", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Moving", id: 1, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "DPTZStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "VideoStreamId", id: 0, type: "CameraAvStreamManagement.VideoStreamID", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Viewport", id: 1, type: "ViewportStruct", conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "MPTZStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Pan", id: 0, type: "int16", conformance: "MPAN", constraint: "panMin to panMax" }),
    (0, import_elements.FieldElement)({ name: "Tilt", id: 1, type: "int16", conformance: "MTILT", constraint: "tiltMin to tiltMax" }),
    (0, import_elements.FieldElement)({ name: "Zoom", id: 2, type: "uint8", conformance: "MZOOM", constraint: "1 to zoomMax" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "MPTZPresetStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "PresetId", id: 0, type: "uint8", conformance: "M", constraint: "1 to maxPresets" }),
    (0, import_elements.FieldElement)({ name: "Name", id: 1, type: "string", conformance: "M", constraint: "max 32" }),
    (0, import_elements.FieldElement)({ name: "Settings", id: 2, type: "MPTZStruct", conformance: "M" })
  )
);
import_MatterDefinition.MatterDefinition.children.push(CameraAvSettingsUserLevelManagement);
//# sourceMappingURL=camera-av-settings-user-level-management.element.js.map
