/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MutableCluster } from "../cluster/mutation/MutableCluster.js";
import { WritableAttribute } from "../cluster/Cluster.js";
import { TlvArray } from "../tlv/TlvArray.js";
import { TlvField, TlvObject } from "../tlv/TlvObject.js";
import { TlvBoolean } from "../tlv/TlvBoolean.js";
import { TlvNodeId } from "../datatype/NodeId.js";
import { ClusterRegistry } from "../cluster/ClusterRegistry.js";
var ProxyConfiguration;
((ProxyConfiguration2) => {
  ProxyConfiguration2.TlvConfiguration = TlvObject({
    /**
     * This field shall be set to true to indicate to the proxy that it shall proxy all nodes. When true, the
     * SourceList attribute is ignored.
     *
     * @see {@link MatterSpecification.v13.Core} § 9.15.13.4.1.1
     */
    proxyAllNodes: TlvField(1, TlvBoolean),
    /**
     * When ProxyAllNodes is false, this list contains the set of Node IDs of sources that this proxy shall
     * specifically proxy.
     *
     * @see {@link MatterSpecification.v13.Core} § 9.15.13.4.1.2
     */
    sourceList: TlvField(2, TlvArray(TlvNodeId))
  });
  ProxyConfiguration2.ClusterInstance = MutableCluster({
    id: 66,
    name: "ProxyConfiguration",
    revision: 1,
    attributes: {
      /**
       * List of proxy configurations. There shall NOT be multiple entries in this list for the same fabric.
       *
       * @see {@link MatterSpecification.v13.Core} § 9.15.13.5.1
       */
      configurationList: WritableAttribute(0, TlvArray(ProxyConfiguration2.TlvConfiguration), { persistent: true, default: [] })
    }
  });
  ProxyConfiguration2.Cluster = ProxyConfiguration2.ClusterInstance;
  ProxyConfiguration2.Complete = ProxyConfiguration2.Cluster;
})(ProxyConfiguration || (ProxyConfiguration = {}));
const ProxyConfigurationCluster = ProxyConfiguration.Cluster;
ClusterRegistry.register(ProxyConfiguration.Complete);
export {
  ProxyConfiguration,
  ProxyConfigurationCluster
};
//# sourceMappingURL=proxy-configuration.js.map
