"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, {
  semtag: () => semtag
});
module.exports = __toCommonJS(semtag_exports);
var import_MatterDefinition = require("../MatterDefinition.js");
var import_elements = require("../../elements/index.js");
/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const semtag = (0, import_elements.DatatypeElement)(
  {
    name: "semtag",
    type: "struct",
    description: "Semantic Tag",
    isSeed: true,
    details: "This data type shall be represented by the following structure:",
    xref: { document: "core", section: "7.18.2.42" }
  },
  (0, import_elements.FieldElement)({
    name: "MfgCode",
    id: 0,
    type: "vendor-id",
    conformance: "M",
    default: null,
    quality: "X",
    details: "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.\nIf 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\u2019s namespace. A standard tag is a tag from a common namespace, a derived cluster namespace, or an applicable device-specific namespace.\nIf MfgCode is null, the NamespaceID field shall indicate a standard namespace.",
    xref: { document: "core", section: "7.18.2.42.1" }
  }),
  (0, import_elements.FieldElement)({
    name: "NamespaceId",
    id: 1,
    type: "namespace",
    conformance: "M",
    details: "The NamespaceID field shall identify a namespace.\nThe common and device-specific semantic tag namespaces are listed in StandardNamespaces.",
    xref: { document: "core", section: "7.18.2.42.2" }
  }),
  (0, import_elements.FieldElement)({
    name: "Tag",
    id: 2,
    type: "tag",
    conformance: "M",
    details: "The Tag field shall be the ID of a semantic tag located within the namespace indicated by NamespaceID.\nA device may expose tags from the common or device-specific namespaces and from manufacturer-specific namespaces in a single TagList.",
    xref: { document: "core", section: "7.18.2.42.3" }
  }),
  (0, import_elements.FieldElement)({
    name: "Label",
    id: 3,
    type: "string",
    conformance: "O",
    constraint: "max 64",
    default: null,
    quality: "X",
    details: '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.\nThis 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.',
    xref: { document: "core", section: "7.18.2.42.4" }
  })
);
import_MatterDefinition.MatterDefinition.children.push(semtag);
//# sourceMappingURL=semtag.js.map
