"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 messages_element_exports = {};
__export(messages_element_exports, {
  Messages: () => Messages
});
module.exports = __toCommonJS(messages_element_exports);
var import_MatterDefinition = require("../MatterDefinition.js");
var import_elements = require("../../elements/index.js");
/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const Messages = (0, import_elements.ClusterElement)(
  { name: "Messages", id: 151, classification: "application" },
  (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 3 }),
  (0, import_elements.AttributeElement)(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    (0, import_elements.FieldElement)({ name: "CONF", conformance: "O", constraint: "0", title: "ReceivedConfirmation" }),
    (0, import_elements.FieldElement)({ name: "RESP", conformance: "[CONF]", constraint: "1", title: "ConfirmationResponse" }),
    (0, import_elements.FieldElement)({ name: "RPLY", conformance: "[CONF]", constraint: "2", title: "ConfirmationReply" }),
    (0, import_elements.FieldElement)({ name: "PROT", conformance: "O", constraint: "3", title: "ProtectedMessages" })
  ),
  (0, import_elements.AttributeElement)(
    { name: "Messages", id: 0, type: "list", access: "R F V", conformance: "M", constraint: "max 8" },
    (0, import_elements.FieldElement)({ name: "entry", type: "MessageStruct" })
  ),
  (0, import_elements.AttributeElement)(
    { name: "ActiveMessageIDs", id: 1, type: "list", access: "R V", conformance: "M", constraint: "max 8" },
    (0, import_elements.FieldElement)({ name: "entry", type: "MessageID" })
  ),
  (0, import_elements.EventElement)(
    { name: "MessageQueued", id: 0, access: "S V", conformance: "M", priority: "info" },
    (0, import_elements.FieldElement)({ name: "MessageId", id: 0, type: "MessageID", access: "S", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 254, type: "FabricIndex" })
  ),
  (0, import_elements.EventElement)(
    { name: "MessagePresented", id: 1, access: "S V", conformance: "M", priority: "info" },
    (0, import_elements.FieldElement)({ name: "MessageId", id: 0, type: "MessageID", access: "S", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 254, type: "FabricIndex" })
  ),
  (0, import_elements.EventElement)(
    { name: "MessageComplete", id: 2, access: "S V", conformance: "M", priority: "info" },
    (0, import_elements.FieldElement)({ name: "MessageId", id: 0, type: "MessageID", access: "S", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "ResponseId", id: 1, type: "uint32", access: "S", conformance: "RESP", quality: "X" }),
    (0, import_elements.FieldElement)({
      name: "Reply",
      id: 2,
      type: "string",
      access: "S",
      conformance: "RPLY",
      constraint: "max 256",
      quality: "X"
    }),
    (0, import_elements.FieldElement)({
      name: "FutureMessagesPreference",
      id: 3,
      type: "FutureMessagePreferenceEnum",
      access: "S",
      conformance: "M",
      quality: "X"
    }),
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 254, type: "FabricIndex" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "PresentMessagesRequest",
      id: 0,
      access: "F O",
      conformance: "M",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "MessageId", id: 0, type: "MessageID", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Priority", id: 1, type: "MessagePriorityEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "MessageControl", id: 2, type: "MessageControlBitmap", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "StartTime", id: 3, type: "epoch-s", conformance: "M", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "Duration", id: 4, type: "uint64", conformance: "M", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "MessageText", id: 5, type: "string", conformance: "M", constraint: "max 256" }),
    (0, import_elements.FieldElement)(
      { name: "Responses", id: 6, type: "list", conformance: "RESP", constraint: "max 4" },
      (0, import_elements.FieldElement)({ name: "entry", type: "MessageResponseOptionStruct" })
    )
  ),
  (0, import_elements.CommandElement)(
    {
      name: "CancelMessagesRequest",
      id: 1,
      access: "F O",
      conformance: "M",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)(
      { name: "MessageIDs", id: 0, type: "list", conformance: "M", constraint: "max 8" },
      (0, import_elements.FieldElement)({ name: "entry", type: "MessageID" })
    )
  ),
  (0, import_elements.DatatypeElement)({ name: "MessageID", type: "octstr", constraint: "16" }),
  (0, import_elements.DatatypeElement)(
    { name: "MessageControlBitmap", type: "map16" },
    (0, import_elements.FieldElement)({ name: "ConfirmationRequired", constraint: "0" }),
    (0, import_elements.FieldElement)({ name: "ResponseRequired", constraint: "1" }),
    (0, import_elements.FieldElement)({ name: "ReplyMessage", constraint: "2" }),
    (0, import_elements.FieldElement)({ name: "MessageConfirmed", constraint: "3" }),
    (0, import_elements.FieldElement)({ name: "MessageProtected", constraint: "4" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "FutureMessagePreferenceEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Allowed", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Increased", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Reduced", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Disallowed", id: 3, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Banned", id: 4, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "MessagePriorityEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Low", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Medium", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "High", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Critical", id: 3, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "MessageStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "MessageId", id: 0, type: "MessageID", access: "S", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Priority", id: 1, type: "MessagePriorityEnum", access: "S", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "MessageControl", id: 2, type: "MessageControlBitmap", access: "S", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "StartTime", id: 3, type: "epoch-s", access: "S", conformance: "M", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "Duration", id: 4, type: "uint64", access: "S", conformance: "M", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "MessageText", id: 5, type: "string", access: "S", conformance: "M", constraint: "max 256" }),
    (0, import_elements.FieldElement)(
      { name: "Responses", id: 6, type: "list", access: "S", conformance: "RESP", constraint: "max 4" },
      (0, import_elements.FieldElement)({ name: "entry", type: "MessageResponseOptionStruct" })
    ),
    (0, import_elements.FieldElement)({ name: "FabricIndex", id: 254, type: "FabricIndex" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "MessageResponseOptionStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "MessageResponseId", id: 0, type: "uint32", conformance: "M", constraint: "min 1" }),
    (0, import_elements.FieldElement)({ name: "Label", id: 1, type: "string", conformance: "M", constraint: "max 32" })
  )
);
import_MatterDefinition.MatterDefinition.children.push(Messages);
//# sourceMappingURL=messages.element.js.map
