"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 Semtag_exports = {};
__export(Semtag_exports, {
  TlvSemtag: () => TlvSemtag
});
module.exports = __toCommonJS(Semtag_exports);
var import_TlvObject = require("../tlv/TlvObject.js");
var import_VendorId = require("../datatype/VendorId.js");
var import_TlvNullable = require("../tlv/TlvNullable.js");
var import_TlvNumber = require("../tlv/TlvNumber.js");
var import_TlvString = require("../tlv/TlvString.js");
/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const TlvSemtag = (0, import_TlvObject.TlvObject)({
  /**
   * If the MfgCode field is not NULL, it shall be the Vendor ID of the manufacturer who has defined a certain
   * namespace and the NamespaceID field shall be the ID of a namespace defined by the manufacturer identified in the
   * MfgCode field.
   *
   * If a manufacturer specific Tag field is indicated in a list of SemanticTagStruct entries, the list shall include
   * at least one standard tag which is not from any manufacturer’s namespace. A standard tag is a tag from a common
   * namespace, a derived cluster namespace, or an applicable device-specific namespace.
   *
   * If MfgCode is NULL, the NamespaceID field shall indicate a standard namespace.
   *
   * @see {@link MatterSpecification.v142.Core} § 7.19.2.46.1
   */
  mfgCode: (0, import_TlvObject.TlvField)(0, (0, import_TlvNullable.TlvNullable)(import_VendorId.TlvVendorId)),
  /**
   * The NamespaceID field shall identify a namespace.
   *
   * The common and device-specific semantic tag namespaces are listed in StandardNamespaces.
   *
   * @see {@link MatterSpecification.v142.Core} § 7.19.2.46.2
   */
  namespaceId: (0, import_TlvObject.TlvField)(1, (0, import_TlvNumber.TlvEnum)()),
  /**
   * The Tag field shall be the ID of a semantic tag located within the namespace indicated by NamespaceID.
   *
   * A device may expose tags from the common or device-specific namespaces and from manufacturer-specific namespaces
   * in a single TagList.
   *
   * @see {@link MatterSpecification.v142.Core} § 7.19.2.46.3
   */
  tag: (0, import_TlvObject.TlvField)(2, import_TlvNumber.TlvUInt8),
  /**
   * The Label field, if present, shall contain human-readable text suitable for display on a client. The content of
   * the Label field is defined by the manufacturer.
   *
   * This field shall be present when the MfgCode is not NULL. This field SHOULD NOT be used if the Tag is from a
   * standard namespace, unless the Tag requires further qualification. For example: A Tag that has the meaning of
   * "room" in a location namespace, would require the a label string to qualify the type of room, such as "1", "2b",
   * "Bathroom", etc.
   *
   * @see {@link MatterSpecification.v142.Core} § 7.19.2.46.4
   */
  label: (0, import_TlvObject.TlvOptionalField)(3, (0, import_TlvNullable.TlvNullable)(import_TlvString.TlvString.bound({ maxLength: 64 })))
});
//# sourceMappingURL=Semtag.js.map
