"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_exports = {};
__export(network_commissioning_exports, {
  NetworkCommissioning: () => NetworkCommissioning,
  NetworkCommissioningCluster: () => NetworkCommissioningCluster
});
module.exports = __toCommonJS(network_commissioning_exports);
var import_MutableCluster = require("../cluster/mutation/MutableCluster.js");
var import_Cluster = require("../cluster/Cluster.js");
var import_TlvNumber = require("../tlv/TlvNumber.js");
var import_TlvObject = require("../tlv/TlvObject.js");
var import_TlvString = require("../tlv/TlvString.js");
var import_TlvNullable = require("../tlv/TlvNullable.js");
var import_TlvArray = require("../tlv/TlvArray.js");
var import_BitmapSchema = require("../schema/BitmapSchema.js");
var import_model = require("#model");
var import_TlvBoolean = require("../tlv/TlvBoolean.js");
var import_ClusterRegistry = require("../cluster/ClusterRegistry.js");
/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
var NetworkCommissioning;
((NetworkCommissioning2) => {
  let Feature;
  ((Feature2) => {
    Feature2["WiFiNetworkInterface"] = "WiFiNetworkInterface";
    Feature2["ThreadNetworkInterface"] = "ThreadNetworkInterface";
    Feature2["EthernetNetworkInterface"] = "EthernetNetworkInterface";
  })(Feature = NetworkCommissioning2.Feature || (NetworkCommissioning2.Feature = {}));
  NetworkCommissioning2.TlvScanNetworksRequest = (0, import_TlvObject.TlvObject)({
    /**
     * This field, if present, shall contain the SSID for a directed scan of that particular Wi-Fi SSID. Otherwise,
     * if the field is absent, or if it is null, this shall indicate scanning of all BSSIDinrange. This field shall
     * be ignored for ScanNetworks invocations on non-Wi-Fi server instances.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.1.1
     */
    ssid: (0, import_TlvObject.TlvOptionalField)(0, (0, import_TlvNullable.TlvNullable)(import_TlvString.TlvByteString.bound({ minLength: 1, maxLength: 32 }))),
    /**
     * The Breadcrumb field, if present, shall be used to atomically set the Breadcrumb attribute in the General
     * Commissioning cluster on success of the associated command. If the command fails, the Breadcrumb attribute in
     * the General Commissioning cluster shall be left unchanged.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.1.2
     */
    breadcrumb: (0, import_TlvObject.TlvOptionalField)(1, import_TlvNumber.TlvUInt64)
  });
  let NetworkCommissioningStatus;
  ((NetworkCommissioningStatus2) => {
    NetworkCommissioningStatus2[NetworkCommissioningStatus2["Success"] = 0] = "Success";
    NetworkCommissioningStatus2[NetworkCommissioningStatus2["OutOfRange"] = 1] = "OutOfRange";
    NetworkCommissioningStatus2[NetworkCommissioningStatus2["BoundsExceeded"] = 2] = "BoundsExceeded";
    NetworkCommissioningStatus2[NetworkCommissioningStatus2["NetworkIdNotFound"] = 3] = "NetworkIdNotFound";
    NetworkCommissioningStatus2[NetworkCommissioningStatus2["DuplicateNetworkId"] = 4] = "DuplicateNetworkId";
    NetworkCommissioningStatus2[NetworkCommissioningStatus2["NetworkNotFound"] = 5] = "NetworkNotFound";
    NetworkCommissioningStatus2[NetworkCommissioningStatus2["RegulatoryError"] = 6] = "RegulatoryError";
    NetworkCommissioningStatus2[NetworkCommissioningStatus2["AuthFailure"] = 7] = "AuthFailure";
    NetworkCommissioningStatus2[NetworkCommissioningStatus2["UnsupportedSecurity"] = 8] = "UnsupportedSecurity";
    NetworkCommissioningStatus2[NetworkCommissioningStatus2["OtherConnectionFailure"] = 9] = "OtherConnectionFailure";
    NetworkCommissioningStatus2[NetworkCommissioningStatus2["Ipv6Failed"] = 10] = "Ipv6Failed";
    NetworkCommissioningStatus2[NetworkCommissioningStatus2["IpBindFailed"] = 11] = "IpBindFailed";
    NetworkCommissioningStatus2[NetworkCommissioningStatus2["UnknownError"] = 12] = "UnknownError";
  })(NetworkCommissioningStatus = NetworkCommissioning2.NetworkCommissioningStatus || (NetworkCommissioning2.NetworkCommissioningStatus = {}));
  NetworkCommissioning2.WiFiSecurity = {
    /**
     * Supports unencrypted Wi-Fi
     */
    unencrypted: (0, import_BitmapSchema.BitFlag)(0),
    /**
     * Supports Wi-Fi using WEP security
     */
    wep: (0, import_BitmapSchema.BitFlag)(1),
    /**
     * Supports Wi-Fi using WPA-Personal security
     */
    wpaPersonal: (0, import_BitmapSchema.BitFlag)(2),
    /**
     * Supports Wi-Fi using WPA2-Personal security
     */
    wpa2Personal: (0, import_BitmapSchema.BitFlag)(3),
    /**
     * Supports Wi-Fi using WPA3-Personal security
     */
    wpa3Personal: (0, import_BitmapSchema.BitFlag)(4)
  };
  let WiFiBand;
  ((WiFiBand2) => {
    WiFiBand2[WiFiBand2["2G4"] = 0] = "2G4";
    WiFiBand2[WiFiBand2["3G65"] = 1] = "3G65";
    WiFiBand2[WiFiBand2["5G"] = 2] = "5G";
    WiFiBand2[WiFiBand2["6G"] = 3] = "6G";
    WiFiBand2[WiFiBand2["60G"] = 4] = "60G";
    WiFiBand2[WiFiBand2["1G"] = 5] = "1G";
  })(WiFiBand = NetworkCommissioning2.WiFiBand || (NetworkCommissioning2.WiFiBand = {}));
  NetworkCommissioning2.TlvWiFiInterfaceScanResult = (0, import_TlvObject.TlvObject)({
    security: (0, import_TlvObject.TlvOptionalField)(0, (0, import_TlvNumber.TlvBitmap)(import_TlvNumber.TlvUInt8, NetworkCommissioning2.WiFiSecurity)),
    ssid: (0, import_TlvObject.TlvOptionalField)(1, import_TlvString.TlvByteString.bound({ maxLength: 32 })),
    bssid: (0, import_TlvObject.TlvOptionalField)(2, import_TlvString.TlvByteString.bound({ length: 6 })),
    channel: (0, import_TlvObject.TlvOptionalField)(3, import_TlvNumber.TlvUInt16),
    /**
     * This field, if present, may be used to differentiate overlapping channel number values across different Wi-Fi
     * frequency bands.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.5.6.1
     */
    wiFiBand: (0, import_TlvObject.TlvOptionalField)(4, (0, import_TlvNumber.TlvEnum)()),
    /**
     * This field, if present, shall denote the signal strength in dBm of the associated scan result.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.5.6.2
     */
    rssi: (0, import_TlvObject.TlvOptionalField)(5, import_TlvNumber.TlvInt8)
  });
  NetworkCommissioning2.TlvThreadInterfaceScanResult = (0, import_TlvObject.TlvObject)({
    panId: (0, import_TlvObject.TlvOptionalField)(0, import_TlvNumber.TlvUInt16.bound({ max: 65534 })),
    extendedPanId: (0, import_TlvObject.TlvOptionalField)(1, import_TlvNumber.TlvUInt64),
    networkName: (0, import_TlvObject.TlvOptionalField)(2, import_TlvString.TlvString.bound({ minLength: 1, maxLength: 16 })),
    channel: (0, import_TlvObject.TlvOptionalField)(3, import_TlvNumber.TlvUInt16),
    version: (0, import_TlvObject.TlvOptionalField)(4, import_TlvNumber.TlvUInt8),
    /**
     * ExtendedAddress stands for an IEEE 802.15.4 Extended Address.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.5.7.1
     */
    extendedAddress: (0, import_TlvObject.TlvOptionalField)(5, import_TlvString.TlvByteString),
    rssi: (0, import_TlvObject.TlvOptionalField)(6, import_TlvNumber.TlvInt8),
    lqi: (0, import_TlvObject.TlvOptionalField)(7, import_TlvNumber.TlvUInt8)
  });
  NetworkCommissioning2.TlvScanNetworksResponse = (0, import_TlvObject.TlvObject)({
    /**
     * The NetworkingStatus field shall indicate the status of the last scan operation, taking one of these values:
     *
     *   - Success: Scanning succeeded.
     *
     *   - NetworkNotFound: No instance of an explicitly-provided network identifier was found during the scan. This
     *     error cannot occur if no network identifier was provided, such as when scanning for all available
     *     networks.
     *
     *   - OutOfRange: Network identifier was invalid (e.g. empty, too long, etc).
     *
     *   - RegulatoryError: Could not scan on any bands due to lack of regulatory configuration.
     *
     *   - UnknownError: An internal error occurred during scanning.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.2.1
     */
    networkingStatus: (0, import_TlvObject.TlvField)(0, (0, import_TlvNumber.TlvEnum)()),
    /**
     * This field, if present and non-empty, may contain error information which may be communicated to the user in
     * case the NetworkingStatus was not Success. Its purpose is to help developers in troubleshooting errors and
     * may go into logs or crash reports.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.2.2
     */
    debugText: (0, import_TlvObject.TlvOptionalField)(1, import_TlvString.TlvString.bound({ maxLength: 512 })),
    /**
     * If NetworkingStatus was Success, this field shall contain the Wi-Fi network scan results. The list may be
     * empty if none were found in range on the bands supported by the interface, or if directed scanning had been
     * used and the desired SSID was not found in range.
     *
     * The maximum number of results present in the result list supported may depend on memory and may contain a
     * subset of possibilities, to avoid memory exhaustion on the cluster server and avoid crossing the maximum
     * command response size supported (see Section 4.4.4, “Message Size Requirements”).
     *
     * The order in which results are reported is implementation-specific. Results SHOULD be reported in decreasing
     * RSSI order, even if RSSI is not reported in the response, to maximize the likelihood that most likely to be
     * reachable elements are included within the size limits of the response.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.2.3
     */
    wiFiScanResults: (0, import_TlvObject.TlvOptionalField)(2, (0, import_TlvArray.TlvArray)(NetworkCommissioning2.TlvWiFiInterfaceScanResult)),
    /**
     * If NetworkingStatus was Success, this field shall contain the Thread network scan results. The list may be
     * empty if none were found in range on the bands supported by the interface.
     *
     * The maximum number of results present in the result list supported may depend on memory and may contain a
     * subset of possibilities, to avoid memory exhaustion on the cluster server and avoid crossing the maximum
     * command response size supported (see Section 4.4.4, “Message Size Requirements”).
     *
     * The order in which results are reported is implementation-specific. Results SHOULD be reported in decreasing
     * LQI order, to maximize the likelihood that most likely to be reachable elements are included within the size
     * limits of the response.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.2.4
     */
    threadScanResults: (0, import_TlvObject.TlvOptionalField)(3, (0, import_TlvArray.TlvArray)(NetworkCommissioning2.TlvThreadInterfaceScanResult))
  });
  NetworkCommissioning2.TlvRemoveNetworkRequest = (0, import_TlvObject.TlvObject)({
    /**
     * This field shall contain the NetworkID for the entry to remove: the SSID for Wi-Fi and XPAN ID for Thread.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.6.1
     */
    networkId: (0, import_TlvObject.TlvField)(0, import_TlvString.TlvByteString.bound({ minLength: 1, maxLength: 32 })),
    /**
     * See Section 11.9.7.1.2, “Breadcrumb Field” for usage.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.6.2
     */
    breadcrumb: (0, import_TlvObject.TlvOptionalField)(1, import_TlvNumber.TlvUInt64)
  });
  NetworkCommissioning2.TlvNetworkConfigResponse = (0, import_TlvObject.TlvObject)({
    /**
     * The NetworkingStatus field shall indicate the status of the last operation attempting to modify the Networks
     * attribute configuration, taking one of these values:
     *
     *   - Success: Operation succeeded.
     *
     *   - OutOfRange: Network identifier was invalid (e.g. empty, too long, etc).
     *
     *   - BoundsExceeded: Adding this network configuration would exceed the limit defined by MaxNetworks.
     *
     *   - NetworkIdNotFound: The network identifier was expected to be found, but was not found among the added
     *     network configurations in Networks attribute.
     *
     *   - UnknownError: An internal error occurred during the operation.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.7.1
     */
    networkingStatus: (0, import_TlvObject.TlvField)(0, (0, import_TlvNumber.TlvEnum)()),
    /**
     * See Section 11.9.7.2.2, “DebugText Field” for usage.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.7.2
     */
    debugText: (0, import_TlvObject.TlvOptionalField)(1, import_TlvString.TlvString.bound({ maxLength: 512 })),
    /**
     * This field shall contain the 0-based index of the entry in the Networks attribute that was last added,
     * updated or removed successfully by the associated request command.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.7.3
     */
    networkIndex: (0, import_TlvObject.TlvOptionalField)(2, import_TlvNumber.TlvUInt8)
  });
  NetworkCommissioning2.TlvConnectNetworkRequest = (0, import_TlvObject.TlvObject)({
    /**
     * This field shall contain the NetworkID for the entry used to configure the connection: the SSID for Wi-Fi and
     * XPAN ID for Thread.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.8.1
     */
    networkId: (0, import_TlvObject.TlvField)(0, import_TlvString.TlvByteString.bound({ minLength: 1, maxLength: 32 })),
    /**
     * See Section 11.9.7.1.2, “Breadcrumb Field” for usage.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.8.2
     */
    breadcrumb: (0, import_TlvObject.TlvOptionalField)(1, import_TlvNumber.TlvUInt64)
  });
  NetworkCommissioning2.TlvConnectNetworkResponse = (0, import_TlvObject.TlvObject)({
    /**
     * The NetworkingStatus field shall indicate the status of the last connection attempt, taking one of these
     * values:
     *
     *   - Success: Connection succeeded.
     *
     *   - NetworkNotFound: No instance of an explicitly-provided network identifier was found during the attempt to
     *     join the network.
     *
     *   - OutOfRange: Network identifier was invalid (e.g. empty, too long, etc).
     *
     *   - NetworkIdNotFound: The network identifier was not found among the added network configurations in
     *     Networks attribute.
     *
     *   - RegulatoryError: Could not connect to a network due to lack of regulatory configuration.
     *
     *   - UnknownError: An internal error occurred during the operation.
     *
     *   - Association errors (see also description of errors in NetworkCommissioningStatusEnum): AuthFailure,
     *     UnsupportedSecurity, OtherConnectionFailure, IPV6Failed, IPBindFailed
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.9.1
     */
    networkingStatus: (0, import_TlvObject.TlvField)(0, (0, import_TlvNumber.TlvEnum)()),
    /**
     * See Section 11.9.7.2.2, “DebugText Field” for usage.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.9.2
     */
    debugText: (0, import_TlvObject.TlvOptionalField)(1, import_TlvString.TlvString),
    /**
     *   - ErrorValue interpretation for Wi-Fi association errors:
     *
     *     - On any association failure during enabling of a network, the ErrorValue field shall be set to the
     *       Status Code value that was present in the last frame related to association where Status Code was not
     *       equal to zero and which caused the failure of a final retry attempt, if this final failure was due to
     *       one of the following Management frames:
     *
     *       - Association Response (Type 0, Subtype 1)
     *
     *       - Reassociation Response (Type 0, Subtype 3)
     *
     *       - Authentication (Type 0, Subtype 11)
     *
     *     - Table 9-50 "Status Codes" in IEEE 802.11-2020 contains a description of all values possible, which can
     *       unambiguously be used to determine the cause, such as an invalid security type, unsupported rate, etc.
     *
     *   - Otherwise, the ErrorValue field shall contain an implementation-dependent value which may be used by a
     *     reader of the structure to record, report or diagnose the failure.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.9.3
     */
    errorValue: (0, import_TlvObject.TlvField)(2, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvInt32))
  });
  NetworkCommissioning2.TlvReorderNetworkRequest = (0, import_TlvObject.TlvObject)({
    /**
     * This field shall contain the NetworkID for the entry to reorder: the SSID for Wi-Fi and XPAN ID for Thread.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.10.1
     */
    networkId: (0, import_TlvObject.TlvField)(0, import_TlvString.TlvByteString.bound({ minLength: 1, maxLength: 32 })),
    /**
     * This field shall contain the 0-based index of the new desired position of the entry in the Networks
     * attribute.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.10.2
     */
    networkIndex: (0, import_TlvObject.TlvField)(1, import_TlvNumber.TlvUInt8),
    /**
     * See Section 11.9.7.1.2, “Breadcrumb Field” for usage.
     *
     * ### Effect when received
     *
     * If the Networks attribute does not contain a matching entry, the command shall immediately respond with
     * NetworkConfigResponse having NetworkingStatus status field set to NetworkIdNotFound.
     *
     * If the NetworkIndex field has a value larger or equal to the current number of entries in the Networks
     * attribute, the command shall immediately respond with NetworkConfigResponse having NetworkingStatus status
     * field set to OutOfRange.
     *
     * On success, the NetworkConfigResponse command shall have its NetworkIndex field set to the 0-based index of
     * the entry in the Networks attribute that was just updated, matching the incoming NetworkIndex, and a
     * NetworkingStatus status field set to Success.
     *
     * The entry selected shall be inserted at the new position in the list. All other entries, if any exist, shall
     * be moved to allow the insertion, in a way that they all retain their existing relative order between each
     * other, with the exception of the newly re-ordered entry.
     *
     * Re-ordering to the same NetworkIndex as the current location shall be considered as a success and yield no
     * visible changes of the Networks attribute.
     *
     * ### Examples of re-ordering
     *
     * To better illustrate the re-ordering operation, consider this initial state, exemplary of a Wi-Fi device:
     *
     * On receiving ReorderNetwork with:
     *
     *   - NetworkID = Home-Guest
     *
     *   - NetworkIndex = 0
     *
     * The outcome, after applying to the initial state would be:
     *
     * In the above outcome, FancyCat and BlueDolphin moved "down" and Home-Guest became the highest priority
     * network in the list.
     *
     * On receiving ReorderNetwork with:
     *
     *   - NetworkID = FancyCat
     *
     *   - NetworkIndex = 3
     *
     * The outcome, after applying to the initial state would be:
     *
     * In the above outcome, BlueDolphin, Home-Guest and WillowTree moved "up" and FancyCat became the lowest
     * priority network in the list.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.10.3
     */
    breadcrumb: (0, import_TlvObject.TlvOptionalField)(2, import_TlvNumber.TlvUInt64)
  });
  NetworkCommissioning2.TlvAddOrUpdateWiFiNetworkRequest = (0, import_TlvObject.TlvObject)({
    /**
     * This field shall contain the SSID to which to attempt connection. Specific BSSID selection is not supported
     * by this cluster.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.3.1
     */
    ssid: (0, import_TlvObject.TlvField)(0, import_TlvString.TlvByteString.bound({ maxLength: 32 })),
    /**
     * Credentials is the passphrase or PSK for the network (if any is needed).
     *
     * Security type, cipher and credential format (passphrase or PSK) shall be contextually auto-selected during
     * execution of the ConnectNetwork command and during subsequent operational state network connections, based on
     * the most secure Wi-Fi security type available within beacons and probe responses for the set of all
     * discovered BSSIDs for the configured SSID. The type of PSK or passphrase used shall be inferred based on the
     * length and contents of the Credentials field provided, matching the security type chosen.
     *
     * Valid Credentials length are:
     *
     *   - 0 bytes: Unsecured (open) connection
     *
     *   - 5 bytes: WEP-64 passphrase
     *
     *   - 10 hexadecimal ASCII characters: WEP-64 40-bit hex raw PSK
     *
     *   - 13 bytes: WEP-128 passphrase
     *
     *   - 26 hexadecimal ASCII characters: WEP-128 104-bit hex raw PSK
     *
     *   - 8..63 bytes: WPA/WPA2/WPA3 passphrase
     *
     *   - 64 bytes: WPA/WPA2/WPA3 raw hex PSK These lengths shall be contextually interpreted based on the security
     *     type of the BSSID where connection will occur.
     *
     * When the length of Credentials and available set of BSSID admits more than one option, such as the presence
     * of both WPA2 and WPA security type within the result set, WPA2 shall be considered more secure.
     *
     * Note that it may occur that a station cannot connect to a particular access point with higher security and
     * selects a lower security connectivity type if the link quality is deemed to be too low to achieve successful
     * operation, or if all retry attempts fail.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.3.2
     */
    credentials: (0, import_TlvObject.TlvField)(1, import_TlvString.TlvByteString.bound({ maxLength: 64 })),
    /**
     * See Section 11.9.7.1.2, “Breadcrumb Field” for usage.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.3.3
     */
    breadcrumb: (0, import_TlvObject.TlvOptionalField)(2, import_TlvNumber.TlvUInt64)
  });
  NetworkCommissioning2.ThreadCapabilities = {
    /**
     * Thread Border Router functionality is present
     */
    isBorderRouterCapable: (0, import_BitmapSchema.BitFlag)(0),
    /**
     * Router mode is supported (interface could be in router or REED mode)
     */
    isRouterCapable: (0, import_BitmapSchema.BitFlag)(1),
    /**
     * Sleepy end-device mode is supported
     */
    isSleepyEndDeviceCapable: (0, import_BitmapSchema.BitFlag)(2),
    /**
     * Device is a full Thread device (opposite of Minimal Thread Device)
     */
    isFullThreadDevice: (0, import_BitmapSchema.BitFlag)(3),
    /**
     * Synchronized sleepy end-device mode is supported
     */
    isSynchronizedSleepyEndDeviceCapable: (0, import_BitmapSchema.BitFlag)(4)
  };
  NetworkCommissioning2.TlvAddOrUpdateThreadNetworkRequest = (0, import_TlvObject.TlvObject)({
    /**
     * The OperationalDataset field shall contain the Thread Network Parameters, including channel, PAN ID, and
     * Extended PAN ID.
     *
     * The encoding for the OperationalDataset field is defined in the Thread specification.
     *
     * The client shall pass the OperationalDataset as an opaque octet string.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.4.1
     */
    operationalDataset: (0, import_TlvObject.TlvField)(0, import_TlvString.TlvByteString.bound({ maxLength: 254 })),
    /**
     * See Section 11.9.7.1.2, “Breadcrumb Field” for usage.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.7.4.2
     */
    breadcrumb: (0, import_TlvObject.TlvOptionalField)(1, import_TlvNumber.TlvUInt64)
  });
  NetworkCommissioning2.TlvNetworkInfo = (0, import_TlvObject.TlvObject)({
    /**
     * Every network is uniquely identified (for purposes of commissioning) by a NetworkID mapping to the following
     * technology-specific properties:
     *
     *   - SSID for Wi-Fi
     *
     *   - Extended PAN ID for Thread
     *
     *   - Network interface instance name at operating system (or equivalent unique name) for Ethernet.
     *
     * The semantics of the NetworkID field therefore varies between network types accordingly. It contains SSID for
     * Wi-Fi networks, Extended PAN ID (XPAN ID) for Thread networks and netif name for Ethernet networks.
     *
     * > [!NOTE]
     *
     * > SSID in Wi-Fi is a collection of 1-32 bytes, the text encoding of which is not specified. Implementations
     *   must be careful to support reporting byte strings without requiring a particular encoding for transfer.
     *   Only the commissioner should try to potentially decode the bytes. The most common encoding is UTF-8,
     *   however this is just a convention. Some configurations may use Latin-1 or other character sets. A
     *   commissioner may decode using UTF-8, replacing encoding errors with "?" at the application level while
     *   retaining the underlying representation.
     *
     * XPAN ID is a big-endian 64-bit unsigned number, represented on the first 8 octets of the octet string.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.5.5.1
     */
    networkId: (0, import_TlvObject.TlvField)(0, import_TlvString.TlvByteString.bound({ minLength: 1, maxLength: 32 })),
    /**
     * This field shall indicate the connected status of the associated network, where "connected" means currently
     * linked to the network technology (e.g. Associated for a Wi-Fi network, media connected for an Ethernet
     * network).
     *
     * @see {@link MatterSpecification.v142.Core} § 11.9.5.5.2
     */
    connected: (0, import_TlvObject.TlvField)(1, import_TlvBoolean.TlvBoolean)
  });
  NetworkCommissioning2.WiFiNetworkInterfaceOrThreadNetworkInterfaceComponent = import_MutableCluster.MutableCluster.Component({
    attributes: {
      /**
       * Indicates the maximum duration taken, in seconds, by the network interface on this cluster server
       * instance to provide scan results.
       *
       * See Section 11.9.7.1, “ScanNetworks Command” for usage.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.6.3
       */
      scanMaxTimeSeconds: (0, import_Cluster.FixedAttribute)(2, import_TlvNumber.TlvUInt8),
      /**
       * Indicates the maximum duration taken, in seconds, by the network interface on this cluster server
       * instance to report a successful or failed network connection indication. This maximum time shall account
       * for all operations needed until a successful network connection is deemed to have occurred, including,
       * for example, obtaining IP addresses, or the execution of necessary internal retries.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.6.4
       */
      connectMaxTimeSeconds: (0, import_Cluster.FixedAttribute)(3, import_TlvNumber.TlvUInt8)
    },
    commands: {
      /**
       * This command is used to scan for available networks on the network interface associated with the cluster
       * instance.
       *
       * This command shall scan on the Cluster instance’s associated network interface for either of:
       *
       *   - All available networks (non-directed scanning)
       *
       *   - Specific networks (directed scanning)
       *
       * Scanning for available networks detects all networks of the type corresponding to the cluster server
       * instance’s associated network interface that are possible to join, such as all visible Wi-Fi access
       * points for Wi-Fi cluster server instances, all Thread PANs for Thread cluster server instances, within
       * bounds of the maximum response size.
       *
       * Scanning for a specific network (i.e. directed scanning) takes place if a network identifier (e.g. Wi-Fi
       * SSID) is provided in the command arguments. Directed scanning shall restrict the result set to the
       * specified network only.
       *
       * If this command is received without an armed fail-safe context (see Section 11.10.7.2, “ArmFailSafe
       * Command”), then this command shall fail with a FAILSAFE_REQUIRED status code sent back to the initiator.
       *
       * The client shall NOT expect the server to be done scanning and have responded with ScanNetworksResponse
       * before ScanMaxTimeSeconds seconds have elapsed. Enough transport time affordances for retries SHOULD be
       * expected before a client determines the operation to have timed-out.
       *
       * This command shall fail with a status code of BUSY if the server determines that it will fail to reliably
       * send a response due to changes of networking interface configuration at runtime for the interface over
       * which the command was invoked, or if it is currently unable to proceed with such an operation.
       *
       * For Wi-Fi-supporting servers (WI feature) the server shall always honor directed scans, and attempt to
       * provide all matching BSSID which are reachable on the bands which would otherwise be attempted if a
       * ConnectNetwork having the specified SSID were to take place. This command is useful for clients to
       * determine reachability capabilities as seen by the server’s own radios.
       *
       * For Wi-Fi-supporting servers the server shall always scan on all bands supported by the interface
       * associated with the cluster instance on which the command was invoked.
       *
       * If the command was invoked over the same link whose configuration is managed by a given server cluster
       * instance, there may be an impact on other communication from the invoking client, as well as other
       * clients, while the network interface is processing the scan. Clients SHOULD NOT use this command unless
       * actively in the process of re-configuring network connectivity.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.7.1
       */
      scanNetworks: (0, import_Cluster.Command)(
        0,
        NetworkCommissioning2.TlvScanNetworksRequest,
        1,
        NetworkCommissioning2.TlvScanNetworksResponse,
        { invokeAcl: import_model.AccessLevel.Administer }
      ),
      /**
       * This command is used to remove a network configuration on the network interface associated with the
       * cluster instance.
       *
       * This command shall remove the network configuration from the Cluster if there was already a network
       * configuration with the same NetworkID. The relative order of the entries in the Networks attribute shall
       * remain unchanged, except for the removal of the requested network configuration.
       *
       * If this command is received without an armed fail-safe context (see Section 11.10.7.2, “ArmFailSafe
       * Command”), then this command shall fail with a FAILSAFE_REQUIRED status code sent back to the initiator.
       *
       * If the Networks attribute does not contain a matching entry, the command shall immediately respond with
       * NetworkConfigResponse having NetworkingStatus status field set to NetworkIdNotFound.
       *
       * On success, the NetworkConfigResponse command shall have its NetworkIndex field set to the 0-based index
       * of the entry in the Networks attribute that was just removed, and a NetworkingStatus status field set to
       * Success.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.7.6
       */
      removeNetwork: (0, import_Cluster.Command)(
        4,
        NetworkCommissioning2.TlvRemoveNetworkRequest,
        5,
        NetworkCommissioning2.TlvNetworkConfigResponse,
        { invokeAcl: import_model.AccessLevel.Administer }
      ),
      /**
       * This command is used to connect to a network on the network interface associated with the cluster
       * instance.
       *
       * This command shall attempt to connect to a network whose configuration was previously added by either the
       * AddOrUpdateWiFiNetwork or AddOrUpdateThreadNetwork commands. Network is identified by its NetworkID.
       *
       * This command shall fail with a BUSY status code returned to the initiator if the server is currently
       * unable to proceed with such an operation, such as if it is currently attempting to connect in the
       * background, or is already proceeding with a prior ConnectNetwork.
       *
       * If this command is received without an armed fail-safe context (see Section 11.10.7.2, “ArmFailSafe
       * Command”), then this command shall fail with a FAILSAFE_REQUIRED status code sent back to the initiator.
       *
       * Before connecting to the new network, the Node shall disconnect the operational network connections
       * managed by any other Network Commissioning cluster instances (whether under the Root Node or a Secondary
       * Network Interface), where those connections are not represented by an entry in the Networks attribute of
       * the corresponding cluster instance. This ensures that an Administrator or Commissioner can reliably
       * reconfigure the operational network connection of a device that has one or more Secondary Network
       * interfaces, for example by removing the active network configuration from one cluster instance, followed
       * by adding a new configuration and calling ConnectNetwork on a different cluster instance.
       *
       * Success or failure of this command shall be communicated by the ConnectNetworkResponse command, unless
       * some data model validations caused a FAILURE status to be sent prior to finishing execution of the
       * command. The ConnectNetworkResponse shall indicate the value Success in the NetworkingStatus field on
       * successful connection. On failure to connect, the ConnectNetworkResponse shall contain an appropriate
       * NetworkingStatus, DebugText and ErrorValue indicating the reason for failure.
       *
       * The amount of time needed to determine successful or failing connectivity on the cluster server’s
       * associated interface is provided by the ConnectMaxTimeSeconds attribute. Clients shall NOT consider the
       * connection to have timed-out until at least that duration has taken place. For non-concurrent
       * commissioning situations, the client SHOULD allow additional margin of time to account for its delay in
       * executing operational discovery of the Node once it is connected to the new network.
       *
       * On successful connection, the entry associated with the given Network configuration in the Networks
       * attribute shall indicate its Connected field set to true, and all other entries, if any exist, shall
       * indicate their Connected field set to false.
       *
       * On failure to connect, the entry associated with the given Network configuration in the Networks
       * attribute shall indicate its Connected field set to false.
       *
       * The precedence order of any entry subject to ConnectNetwork shall NOT change within the Networks
       * attribute.
       *
       * Even after successfully connecting to a network, the configuration shall revert to the prior state of
       * configuration if the CommissioningComplete command (see Section 11.10.7.6, “CommissioningComplete
       * Command”) is not successfully invoked before expiry of the Fail-Safe timer.
       *
       * When non-concurrent commissioning is being used by a Commissioner or Administrator, the
       * ConnectNetworkResponse shall be sent with the NetworkingStatus field set to Success prior to closing the
       * commissioning channel, even if not yet connected to the operational network, unless the device would be
       * incapable of joining that network, in which case the usual failure path described in the prior paragraphs
       * shall be followed. Once the commissioning channel is closed, the operational channel will be started. It
       * is possible that the only method to determine success of the operation is operational discovery of the
       * Node on the new operational network. Therefore, before invoking the ConnectNetwork command, the client
       * SHOULD re-invoke the Arm Fail-Safe command with a duration that meets the following:
       *
       *   1. Sufficient time to meet the minimum required time (see Section 11.9.6.4, “ConnectMaxTimeSeconds
       *      Attribute”) that may be taken by the server to connect to the desired network.
       *
       *   2. Sufficient time to account for possible message-layer retries when a response is requested.
       *
       *   3. Sufficient time to allow operational discovery on the new network by a Commissioner or
       *      Administrator.
       *
       *   4. Sufficient time to establish a CASE session after operational discovery
       *
       *   5. Not so long that, in error situations, the delay to reverting back to being discoverable for
       *      commissioning with a previous configuration would cause significant user-perceived delay.
       *
       * Note as well that the CommissioningTimeout duration provided in a prior OpenCommissioningWindow or
       * OpenBasicCommissioningWindow command may impact the total time available to proceed with error recovery
       * after a connection failure.
       *
       * The LastNetworkingStatus, LastNetworkID and LastConnectErrorValue attributes may assist the client in
       * determining the reason for a failure after reconnecting over a Commissioning channel, especially in
       * non-concurrent commissioning situations.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.7.8
       */
      connectNetwork: (0, import_Cluster.Command)(
        6,
        NetworkCommissioning2.TlvConnectNetworkRequest,
        7,
        NetworkCommissioning2.TlvConnectNetworkResponse,
        { invokeAcl: import_model.AccessLevel.Administer }
      ),
      /**
       * This command is used to re-order the network configuration list.
       *
       * This command shall set the specific order of the network configuration selected by its NetworkID in the
       * Networks attribute to match the position given by NetworkIndex.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.7.10
       */
      reorderNetwork: (0, import_Cluster.Command)(
        8,
        NetworkCommissioning2.TlvReorderNetworkRequest,
        5,
        NetworkCommissioning2.TlvNetworkConfigResponse,
        { invokeAcl: import_model.AccessLevel.Administer }
      )
    }
  });
  NetworkCommissioning2.WiFiNetworkInterfaceComponent = import_MutableCluster.MutableCluster.Component({
    attributes: {
      /**
       * Indicates all the frequency bands supported by the Wi-Fi interface configured by the cluster instance.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.6.9
       */
      supportedWiFiBands: (0, import_Cluster.FixedAttribute)(8, (0, import_TlvArray.TlvArray)((0, import_TlvNumber.TlvEnum)(), { minLength: 1 }))
    },
    commands: {
      /**
       * This command is used to add or update a Wi-Fi network configuration.
       *
       * This command shall be used to add or modify Wi-Fi network configurations.
       *
       * If this command is received without an armed fail-safe context (see Section 11.10.7.2, “ArmFailSafe
       * Command”), then this command shall fail with a FAILSAFE_REQUIRED status code sent back to the initiator.
       *
       * The Credentials associated with the network are not readable after execution of this command, as they do
       * not appear in the Networks attribute, for security reasons.
       *
       * If this command contains a ClientIdentifier, and the Networks list does not contain an entry with a
       * matching ClientIdentifier, then this command shall fail with a status of NOT_FOUND.
       *
       * See Section 11.9.7.5, “Common processing of AddOrUpdateWiFiNetwork and AddOrUpdateThreadNetwork” for
       * behavior of addition/update.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.7.3
       */
      addOrUpdateWiFiNetwork: (0, import_Cluster.Command)(
        2,
        NetworkCommissioning2.TlvAddOrUpdateWiFiNetworkRequest,
        5,
        NetworkCommissioning2.TlvNetworkConfigResponse,
        { invokeAcl: import_model.AccessLevel.Administer }
      )
    }
  });
  NetworkCommissioning2.ThreadNetworkInterfaceComponent = import_MutableCluster.MutableCluster.Component({
    attributes: {
      /**
       * Indicates all of the Thread features supported by the Thread interface configured by the cluster
       * instance.
       *
       * This attribute is primarily used to determine the most important general capabilities of the Thread
       * interface associated with the cluster instance, as opposed to the current runtimedynamicconfiguration.
       * Note that most run-time details of the actual Thread interface are found in the Thread Network
       * Diagnostics cluster, if supported.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.6.10
       */
      supportedThreadFeatures: (0, import_Cluster.FixedAttribute)(9, (0, import_TlvNumber.TlvBitmap)(import_TlvNumber.TlvUInt16, NetworkCommissioning2.ThreadCapabilities)),
      /**
       * Indicates the Thread version supported by the Thread interface configured by the cluster instance.
       *
       * The format shall match the value mapping found in the "Version TLV" section of Thread specification. For
       * example, Thread 1.3.0 would have ThreadVersion set to 4.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.6.11
       */
      threadVersion: (0, import_Cluster.FixedAttribute)(10, import_TlvNumber.TlvUInt16)
    },
    commands: {
      /**
       * This command is used to add or update a Thread network configuration.
       *
       * This command shall be used to add or modify Thread network configurations.
       *
       * If this command is received without an armed fail-safe context (see Section 11.10.7.2, “ArmFailSafe
       * Command”), then this command shall fail with a FAILSAFE_REQUIRED status code sent back to the initiator.
       *
       * See Section 11.9.7.5, “Common processing of AddOrUpdateWiFiNetwork and AddOrUpdateThreadNetwork” for
       * behavior of addition/update.
       *
       * The XPAN ID in the OperationalDataset serves as the NetworkID for the network configuration to be added
       * or updated.
       *
       * If the Networks attribute does not contain an entry with the same NetworkID as the one provided in the
       * OperationalDataset, the operation shall be considered an addition, otherwise, it shall be considered an
       * update.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.7.4
       */
      addOrUpdateThreadNetwork: (0, import_Cluster.Command)(
        3,
        NetworkCommissioning2.TlvAddOrUpdateThreadNetworkRequest,
        5,
        NetworkCommissioning2.TlvNetworkConfigResponse,
        { invokeAcl: import_model.AccessLevel.Administer }
      )
    }
  });
  NetworkCommissioning2.Base = import_MutableCluster.MutableCluster.Component({
    id: 49,
    name: "NetworkCommissioning",
    revision: 2,
    features: {
      /**
       * Wi-Fi related features
       */
      wiFiNetworkInterface: (0, import_BitmapSchema.BitFlag)(0),
      /**
       * Thread related features
       */
      threadNetworkInterface: (0, import_BitmapSchema.BitFlag)(1),
      /**
       * Ethernet related features
       */
      ethernetNetworkInterface: (0, import_BitmapSchema.BitFlag)(2)
    },
    attributes: {
      /**
       * This shall indicate the maximum number of network configuration entries that can be added, based on
       * available device resources. The length of the Networks attribute shall be less than or equal to this
       * value.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.6.1
       */
      maxNetworks: (0, import_Cluster.FixedAttribute)(
        0,
        import_TlvNumber.TlvUInt8.bound({ min: 1 }),
        { readAcl: import_model.AccessLevel.Administer, writeAcl: import_model.AccessLevel.Administer }
      ),
      /**
       * Indicates the network configurations that are usable on the network interface represented by this cluster
       * server instance.
       *
       * The order of configurations in the list reflects precedence. That is, any time the Node attempts to
       * connect to the network it shall attempt to do so using the configurations in Networks Attribute in the
       * order as they appear in the list.
       *
       * The order of list items shall only be modified by the AddOrUpdateThreadNetwork, AddOrUpdateWiFiNetwork
       * and ReorderNetwork commands. In other words, the list shall be stable over time, unless mutated
       * externally.
       *
       * Ethernet networks shall be automatically populated by the cluster server. Ethernet Network Commissioning
       * Cluster instances shall always have exactly one NetworkInfoStruct instance in their Networks attribute.
       * There shall be no way to add, update or remove Ethernet network configurations to those Cluster
       * instances.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.6.2
       */
      networks: (0, import_Cluster.Attribute)(
        1,
        (0, import_TlvArray.TlvArray)(NetworkCommissioning2.TlvNetworkInfo),
        { default: [], readAcl: import_model.AccessLevel.Administer, writeAcl: import_model.AccessLevel.Administer }
      ),
      /**
       * Indicates whether the associated network interface is enabled or not. By default all network interfaces
       * SHOULD be enabled during initial commissioning (InterfaceEnabled set to true).
       *
       * It is undefined what happens if InterfaceEnabled is written to false on the same interface as that which
       * is used to write the value. In that case, it is possible that the Administrator would have to await
       * expiry of the fail-safe, and associated recovery of network configuration to prior safe values, before
       * being able to communicate with the node again (see Section 11.10.7.2, “ArmFailSafe Command”).
       *
       * It may be possible to disable Ethernet interfaces but it is implementation-defined. If not supported, a
       * write to this attribute with a value of false shall fail with a status of INVALID_ACTION. When disabled,
       * an Ethernet interface would longer employ media detection. That is, a simple unplug and replug of the
       * cable shall NOT re-enable the interface.
       *
       * On Ethernet-only Nodes, there shall always be at least one of the Network Commissioning server cluster
       * instances with InterfaceEnabled set to true.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.6.5
       */
      interfaceEnabled: (0, import_Cluster.WritableAttribute)(
        4,
        import_TlvBoolean.TlvBoolean,
        { persistent: true, default: true, writeAcl: import_model.AccessLevel.Administer }
      ),
      /**
       * Indicates the status of the last attempt either scan or connect to an operational network, using this
       * interface, whether by invocation of the ConnectNetwork command or by autonomous connection after loss of
       * connectivity or during initial establishment. If no such attempt was made, or no network configurations
       * exist in the Networks attribute, then this attribute shall be set to null.
       *
       * This attribute is present to assist with error recovery during Network commissioning and to assist in
       * non-concurrent networking commissioning flows.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.6.6
       */
      lastNetworkingStatus: (0, import_Cluster.Attribute)(
        5,
        (0, import_TlvNullable.TlvNullable)((0, import_TlvNumber.TlvEnum)()),
        { default: null, readAcl: import_model.AccessLevel.Administer, writeAcl: import_model.AccessLevel.Administer }
      ),
      /**
       * Indicates the NetworkID used in the last attempt to connect to an operational network, using this
       * interface, whether by invocation of the ConnectNetwork command or by autonomous connection after loss of
       * connectivity or during initial establishment. If no such attempt was made, or no network configurations
       * exist in the Networks attribute, then this attribute shall be set to null.
       *
       * If a network configuration is removed from the Networks attribute using the RemoveNetwork command after a
       * connection attempt, this field may indicate a NetworkID that is no longer configured on the Node.
       *
       * This attribute is present to assist with error recovery during Network commissioning and to assist in
       * non-concurrent networking commissioning flows.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.6.7
       */
      lastNetworkId: (0, import_Cluster.Attribute)(
        6,
        (0, import_TlvNullable.TlvNullable)(import_TlvString.TlvByteString.bound({ minLength: 1, maxLength: 32 })),
        { default: null, readAcl: import_model.AccessLevel.Administer, writeAcl: import_model.AccessLevel.Administer }
      ),
      /**
       * Indicates the ErrorValue used in the last failed attempt to connect to an operational network, using this
       * interface, whether by invocation of the ConnectNetwork command or by autonomous connection after loss of
       * connectivity or during initial establishment. If no such attempt was made, or no network configurations
       * exist in the Networks attribute, then this attribute shall be set to null.
       *
       * If the last connection succeeded, as indicated by a value of Success in the LastNetworkingStatus
       * attribute, then this field shall be set to null.
       *
       * This attribute is present to assist with error recovery during Network commissioning and to assist in
       * non-concurrent networking commissioning flows.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.9.6.8
       */
      lastConnectErrorValue: (0, import_Cluster.Attribute)(
        7,
        (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvInt32),
        { default: null, readAcl: import_model.AccessLevel.Administer, writeAcl: import_model.AccessLevel.Administer }
      )
    },
    /**
     * This metadata controls which NetworkCommissioningCluster elements matter.js activates for specific feature
     * combinations.
     */
    extensions: import_MutableCluster.MutableCluster.Extensions(
      { flags: { wiFiNetworkInterface: true }, component: NetworkCommissioning2.WiFiNetworkInterfaceOrThreadNetworkInterfaceComponent },
      {
        flags: { threadNetworkInterface: true },
        component: NetworkCommissioning2.WiFiNetworkInterfaceOrThreadNetworkInterfaceComponent
      },
      { flags: { wiFiNetworkInterface: true }, component: NetworkCommissioning2.WiFiNetworkInterfaceComponent },
      { flags: { threadNetworkInterface: true }, component: NetworkCommissioning2.ThreadNetworkInterfaceComponent },
      { flags: { wiFiNetworkInterface: true, threadNetworkInterface: true }, component: false },
      { flags: { wiFiNetworkInterface: true, ethernetNetworkInterface: true }, component: false },
      { flags: { threadNetworkInterface: true, ethernetNetworkInterface: true }, component: false },
      {
        flags: { wiFiNetworkInterface: false, threadNetworkInterface: false, ethernetNetworkInterface: false },
        component: false
      }
    )
  });
  NetworkCommissioning2.ClusterInstance = import_MutableCluster.MutableCluster.ExtensibleOnly(NetworkCommissioning2.Base);
  NetworkCommissioning2.Cluster = NetworkCommissioning2.ClusterInstance;
  const WI = { wiFiNetworkInterface: true };
  const TH = { threadNetworkInterface: true };
  NetworkCommissioning2.CompleteInstance = (0, import_MutableCluster.MutableCluster)({
    id: NetworkCommissioning2.Base.id,
    name: NetworkCommissioning2.Base.name,
    revision: NetworkCommissioning2.Base.revision,
    features: NetworkCommissioning2.Base.features,
    attributes: {
      ...NetworkCommissioning2.Base.attributes,
      scanMaxTimeSeconds: import_MutableCluster.MutableCluster.AsConditional(
        NetworkCommissioning2.WiFiNetworkInterfaceOrThreadNetworkInterfaceComponent.attributes.scanMaxTimeSeconds,
        { mandatoryIf: [WI, TH] }
      ),
      connectMaxTimeSeconds: import_MutableCluster.MutableCluster.AsConditional(
        NetworkCommissioning2.WiFiNetworkInterfaceOrThreadNetworkInterfaceComponent.attributes.connectMaxTimeSeconds,
        { mandatoryIf: [WI, TH] }
      ),
      supportedWiFiBands: import_MutableCluster.MutableCluster.AsConditional(
        NetworkCommissioning2.WiFiNetworkInterfaceComponent.attributes.supportedWiFiBands,
        { mandatoryIf: [WI] }
      ),
      supportedThreadFeatures: import_MutableCluster.MutableCluster.AsConditional(
        NetworkCommissioning2.ThreadNetworkInterfaceComponent.attributes.supportedThreadFeatures,
        { mandatoryIf: [TH] }
      ),
      threadVersion: import_MutableCluster.MutableCluster.AsConditional(
        NetworkCommissioning2.ThreadNetworkInterfaceComponent.attributes.threadVersion,
        { mandatoryIf: [TH] }
      )
    },
    commands: {
      scanNetworks: import_MutableCluster.MutableCluster.AsConditional(
        NetworkCommissioning2.WiFiNetworkInterfaceOrThreadNetworkInterfaceComponent.commands.scanNetworks,
        { mandatoryIf: [WI, TH] }
      ),
      addOrUpdateWiFiNetwork: import_MutableCluster.MutableCluster.AsConditional(
        NetworkCommissioning2.WiFiNetworkInterfaceComponent.commands.addOrUpdateWiFiNetwork,
        { mandatoryIf: [WI] }
      ),
      addOrUpdateThreadNetwork: import_MutableCluster.MutableCluster.AsConditional(
        NetworkCommissioning2.ThreadNetworkInterfaceComponent.commands.addOrUpdateThreadNetwork,
        { mandatoryIf: [TH] }
      ),
      removeNetwork: import_MutableCluster.MutableCluster.AsConditional(
        NetworkCommissioning2.WiFiNetworkInterfaceOrThreadNetworkInterfaceComponent.commands.removeNetwork,
        { mandatoryIf: [WI, TH] }
      ),
      connectNetwork: import_MutableCluster.MutableCluster.AsConditional(
        NetworkCommissioning2.WiFiNetworkInterfaceOrThreadNetworkInterfaceComponent.commands.connectNetwork,
        { mandatoryIf: [WI, TH] }
      ),
      reorderNetwork: import_MutableCluster.MutableCluster.AsConditional(
        NetworkCommissioning2.WiFiNetworkInterfaceOrThreadNetworkInterfaceComponent.commands.reorderNetwork,
        { mandatoryIf: [WI, TH] }
      )
    }
  });
  NetworkCommissioning2.Complete = NetworkCommissioning2.CompleteInstance;
})(NetworkCommissioning || (NetworkCommissioning = {}));
const NetworkCommissioningCluster = NetworkCommissioning.Cluster;
import_ClusterRegistry.ClusterRegistry.register(NetworkCommissioning.Complete);
//# sourceMappingURL=network-commissioning.js.map
