"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 bridged_device_basic_information_exports = {};
__export(bridged_device_basic_information_exports, {
  BridgedDeviceBasicInformation: () => BridgedDeviceBasicInformation,
  BridgedDeviceBasicInformationCluster: () => BridgedDeviceBasicInformationCluster
});
module.exports = __toCommonJS(bridged_device_basic_information_exports);
var import_MutableCluster = require("../cluster/mutation/MutableCluster.js");
var import_Cluster = require("../cluster/Cluster.js");
var import_TlvString = require("../tlv/TlvString.js");
var import_VendorId = require("../datatype/VendorId.js");
var import_model = require("#model");
var import_TlvNumber = require("../tlv/TlvNumber.js");
var import_TlvBoolean = require("../tlv/TlvBoolean.js");
var import_basic_information = require("./basic-information.js");
var import_TlvObject = require("../tlv/TlvObject.js");
var import_TlvNoArguments = require("../tlv/TlvNoArguments.js");
var import_ClusterRegistry = require("../cluster/ClusterRegistry.js");
/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
var BridgedDeviceBasicInformation;
((BridgedDeviceBasicInformation2) => {
  BridgedDeviceBasicInformation2.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.v13.Core} § 11.1.6.1.1
     */
    softwareVersion: (0, import_TlvObject.TlvField)(0, import_TlvNumber.TlvUInt32)
  });
  BridgedDeviceBasicInformation2.TlvReachableChangedEvent = (0, import_TlvObject.TlvObject)({
    /**
     * This field shall indicate the value of the Reachable attribute after it was changed.
     *
     * @see {@link MatterSpecification.v13.Core} § 11.1.6.4.1
     */
    reachableNewValue: (0, import_TlvObject.TlvField)(0, import_TlvBoolean.TlvBoolean)
  });
  BridgedDeviceBasicInformation2.ClusterInstance = (0, import_MutableCluster.MutableCluster)({
    id: 57,
    name: "BridgedDeviceBasicInformation",
    revision: 3,
    attributes: {
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.4
       */
      vendorName: (0, import_Cluster.OptionalFixedAttribute)(1, import_TlvString.TlvString.bound({ maxLength: 32 })),
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.4
       */
      vendorId: (0, import_Cluster.OptionalFixedAttribute)(2, import_VendorId.TlvVendorId),
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.4
       */
      productName: (0, import_Cluster.OptionalFixedAttribute)(3, import_TlvString.TlvString.bound({ maxLength: 32 })),
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.4
       */
      nodeLabel: (0, import_Cluster.OptionalWritableAttribute)(
        5,
        import_TlvString.TlvString.bound({ maxLength: 32 }),
        { persistent: true, writeAcl: import_model.AccessLevel.Manage }
      ),
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.4
       */
      hardwareVersion: (0, import_Cluster.OptionalFixedAttribute)(7, import_TlvNumber.TlvUInt16),
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.4
       */
      hardwareVersionString: (0, import_Cluster.OptionalFixedAttribute)(8, import_TlvString.TlvString.bound({ minLength: 1, maxLength: 64 })),
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.4
       */
      softwareVersion: (0, import_Cluster.OptionalFixedAttribute)(9, import_TlvNumber.TlvUInt32),
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.4
       */
      softwareVersionString: (0, import_Cluster.OptionalFixedAttribute)(10, import_TlvString.TlvString.bound({ minLength: 1, maxLength: 64 })),
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.4
       */
      manufacturingDate: (0, import_Cluster.OptionalFixedAttribute)(11, import_TlvString.TlvString.bound({ minLength: 8, maxLength: 16 })),
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.4
       */
      partNumber: (0, import_Cluster.OptionalFixedAttribute)(12, import_TlvString.TlvString.bound({ maxLength: 32 })),
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.4
       */
      productUrl: (0, import_Cluster.OptionalFixedAttribute)(13, import_TlvString.TlvString.bound({ maxLength: 256 })),
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.4
       */
      productLabel: (0, import_Cluster.OptionalFixedAttribute)(14, import_TlvString.TlvString.bound({ maxLength: 64 })),
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.4
       */
      serialNumber: (0, import_Cluster.OptionalFixedAttribute)(15, import_TlvString.TlvString.bound({ maxLength: 32 })),
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.4
       */
      reachable: (0, import_Cluster.Attribute)(17, import_TlvBoolean.TlvBoolean),
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.4
       */
      uniqueId: (0, import_Cluster.OptionalFixedAttribute)(18, import_TlvString.TlvString.bound({ maxLength: 32 })),
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.4
       */
      productAppearance: (0, import_Cluster.OptionalFixedAttribute)(20, import_basic_information.BasicInformation.TlvProductAppearance)
    },
    events: {
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.5
       */
      startUp: (0, import_Cluster.OptionalEvent)(0, import_Cluster.EventPriority.Critical, BridgedDeviceBasicInformation2.TlvStartUpEvent),
      /**
       * @see {@link MatterSpecification.v13.Core} § 9.13.5
       */
      shutDown: (0, import_Cluster.OptionalEvent)(1, import_Cluster.EventPriority.Critical, import_TlvNoArguments.TlvNoArguments),
      /**
       * The Leave event SHOULD be generated by the bridge when it detects that the associated device has left
       * the non-Matter network.
       *
       * NOTE
       *
       * The FabricIndex field has the X conformance, indicating it shall NOT be present. This event, in the
       * context of Bridged Device Basic Information cluster, has no usable fields, but the original Basic
       * Information cluster’s field definition is kept for completeness.
       *
       * @see {@link MatterSpecification.v13.Core} § 9.13.5.1
       */
      leave: (0, import_Cluster.OptionalEvent)(2, import_Cluster.EventPriority.Critical, import_TlvNoArguments.TlvNoArguments),
      /**
       * This event shall be generated when there is a change in the Reachable attribute. Its purpose is to
       * provide an indication towards interested parties that the reachability of a bridged device (over the
       * non-Matter network) has changed, so they may take appropriate action.
       *
       * After (re)start of a bridge this event may be generated.
       *
       * @see {@link MatterSpecification.v13.Core} § 9.13.5.2
       */
      reachableChanged: (0, import_Cluster.Event)(3, import_Cluster.EventPriority.Critical, BridgedDeviceBasicInformation2.TlvReachableChangedEvent)
    }
  });
  BridgedDeviceBasicInformation2.Cluster = BridgedDeviceBasicInformation2.ClusterInstance;
  BridgedDeviceBasicInformation2.Complete = BridgedDeviceBasicInformation2.Cluster;
})(BridgedDeviceBasicInformation || (BridgedDeviceBasicInformation = {}));
const BridgedDeviceBasicInformationCluster = BridgedDeviceBasicInformation.Cluster;
import_ClusterRegistry.ClusterRegistry.register(BridgedDeviceBasicInformation.Complete);
//# sourceMappingURL=bridged-device-basic-information.js.map
