"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 groups_element_exports = {};
__export(groups_element_exports, {
  Groups: () => Groups
});
module.exports = __toCommonJS(groups_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 Groups = (0, import_elements.ClusterElement)(
  { name: "Groups", id: 4, classification: "endpoint" },
  (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 4 }),
  (0, import_elements.AttributeElement)(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    (0, import_elements.FieldElement)({ name: "GN", constraint: "0", default: 1, title: "GroupNames" })
  ),
  (0, import_elements.AttributeElement)(
    {
      name: "NameSupport",
      id: 0,
      type: "NameSupportBitmap",
      access: "R V",
      conformance: "M",
      constraint: "desc",
      quality: "F"
    },
    (0, import_elements.FieldElement)({ name: "GroupNames", constraint: "7", default: 1 })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "AddGroup",
      id: 0,
      access: "F M",
      conformance: "M",
      direction: "request",
      response: "AddGroupResponse"
    },
    (0, import_elements.FieldElement)({ name: "GroupId", id: 0, type: "group-id", conformance: "M", constraint: "min 1" }),
    (0, import_elements.FieldElement)({ name: "GroupName", id: 1, type: "string", conformance: "M", constraint: "max 16" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "ViewGroup",
      id: 1,
      access: "F O",
      conformance: "M",
      direction: "request",
      response: "ViewGroupResponse"
    },
    (0, import_elements.FieldElement)({ name: "GroupId", id: 0, type: "group-id", conformance: "M", constraint: "min 1" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "GetGroupMembership",
      id: 2,
      access: "F O",
      conformance: "M",
      direction: "request",
      response: "GetGroupMembershipResponse"
    },
    (0, import_elements.FieldElement)(
      { name: "GroupList", id: 0, type: "list", conformance: "M", constraint: "all[min 1]" },
      (0, import_elements.FieldElement)({ name: "entry", type: "group-id" })
    )
  ),
  (0, import_elements.CommandElement)(
    {
      name: "RemoveGroup",
      id: 3,
      access: "F M",
      conformance: "M",
      direction: "request",
      response: "RemoveGroupResponse"
    },
    (0, import_elements.FieldElement)({ name: "GroupId", id: 0, type: "group-id", conformance: "M", constraint: "min 1" })
  ),
  (0, import_elements.CommandElement)(
    { name: "RemoveAllGroups", id: 4, access: "F M", conformance: "M", direction: "request", response: "status" }
  ),
  (0, import_elements.CommandElement)(
    {
      name: "AddGroupIfIdentifying",
      id: 5,
      access: "F M",
      conformance: "M",
      direction: "request",
      response: "status"
    },
    (0, import_elements.FieldElement)({ name: "GroupId", id: 0, type: "group-id", conformance: "M", constraint: "min 1" }),
    (0, import_elements.FieldElement)({ name: "GroupName", id: 1, type: "string", conformance: "M", constraint: "max 16" })
  ),
  (0, import_elements.CommandElement)(
    { name: "AddGroupResponse", id: 0, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "Status", id: 0, type: "status", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "GroupId", id: 1, type: "group-id", conformance: "M", constraint: "min 1" })
  ),
  (0, import_elements.CommandElement)(
    { name: "ViewGroupResponse", id: 1, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "Status", id: 0, type: "status", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "GroupId", id: 1, type: "group-id", conformance: "M", constraint: "min 1" }),
    (0, import_elements.FieldElement)({ name: "GroupName", id: 2, type: "string", conformance: "M", constraint: "max 16" })
  ),
  (0, import_elements.CommandElement)(
    { name: "GetGroupMembershipResponse", id: 2, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "Capacity", id: 0, type: "uint8", conformance: "M", quality: "X" }),
    (0, import_elements.FieldElement)(
      { name: "GroupList", id: 1, type: "list", conformance: "M", constraint: "all[min 1]" },
      (0, import_elements.FieldElement)({ name: "entry", type: "group-id" })
    )
  ),
  (0, import_elements.CommandElement)(
    { name: "RemoveGroupResponse", id: 3, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "Status", id: 0, type: "status", conformance: "M", constraint: "desc" }),
    (0, import_elements.FieldElement)({ name: "GroupId", id: 1, type: "group-id", conformance: "M", constraint: "min 1" })
  ),
  (0, import_elements.DatatypeElement)({ name: "NameSupportBitmap", type: "map8" }, (0, import_elements.FieldElement)({ name: "GroupNames", constraint: "7" }))
);
import_MatterDefinition.MatterDefinition.children.push(Groups);
//# sourceMappingURL=groups.element.js.map
