"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 general_commissioning_element_exports = {};
__export(general_commissioning_element_exports, {
  GeneralCommissioning: () => GeneralCommissioning
});
module.exports = __toCommonJS(general_commissioning_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 GeneralCommissioning = (0, import_elements.ClusterElement)(
  { name: "GeneralCommissioning", id: 48, classification: "node" },
  (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: "TC", conformance: "O", constraint: "0", title: "TermsAndConditions" }),
    (0, import_elements.FieldElement)({ name: "NR", conformance: "P, O", constraint: "1", title: "NetworkRecovery" })
  ),
  (0, import_elements.AttributeElement)({ name: "Breadcrumb", id: 0, type: "uint64", access: "RW VA", conformance: "M", default: 0 }),
  (0, import_elements.AttributeElement)({
    name: "BasicCommissioningInfo",
    id: 1,
    type: "BasicCommissioningInfo",
    access: "R V",
    conformance: "M",
    constraint: "desc",
    quality: "F"
  }),
  (0, import_elements.AttributeElement)({
    name: "RegulatoryConfig",
    id: 2,
    type: "RegulatoryLocationTypeEnum",
    access: "R V",
    conformance: "M",
    default: { type: "reference", name: "LocationCapability" }
  }),
  (0, import_elements.AttributeElement)({
    name: "LocationCapability",
    id: 3,
    type: "RegulatoryLocationTypeEnum",
    access: "R V",
    conformance: "M",
    default: 2,
    quality: "F"
  }),
  (0, import_elements.AttributeElement)({
    name: "SupportsConcurrentConnection",
    id: 4,
    type: "bool",
    access: "R V",
    conformance: "M",
    default: true,
    quality: "F"
  }),
  (0, import_elements.AttributeElement)({ name: "TcAcceptedVersion", id: 5, type: "uint16", access: "R A", conformance: "TC", quality: "N" }),
  (0, import_elements.AttributeElement)({ name: "TcMinRequiredVersion", id: 6, type: "uint16", access: "R A", conformance: "TC", quality: "N" }),
  (0, import_elements.AttributeElement)({ name: "TcAcknowledgements", id: 7, type: "map16", access: "R A", conformance: "TC", quality: "N" }),
  (0, import_elements.AttributeElement)({
    name: "TcAcknowledgementsRequired",
    id: 8,
    type: "bool",
    access: "R A",
    conformance: "TC",
    default: true,
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({ name: "TcUpdateDeadline", id: 9, type: "uint32", access: "R A", conformance: "TC", quality: "X N" }),
  (0, import_elements.AttributeElement)({
    name: "RecoveryIdentifier",
    id: 10,
    type: "octstr",
    access: "R M",
    conformance: "P, NR",
    constraint: "8",
    default: { type: "bytes", value: "0" },
    quality: "N"
  }),
  (0, import_elements.AttributeElement)({
    name: "NetworkRecoveryReason",
    id: 11,
    type: "NetworkRecoveryReasonEnum",
    access: "R M",
    conformance: "P, NR",
    default: null,
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({ name: "IsCommissioningWithoutPower", id: 12, type: "bool", access: "R V", conformance: "P, O", default: false }),
  (0, import_elements.CommandElement)(
    {
      name: "ArmFailSafe",
      id: 0,
      access: "A",
      conformance: "M",
      direction: "request",
      response: "ArmFailSafeResponse"
    },
    (0, import_elements.FieldElement)({ name: "ExpiryLengthSeconds", id: 0, type: "uint16", conformance: "M", default: 900 }),
    (0, import_elements.FieldElement)({ name: "Breadcrumb", id: 1, type: "uint64", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    { name: "ArmFailSafeResponse", id: 1, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "ErrorCode", id: 0, type: "CommissioningErrorEnum", conformance: "M", default: 0 }),
    (0, import_elements.FieldElement)({ name: "DebugText", id: 1, type: "string", conformance: "M", constraint: "max 128" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "SetRegulatoryConfig",
      id: 2,
      access: "A",
      conformance: "M",
      direction: "request",
      response: "SetRegulatoryConfigResponse"
    },
    (0, import_elements.FieldElement)({ name: "NewRegulatoryConfig", id: 0, type: "RegulatoryLocationTypeEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "CountryCode", id: 1, type: "string", conformance: "M", constraint: "2" }),
    (0, import_elements.FieldElement)({ name: "Breadcrumb", id: 2, type: "uint64", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    { name: "SetRegulatoryConfigResponse", id: 3, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "ErrorCode", id: 0, type: "CommissioningErrorEnum", conformance: "M", default: 0 }),
    (0, import_elements.FieldElement)({ name: "DebugText", id: 1, type: "string", conformance: "M" })
  ),
  (0, import_elements.CommandElement)({
    name: "CommissioningComplete",
    id: 4,
    access: "F A",
    conformance: "M",
    direction: "request",
    response: "CommissioningCompleteResponse"
  }),
  (0, import_elements.CommandElement)(
    { name: "CommissioningCompleteResponse", id: 5, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "ErrorCode", id: 0, type: "CommissioningErrorEnum", conformance: "M", default: 0 }),
    (0, import_elements.FieldElement)({ name: "DebugText", id: 1, type: "string", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "SetTcAcknowledgements",
      id: 6,
      access: "A",
      conformance: "TC",
      direction: "request",
      response: "SetTcAcknowledgementsResponse"
    },
    (0, import_elements.FieldElement)({ name: "TcVersion", id: 0, type: "uint16", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "TcUserResponse", id: 1, type: "map16", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    { name: "SetTcAcknowledgementsResponse", id: 7, conformance: "TC", direction: "response" },
    (0, import_elements.FieldElement)({ name: "ErrorCode", id: 0, type: "CommissioningErrorEnum", conformance: "M", default: 0 })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "CommissioningErrorEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Ok", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ValueOutsideRange", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "InvalidAuthentication", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "NoFailSafe", id: 3, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "BusyWithOtherAdmin", id: 4, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "RequiredTcNotAccepted", id: 5, conformance: "TC" }),
    (0, import_elements.FieldElement)({ name: "TcAcknowledgementsNotReceived", id: 6, conformance: "TC" }),
    (0, import_elements.FieldElement)({ name: "TcMinVersionNotMet", id: 7, conformance: "TC" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "RegulatoryLocationTypeEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Indoor", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Outdoor", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "IndoorOutdoor", id: 2, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "NetworkRecoveryReasonEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Unspecified", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Auth", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Visibility", id: 2, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "BasicCommissioningInfo", type: "struct" },
    (0, import_elements.FieldElement)({ name: "FailSafeExpiryLengthSeconds", id: 0, type: "uint16", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "MaxCumulativeFailsafeSeconds", id: 1, type: "uint16", conformance: "M", constraint: "desc" })
  )
);
import_MatterDefinition.MatterDefinition.children.push(GeneralCommissioning);
//# sourceMappingURL=general-commissioning.element.js.map
