/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MutableCluster } from "../cluster/mutation/MutableCluster.js";
import { WritableAttribute, FixedAttribute } from "../cluster/Cluster.js";
import { TlvString } from "../tlv/TlvString.js";
import { AccessLevel } from "#model";
import { TlvArray } from "../tlv/TlvArray.js";
import { ClusterRegistry } from "../cluster/ClusterRegistry.js";
var LocalizationConfiguration;
((LocalizationConfiguration2) => {
  LocalizationConfiguration2.ClusterInstance = MutableCluster({
    id: 43,
    name: "LocalizationConfiguration",
    revision: 1,
    attributes: {
      /**
       * The ActiveLocale attribute shall represent the locale that the Node is currently configured to use when
       * conveying information. The ActiveLocale attribute shall be a Language Tag as defined by BCP47. The
       * ActiveLocale attribute shall have a default value assigned by the Vendor and shall be a value contained
       * within the SupportedLocales attribute.
       *
       * An attempt to write a value to ActiveLocale that is not present in SupportedLocales shall result in a
       * CONSTRAINT_ERROR error.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.3.4.1
       */
      activeLocale: WritableAttribute(
        0,
        TlvString.bound({ maxLength: 35 }),
        { persistent: true, writeAcl: AccessLevel.Manage }
      ),
      /**
       * The SupportedLocales attribute shall represent a list of locale strings that are valid values for the
       * ActiveLocale attribute. The list shall NOT contain any duplicate entries. The ordering of items within
       * the list SHOULD NOT express any meaning.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.3.4.2
       */
      supportedLocales: FixedAttribute(1, TlvArray(TlvString, { maxLength: 32 }), { default: [] })
    }
  });
  LocalizationConfiguration2.Cluster = LocalizationConfiguration2.ClusterInstance;
  LocalizationConfiguration2.Complete = LocalizationConfiguration2.Cluster;
})(LocalizationConfiguration || (LocalizationConfiguration = {}));
const LocalizationConfigurationCluster = LocalizationConfiguration.Cluster;
ClusterRegistry.register(LocalizationConfiguration.Complete);
export {
  LocalizationConfiguration,
  LocalizationConfigurationCluster
};
//# sourceMappingURL=localization-configuration.js.map
