"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 network_commissioning_element_exports = {};
__export(network_commissioning_element_exports, {
  NetworkCommissioning: () => NetworkCommissioning
});
module.exports = __toCommonJS(network_commissioning_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 NetworkCommissioning = (0, import_elements.ClusterElement)(
  { name: "NetworkCommissioning", id: 49, 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: "WI", conformance: "O.a", constraint: "0", title: "WiFiNetworkInterface" }),
    (0, import_elements.FieldElement)({ name: "TH", conformance: "O.a", constraint: "1", title: "ThreadNetworkInterface" }),
    (0, import_elements.FieldElement)({ name: "ET", conformance: "O.a", constraint: "2", title: "EthernetNetworkInterface" })
  ),
  (0, import_elements.AttributeElement)({ name: "MaxNetworks", id: 0, type: "uint8", access: "R A", conformance: "M", constraint: "min 1", quality: "F" }),
  (0, import_elements.AttributeElement)(
    {
      name: "Networks",
      id: 1,
      type: "list",
      access: "R A",
      conformance: "M",
      constraint: "max maxNetworks",
      default: []
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "NetworkInfoStruct" })
  ),
  (0, import_elements.AttributeElement)({
    name: "ScanMaxTimeSeconds",
    id: 2,
    type: "uint8",
    access: "R V",
    conformance: "WI | TH",
    constraint: "desc",
    quality: "F"
  }),
  (0, import_elements.AttributeElement)({
    name: "ConnectMaxTimeSeconds",
    id: 3,
    type: "uint8",
    access: "R V",
    conformance: "WI | TH",
    constraint: "desc",
    quality: "F"
  }),
  (0, import_elements.AttributeElement)({ name: "InterfaceEnabled", id: 4, type: "bool", access: "RW VA", conformance: "M", default: true, quality: "N" }),
  (0, import_elements.AttributeElement)({
    name: "LastNetworkingStatus",
    id: 5,
    type: "NetworkCommissioningStatusEnum",
    access: "R A",
    conformance: "M",
    default: null,
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({
    name: "LastNetworkId",
    id: 6,
    type: "octstr",
    access: "R A",
    conformance: "M",
    constraint: "1 to 32",
    default: null,
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({
    name: "LastConnectErrorValue",
    id: 7,
    type: "int32",
    access: "R A",
    conformance: "M",
    default: null,
    quality: "X"
  }),
  (0, import_elements.AttributeElement)(
    {
      name: "SupportedWiFiBands",
      id: 8,
      type: "list",
      access: "R V",
      conformance: "WI",
      constraint: "min 1",
      quality: "F"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "WiFiBandEnum" })
  ),
  (0, import_elements.AttributeElement)({
    name: "SupportedThreadFeatures",
    id: 9,
    type: "ThreadCapabilitiesBitmap",
    access: "R V",
    conformance: "TH",
    quality: "F"
  }),
  (0, import_elements.AttributeElement)({ name: "ThreadVersion", id: 10, type: "uint16", access: "R V", conformance: "TH", quality: "F" }),
  (0, import_elements.CommandElement)(
    {
      name: "ScanNetworks",
      id: 0,
      access: "A",
      conformance: "WI | TH",
      direction: "request",
      response: "ScanNetworksResponse"
    },
    (0, import_elements.FieldElement)({
      name: "Ssid",
      id: 0,
      type: "octstr",
      conformance: "[WI]",
      constraint: "1 to 32",
      default: null,
      quality: "X"
    }),
    (0, import_elements.FieldElement)({ name: "Breadcrumb", id: 1, type: "uint64", conformance: "O" })
  ),
  (0, import_elements.CommandElement)(
    { name: "ScanNetworksResponse", id: 1, conformance: "WI | TH", direction: "response" },
    (0, import_elements.FieldElement)({
      name: "NetworkingStatus",
      id: 0,
      type: "NetworkCommissioningStatusEnum",
      conformance: "M",
      constraint: "desc"
    }),
    (0, import_elements.FieldElement)({ name: "DebugText", id: 1, type: "string", conformance: "O", constraint: "max 512" }),
    (0, import_elements.FieldElement)(
      { name: "WiFiScanResults", id: 2, type: "list", conformance: "WI", constraint: "desc" },
      (0, import_elements.FieldElement)({ name: "entry", type: "WiFiInterfaceScanResultStruct" })
    ),
    (0, import_elements.FieldElement)(
      { name: "ThreadScanResults", id: 3, type: "list", conformance: "TH", constraint: "desc" },
      (0, import_elements.FieldElement)({ name: "entry", type: "ThreadInterfaceScanResultStruct" })
    )
  ),
  (0, import_elements.CommandElement)(
    {
      name: "AddOrUpdateWiFiNetwork",
      id: 2,
      access: "A",
      conformance: "WI",
      direction: "request",
      response: "NetworkConfigResponse"
    },
    (0, import_elements.FieldElement)({ name: "Ssid", id: 0, type: "octstr", conformance: "M", constraint: "max 32" }),
    (0, import_elements.FieldElement)({ name: "Credentials", id: 1, type: "octstr", conformance: "M", constraint: "max 64" }),
    (0, import_elements.FieldElement)({ name: "Breadcrumb", id: 2, type: "uint64", conformance: "O" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "AddOrUpdateThreadNetwork",
      id: 3,
      access: "A",
      conformance: "TH",
      direction: "request",
      response: "NetworkConfigResponse"
    },
    (0, import_elements.FieldElement)({ name: "OperationalDataset", id: 0, type: "octstr", conformance: "M", constraint: "max 254" }),
    (0, import_elements.FieldElement)({ name: "Breadcrumb", id: 1, type: "uint64", conformance: "O" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "RemoveNetwork",
      id: 4,
      access: "A",
      conformance: "WI | TH",
      direction: "request",
      response: "NetworkConfigResponse"
    },
    (0, import_elements.FieldElement)({ name: "NetworkId", id: 0, type: "octstr", conformance: "M", constraint: "1 to 32" }),
    (0, import_elements.FieldElement)({ name: "Breadcrumb", id: 1, type: "uint64", conformance: "O" })
  ),
  (0, import_elements.CommandElement)(
    { name: "NetworkConfigResponse", id: 5, conformance: "WI | TH", direction: "response" },
    (0, import_elements.FieldElement)({
      name: "NetworkingStatus",
      id: 0,
      type: "NetworkCommissioningStatusEnum",
      conformance: "M",
      constraint: "desc"
    }),
    (0, import_elements.FieldElement)({ name: "DebugText", id: 1, type: "string", conformance: "O", constraint: "max 512" }),
    (0, import_elements.FieldElement)({
      name: "NetworkIndex",
      id: 2,
      type: "uint8",
      conformance: "NetworkingStatus == Success",
      constraint: "max maxNetworks - 1"
    })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "ConnectNetwork",
      id: 6,
      access: "A",
      conformance: "WI | TH",
      direction: "request",
      response: "ConnectNetworkResponse"
    },
    (0, import_elements.FieldElement)({ name: "NetworkId", id: 0, type: "octstr", conformance: "M", constraint: "1 to 32" }),
    (0, import_elements.FieldElement)({ name: "Breadcrumb", id: 1, type: "uint64", conformance: "O" })
  ),
  (0, import_elements.CommandElement)(
    { name: "ConnectNetworkResponse", id: 7, conformance: "WI | TH", direction: "response" },
    (0, import_elements.FieldElement)({ name: "NetworkingStatus", id: 0, type: "NetworkCommissioningStatusEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "DebugText", id: 1, type: "string", conformance: "O" }),
    (0, import_elements.FieldElement)({ name: "ErrorValue", id: 2, type: "int32", conformance: "M", quality: "X" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "ReorderNetwork",
      id: 8,
      access: "A",
      conformance: "WI | TH",
      direction: "request",
      response: "NetworkConfigResponse"
    },
    (0, import_elements.FieldElement)({ name: "NetworkId", id: 0, type: "octstr", conformance: "M", constraint: "1 to 32" }),
    (0, import_elements.FieldElement)({ name: "NetworkIndex", id: 1, type: "uint8", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "Breadcrumb", id: 2, type: "uint64", conformance: "O" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "WiFiSecurityBitmap", type: "map8" },
    (0, import_elements.FieldElement)({ name: "Unencrypted", constraint: "0" }),
    (0, import_elements.FieldElement)({ name: "Wep", constraint: "1" }),
    (0, import_elements.FieldElement)({ name: "WpaPersonal", constraint: "2" }),
    (0, import_elements.FieldElement)({ name: "Wpa2Personal", constraint: "3" }),
    (0, import_elements.FieldElement)({ name: "Wpa3Personal", constraint: "4" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "ThreadCapabilitiesBitmap", type: "map16" },
    (0, import_elements.FieldElement)({ name: "IsBorderRouterCapable", constraint: "0" }),
    (0, import_elements.FieldElement)({ name: "IsRouterCapable", constraint: "1" }),
    (0, import_elements.FieldElement)({ name: "IsSleepyEndDeviceCapable", constraint: "2" }),
    (0, import_elements.FieldElement)({ name: "IsFullThreadDevice", constraint: "3" }),
    (0, import_elements.FieldElement)({ name: "IsSynchronizedSleepyEndDeviceCapable", constraint: "4" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "WiFiBandEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "2G4", id: 0, conformance: "O.b+" }),
    (0, import_elements.FieldElement)({ name: "3G65", id: 1, conformance: "O.b+" }),
    (0, import_elements.FieldElement)({ name: "5G", id: 2, conformance: "O.b+" }),
    (0, import_elements.FieldElement)({ name: "6G", id: 3, conformance: "O.b+" }),
    (0, import_elements.FieldElement)({ name: "60G", id: 4, conformance: "O.b+" }),
    (0, import_elements.FieldElement)({ name: "1G", id: 5, conformance: "O.b+" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "NetworkCommissioningStatusEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Success", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "OutOfRange", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "BoundsExceeded", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "NetworkIdNotFound", id: 3, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "DuplicateNetworkId", id: 4, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "NetworkNotFound", id: 5, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "RegulatoryError", id: 6, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "AuthFailure", id: 7, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "UnsupportedSecurity", id: 8, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "OtherConnectionFailure", id: 9, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Ipv6Failed", id: 10, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "IpBindFailed", id: 11, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "UnknownError", id: 12, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "NetworkInfoStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "NetworkId", id: 0, type: "octstr", conformance: "M", constraint: "1 to 32" }),
    (0, import_elements.FieldElement)({ name: "Connected", id: 1, type: "bool", conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "WiFiInterfaceScanResultStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Security", id: 0, type: "WiFiSecurityBitmap", conformance: "WI" }),
    (0, import_elements.FieldElement)({ name: "Ssid", id: 1, type: "octstr", conformance: "WI", constraint: "max 32" }),
    (0, import_elements.FieldElement)({ name: "Bssid", id: 2, type: "octstr", conformance: "WI", constraint: "6" }),
    (0, import_elements.FieldElement)({ name: "Channel", id: 3, type: "uint16", conformance: "WI" }),
    (0, import_elements.FieldElement)({ name: "WiFiBand", id: 4, type: "WiFiBandEnum", conformance: "[WI]" }),
    (0, import_elements.FieldElement)({ name: "Rssi", id: 5, type: "int8", conformance: "[WI]" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "ThreadInterfaceScanResultStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "PanId", id: 0, type: "uint16", conformance: "TH", constraint: "max 65534" }),
    (0, import_elements.FieldElement)({ name: "ExtendedPanId", id: 1, type: "uint64", conformance: "TH" }),
    (0, import_elements.FieldElement)({ name: "NetworkName", id: 2, type: "string", conformance: "TH", constraint: "1 to 16" }),
    (0, import_elements.FieldElement)({ name: "Channel", id: 3, type: "uint16", conformance: "TH" }),
    (0, import_elements.FieldElement)({ name: "Version", id: 4, type: "uint8", conformance: "TH" }),
    (0, import_elements.FieldElement)({ name: "ExtendedAddress", id: 5, type: "hwadr", conformance: "TH" }),
    (0, import_elements.FieldElement)({ name: "Rssi", id: 6, type: "int8", conformance: "TH" }),
    (0, import_elements.FieldElement)({ name: "Lqi", id: 7, type: "uint8", conformance: "TH" })
  )
);
import_MatterDefinition.MatterDefinition.children.push(NetworkCommissioning);
//# sourceMappingURL=network-commissioning.element.js.map
