"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 basic_information_exports = {};
__export(basic_information_exports, {
  BasicInformation: () => BasicInformation,
  BasicInformationCluster: () => BasicInformationCluster
});
module.exports = __toCommonJS(basic_information_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_TlvString = require("../tlv/TlvString.js");
var import_VendorId = require("../datatype/VendorId.js");
var import_model = require("#model");
var import_TlvBoolean = require("../tlv/TlvBoolean.js");
var import_TlvObject = require("../tlv/TlvObject.js");
var import_TlvNullable = require("../tlv/TlvNullable.js");
var import_Priority = require("../globals/Priority.js");
var import_TlvNoArguments = require("../tlv/TlvNoArguments.js");
var import_FabricIndex = require("../datatype/FabricIndex.js");
var import_ClusterRegistry = require("../cluster/ClusterRegistry.js");
/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
var BasicInformation;
((BasicInformation2) => {
  BasicInformation2.TlvCapabilityMinima = (0, import_TlvObject.TlvObject)({
    /**
     * This field shall indicate the actual minimum number of concurrent CASE sessions that are supported per
     * fabric.
     *
     * This value shall NOT be smaller than the required minimum indicated in Section 4.14.2.8, “Minimal Number of
     * CASE Sessions”.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.1.4.4.1
     */
    caseSessionsPerFabric: (0, import_TlvObject.TlvField)(0, import_TlvNumber.TlvUInt16.bound({ min: 3 })),
    /**
     * This field shall indicate the actual minimum number of concurrent subscriptions supported per fabric.
     *
     * This value shall NOT be smaller than the required minimum indicated in Section 8.5.1, “Subscribe
     * Transaction”.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.1.4.4.2
     */
    subscriptionsPerFabric: (0, import_TlvObject.TlvField)(1, import_TlvNumber.TlvUInt16.bound({ min: 3 }))
  });
  let ProductFinish;
  ((ProductFinish2) => {
    ProductFinish2[ProductFinish2["Other"] = 0] = "Other";
    ProductFinish2[ProductFinish2["Matte"] = 1] = "Matte";
    ProductFinish2[ProductFinish2["Satin"] = 2] = "Satin";
    ProductFinish2[ProductFinish2["Polished"] = 3] = "Polished";
    ProductFinish2[ProductFinish2["Rugged"] = 4] = "Rugged";
    ProductFinish2[ProductFinish2["Fabric"] = 5] = "Fabric";
  })(ProductFinish = BasicInformation2.ProductFinish || (BasicInformation2.ProductFinish = {}));
  let Color;
  ((Color2) => {
    Color2[Color2["Black"] = 0] = "Black";
    Color2[Color2["Navy"] = 1] = "Navy";
    Color2[Color2["Green"] = 2] = "Green";
    Color2[Color2["Teal"] = 3] = "Teal";
    Color2[Color2["Maroon"] = 4] = "Maroon";
    Color2[Color2["Purple"] = 5] = "Purple";
    Color2[Color2["Olive"] = 6] = "Olive";
    Color2[Color2["Gray"] = 7] = "Gray";
    Color2[Color2["Blue"] = 8] = "Blue";
    Color2[Color2["Lime"] = 9] = "Lime";
    Color2[Color2["Aqua"] = 10] = "Aqua";
    Color2[Color2["Red"] = 11] = "Red";
    Color2[Color2["Fuchsia"] = 12] = "Fuchsia";
    Color2[Color2["Yellow"] = 13] = "Yellow";
    Color2[Color2["White"] = 14] = "White";
    Color2[Color2["Nickel"] = 15] = "Nickel";
    Color2[Color2["Chrome"] = 16] = "Chrome";
    Color2[Color2["Brass"] = 17] = "Brass";
    Color2[Color2["Copper"] = 18] = "Copper";
    Color2[Color2["Silver"] = 19] = "Silver";
    Color2[Color2["Gold"] = 20] = "Gold";
  })(Color = BasicInformation2.Color || (BasicInformation2.Color = {}));
  BasicInformation2.TlvProductAppearance = (0, import_TlvObject.TlvObject)({
    /**
     * This field shall indicate the visible finish of the product.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.1.4.3.1
     */
    finish: (0, import_TlvObject.TlvField)(0, (0, import_TlvNumber.TlvEnum)()),
    /**
     * This field indicates the representative color of the visible parts of the product. If the product has no
     * representative color, the field shall be null.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.1.4.3.2
     */
    primaryColor: (0, import_TlvObject.TlvField)(1, (0, import_TlvNullable.TlvNullable)((0, import_TlvNumber.TlvEnum)()))
  });
  BasicInformation2.TlvStartUpEvent = (0, import_TlvObject.TlvObject)({
    /**
     * This field shall be set to the same value as the one available in the SoftwareVersion attribute.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.1.6.1.1
     */
    softwareVersion: (0, import_TlvObject.TlvField)(0, import_TlvNumber.TlvUInt32)
  });
  BasicInformation2.TlvLeaveEvent = (0, import_TlvObject.TlvObject)({
    /**
     * This field shall contain the local fabric-index of the fabric which the node is about to leave.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.1.6.3.1
     */
    fabricIndex: (0, import_TlvObject.TlvField)(0, import_FabricIndex.TlvFabricIndex)
  });
  BasicInformation2.TlvReachableChangedEvent = (0, import_TlvObject.TlvObject)({
    /**
     * This field shall indicate the value of the Reachable attribute after it was changed.
     *
     * @see {@link MatterSpecification.v142.Core} § 11.1.6.4.1
     */
    reachableNewValue: (0, import_TlvObject.TlvField)(0, import_TlvBoolean.TlvBoolean)
  });
  BasicInformation2.ClusterInstance = (0, import_MutableCluster.MutableCluster)({
    id: 40,
    name: "BasicInformation",
    revision: 5,
    attributes: {
      /**
       * This attribute shall be set to the revision number of the Data Model against which the Nodeiscertified.
       * The value of this attribute shall be one of the valid values listed in Section 7.1.1, “Revision History”.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.1
       */
      dataModelRevision: (0, import_Cluster.FixedAttribute)(0, import_TlvNumber.TlvUInt16),
      /**
       * This attribute shall specify a human readable (displayable) name of the vendor for the Node.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.2
       */
      vendorName: (0, import_Cluster.FixedAttribute)(1, import_TlvString.TlvString.bound({ maxLength: 32 })),
      /**
       * This attribute shall specify the Vendor ID.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.3
       */
      vendorId: (0, import_Cluster.FixedAttribute)(2, import_VendorId.TlvVendorId),
      /**
       * This attribute shall specify a human readable (displayable) name of the model for the Node such as the
       * model number (or other identifier) assigned by the vendor.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.4
       */
      productName: (0, import_Cluster.FixedAttribute)(3, import_TlvString.TlvString.bound({ maxLength: 32 })),
      /**
       * This attribute shall specify the Product ID assigned by the vendor that is unique to the specific product
       * of the Node.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.5
       */
      productId: (0, import_Cluster.FixedAttribute)(4, import_TlvNumber.TlvUInt16),
      /**
       * Indicates a user defined name for the Node. This attribute SHOULD be set during initial commissioning and
       * may be updated by further reconfigurations.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.6
       */
      nodeLabel: (0, import_Cluster.WritableAttribute)(
        5,
        import_TlvString.TlvString.bound({ maxLength: 32 }),
        { persistent: true, writeAcl: import_model.AccessLevel.Manage }
      ),
      /**
       * This attribute shall be an ISO 3166-1 alpha-2 code to represent the country, dependent territory, or
       * special area of geographic interest in which the Node is located at the time of the attributebeingset.
       * This attribute shall be set during initial commissioning (unless already set) and may be updated by
       * further reconfigurations. This attribute may affect some regulatory aspects of the Node’s operation, such
       * as radio transmission power levels in given spectrum allocation bands if technologies where this is
       * applicable are used. The Location’s region code shall be interpreted in a case-insensitive manner. If the
       * Node cannot understand the location code with which it was configured, or the location code has not yet
       * been configured, it shall configure itself in a region-agnostic manner as determined by the vendor,
       * avoiding region-specific assumptions as much as is practical. The special value XX shall indicate that
       * region-agnostic mode is used.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.7
       */
      location: (0, import_Cluster.WritableAttribute)(
        6,
        import_TlvString.TlvString.bound({ length: 2 }),
        { persistent: true, default: "XX", writeAcl: import_model.AccessLevel.Administer }
      ),
      /**
       * This attribute shall specify the version number of the hardware of the Node. The meaning of its value,
       * and the versioning scheme, are vendor defined.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.8
       */
      hardwareVersion: (0, import_Cluster.FixedAttribute)(7, import_TlvNumber.TlvUInt16, { default: 0 }),
      /**
       * This attribute shall specify the version number of the hardware of the Node. The meaning of its value,
       * and the versioning scheme, are vendor defined. The HardwareVersionString attribute shall be used to
       * provide a more user-friendly value than that represented by the HardwareVersion attribute.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.9
       */
      hardwareVersionString: (0, import_Cluster.FixedAttribute)(8, import_TlvString.TlvString.bound({ minLength: 1, maxLength: 64 })),
      /**
       * This attribute shall contain the current version number for the software running on this Node. A larger
       * value of SoftwareVersion is newer than a lower value, from the perspective of software updates (see
       * Section 11.20.3.3, “Availability of Software Images”). Nodes may query this field to determine the
       * currently running version of software on another given Node.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.10
       */
      softwareVersion: (0, import_Cluster.FixedAttribute)(9, import_TlvNumber.TlvUInt32, { default: 0 }),
      /**
       * This attribute shall contain a current human-readable representation for the software running ontheNode.
       * This version information may be conveyed to users. The maximum length of the SoftwareVersionString
       * attribute is 64 bytes of UTF-8 characters. The contents SHOULD only use simple 7-bit ASCII alphanumeric
       * and punctuation characters, so as to simplify the conveyance of the value to a variety of cultures.
       *
       * Examples of version strings include "1.0", "1.2.3456", "1.2-2", "1.0b123", "1.2_3".
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.11
       */
      softwareVersionString: (0, import_Cluster.FixedAttribute)(10, import_TlvString.TlvString.bound({ minLength: 1, maxLength: 64 })),
      /**
       * This attribute shall specify the date that the Node was manufactured. The first 8 characters shall
       * specify the date of manufacture of the Node in international date notation according to ISO 8601, i.e.,
       * YYYYMMDD, e.g., 20060814. The final 8 characters may include country, factory, line, shift or other
       * related information at the option of the vendor. The format of this information is vendor defined.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.12
       */
      manufacturingDate: (0, import_Cluster.OptionalFixedAttribute)(11, import_TlvString.TlvString.bound({ minLength: 8, maxLength: 16 })),
      /**
       * This attribute shall specify a human-readable (displayable) vendor assigned part number for the Node
       * whose meaning and numbering scheme is vendor defined. Multiple products (and hence PartNumbers) can share
       * a ProductID. For instance, there may be different packaging (with different PartNumbers) for different
       * regions; also different colors of a product might share the ProductID but may have a different
       * PartNumber.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.13
       */
      partNumber: (0, import_Cluster.OptionalFixedAttribute)(12, import_TlvString.TlvString.bound({ maxLength: 32 })),
      /**
       * This attribute shall specify a link to a product specific web page. The specified URL SHOULD resolve to a
       * maintained web page available for the lifetime of the product. The syntax of this attribute shall follow
       * the syntax as specified in RFC 1738 and shall use the https scheme. The maximum length of this attribute
       * is 256 ASCII characters.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.14
       */
      productUrl: (0, import_Cluster.OptionalFixedAttribute)(13, import_TlvString.TlvString.bound({ maxLength: 256 })),
      /**
       * This attribute shall specify a vendor specific human readable (displayable) product label. The
       * ProductLabel attribute may be used to provide a more user-friendly value than that represented by the
       * ProductName attribute. The ProductLabel attribute SHOULD NOT include the name of the vendor as defined
       * within the VendorName attribute.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.15
       */
      productLabel: (0, import_Cluster.OptionalFixedAttribute)(14, import_TlvString.TlvString.bound({ maxLength: 64 })),
      /**
       * This attribute shall specify a human readable (displayable) serial number.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.16
       */
      serialNumber: (0, import_Cluster.OptionalFixedAttribute)(15, import_TlvString.TlvString.bound({ maxLength: 32 })),
      /**
       * This attribute shall allow a local Node configuration to be disabled. When this attribute is set to True
       * the Node shall disable the ability to configure the Node through an on-Node user interface. The value of
       * the LocalConfigDisabled attribute shall NOT in any way modify, disable, or otherwise affect the user’s
       * ability to trigger a factory reset on the Node.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.17
       */
      localConfigDisabled: (0, import_Cluster.OptionalWritableAttribute)(
        16,
        import_TlvBoolean.TlvBoolean,
        { persistent: true, default: false, writeAcl: import_model.AccessLevel.Manage }
      ),
      /**
       * This attribute (when used) shall indicate whether the Node can be reached. For a native Node this is
       * implicitly True (and its use is optional). Its main use case is in the derived Bridged Device Basic
       * Information cluster where it is used to indicate whether the bridged device is reachable by the bridge
       * over the non-native network.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.18
       */
      reachable: (0, import_Cluster.OptionalAttribute)(17, import_TlvBoolean.TlvBoolean, { default: true }),
      /**
       * Indicates a unique identifier for the device, which is constructed in a manufacturer specificmanner. It
       * may be constructed using a permanent device identifier (such as device MAC address) asbasis. In order to
       * prevent tracking,
       *
       *   - it SHOULD NOT be identical to (or easily derived from) such permanent device identifier
       *
       *   - it shall be updated when the device is factory reset
       *
       *   - it shall NOT be identical to the SerialNumber attribute
       *
       *   - it shall NOT be printed on the product or delivered with the product
       *
       * The value does not need to be human readable, since it is intended for machine to machine (M2M)
       * communication.
       *
       * > [!NOTE]
       *
       * > The conformance of the UniqueID attribute was optional in cluster revisions prior to revision 4.
       *
       * > [!NOTE]
       *
       * > This UniqueID attribute shall NOT be the same as the Persistent Unique ID which is used in the Rotating
       *   Device Identifier mechanism.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.19
       */
      uniqueId: (0, import_Cluster.FixedAttribute)(18, import_TlvString.TlvString.bound({ maxLength: 32 })),
      /**
       * This attribute shall provide the minimum guaranteed value for some system-wide resource capabilities that
       * are not otherwise cluster-specific and do not appear elsewhere. This attribute may be used by clients to
       * optimize communication with Nodes by allowing them to use more than the strict minimum values required by
       * this specification, wherever available.
       *
       * The values supported by the server in reality may be larger than the values provided in this attribute,
       * such as if a server is not resource-constrained at all. However, clients SHOULD only rely on the amounts
       * provided in this attribute.
       *
       * Note that since the fixed values within this attribute may change over time, both increasing and
       * decreasing, as software versions change for a given Node, clients SHOULD take care not to assume forever
       * unchanging values and SHOULD NOT cache this value permanently at Commissioning time.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.20
       */
      capabilityMinima: (0, import_Cluster.FixedAttribute)(
        19,
        BasicInformation2.TlvCapabilityMinima,
        { default: { caseSessionsPerFabric: 3, subscriptionsPerFabric: 3 } }
      ),
      /**
       * This attribute shall provide information about the appearance of the product, which could be useful to a
       * user trying to locate or identify the node.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.21
       */
      productAppearance: (0, import_Cluster.OptionalFixedAttribute)(20, BasicInformation2.TlvProductAppearance),
      /**
       * This attribute shall contain the current version number for the specification version this Node was
       * certified against. A larger value of SpecificationVersion is newer than a lower value.
       *
       * Nodes may query this field to determine the currently supported version of the specification on another
       * given Node.
       *
       * The format of this number is segmented as its four component bytes.
       *
       * Bit positions for the fields are as follows:
       *
       * For example, a SpecificationVersion value of 0x01040200 is composed of 4 version components, representing
       * a version 1.4.2.0.
       *
       * In the example above:
       *
       *   - Major version is the most significant byte (0x01).
       *
       *   - Minor version is the second most significant byte (0x04).
       *
       *   - Dot version is the third most significant byte (0x02).
       *
       *   - Reserved1 value is the least significant byte (0x00).
       *
       * The initial revision (1.0) of this specification (1.0) was 0x01000000. Matter Spring 2024 release (1.3)
       * was 0x01030000.
       *
       * If the SpecificationVersion is absent or zero, such as in Basic Information cluster revisions prior to
       * Revision 3, the specification version cannot be properly inferred unless other heuristics are employed.
       *
       * Comparison of SpecificationVersion shall always include the total value over 32 bits, without masking
       * reserved parts.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.22
       */
      specificationVersion: (0, import_Cluster.FixedAttribute)(21, import_TlvNumber.TlvUInt32, { default: 0 }),
      /**
       * Indicates the maximum number of elements in a single InvokeRequests list (see Section 8.8.2, “Invoke
       * Request Action”) that the Node is able to process. Note that since this attribute may change over time,
       * both increasing and decreasing, as software versions change for a given Node, clients SHOULD take care
       * not to assume forever unchanging values and SHOULD NOT cache this value permanently at Commissioning
       * time.
       *
       * If the MaxPathsPerInvoke attribute is absent or zero, such as in Basic Information cluster revisions
       * prior to Revision 3, clients shall assume a value of 1.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.23
       */
      maxPathsPerInvoke: (0, import_Cluster.FixedAttribute)(22, import_TlvNumber.TlvUInt16.bound({ min: 1 }), { default: 1 }),
      /**
       * This attribute shall contain the current version number for the configuration of the Node. A larger value
       * of ConfigurationVersion shall indicate a newer configuration than a lower value.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.5.24
       */
      configurationVersion: (0, import_Cluster.Attribute)(24, import_TlvNumber.TlvUInt32.bound({ min: 1 }), { persistent: true, default: 1 })
    },
    events: {
      /**
       * The StartUp event shall be generated by a Node as soon as reasonable after completing a boot or reboot
       * process. The StartUp event SHOULD be the first Data Model event recorded by the Node after it completes a
       * boot or reboot process.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.6.1
       */
      startUp: (0, import_Cluster.Event)(0, import_Priority.Priority.Critical, BasicInformation2.TlvStartUpEvent),
      /**
       * The ShutDown event SHOULD be generated by a Node prior to any orderly shutdown sequence on a best-effort
       * basis. When a ShutDown event is generated, it SHOULD be the last Data Model event recorded by the Node.
       * This event SHOULD be delivered urgently to current subscribers on a best-effort basis. Any subsequent
       * incoming interactions to the Node may be dropped until the completion of a future boot or reboot process.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.6.2
       */
      shutDown: (0, import_Cluster.OptionalEvent)(1, import_Priority.Priority.Critical, import_TlvNoArguments.TlvNoArguments),
      /**
       * The Leave event SHOULD be generated by a Node prior to permanently leaving a given Fabric, such as when
       * the RemoveFabric command is invoked for a given fabric, or triggered by factory reset or some other
       * manufacturer specific action to disable or reset the operational data in the Node. When a Leave event is
       * generated, it SHOULD be assumed that the fabric recorded in the event is no longer usable, and subsequent
       * interactions targeting that fabric will most likely fail.
       *
       * Upon receipt of Leave Event on a subscription, the receiving Node may update other nodes in the fabric by
       * removing related bindings, access control list entries and other data referencing the leaving Node.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.6.3
       */
      leave: (0, import_Cluster.OptionalEvent)(2, import_Priority.Priority.Info, BasicInformation2.TlvLeaveEvent),
      /**
       * This event (when supported) shall be generated when there is a change in the Reachable attribute. Its
       * main use case is in the derived Bridged Device Basic Information cluster.
       *
       * @see {@link MatterSpecification.v142.Core} § 11.1.6.4
       */
      reachableChanged: (0, import_Cluster.OptionalEvent)(3, import_Priority.Priority.Info, BasicInformation2.TlvReachableChangedEvent)
    }
  });
  BasicInformation2.Cluster = BasicInformation2.ClusterInstance;
  BasicInformation2.Complete = BasicInformation2.Cluster;
})(BasicInformation || (BasicInformation = {}));
const BasicInformationCluster = BasicInformation.Cluster;
import_ClusterRegistry.ClusterRegistry.register(BasicInformation.Complete);
//# sourceMappingURL=basic-information.js.map
