"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 list_exports = {};
__export(list_exports, {
  list: () => list
});
module.exports = __toCommonJS(list_exports);
var import_MatterDefinition = require("../MatterDefinition.js");
var import_elements = require("../../elements/index.js");
/**
 * @license
 * Copyright 2022-2024 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const list = (0, import_elements.DatatypeElement)({
  name: "list",
  description: "List",
  isSeed: true,
  metatype: "array",
  details: 'A list is defined as a collection of entries of the same data type, with a finite count from 0 to 65534. A cluster specification may define further constraints on the maximum possible count. The list entry data type shall be any defined data type, except a list data type, or any data type derived from a list.\nThe quality columns for a list definition are for the list.\nThe list entries are indicated with an index that is an unsigned integer starting at 0 (zero). The maintained order of entries, by index, is defined in the cluster specification, or undefined. Data that is defined as a list is indicated with "list[X]" where X is the entry type. The data type of the list entry has its own qualities, constraints, and conformance.\n### To define qualities for the list entry data type, make the list entry data type a defined local derived data type, with a table including the columns required to define and constrain the data type.\nThere is an inline shortcut to define the list entry data type constraints. See List Constraints.\nIt is recommended to put a maximum constraint on the list and list entry data types.\nIt is recommended that a list entry data type be a struct, to enable the addition of new fields to the list\u2019s entries in the future.\n  \u2022 The cluster data version shall be incremented when the list order or entries change.\n  \u2022 An entry shall NOT be null.\n  \u2022 The list shall support reading and reporting all entries.\n  \u2022 The list shall support reporting, updates, and/or deletion of one or more entries.\n  \u2022 If the list is writable, it shall support writing or deleting the entire list.\n  \u2022 If the list is writable, it shall support updating one or more individual entries by indicating     an index per updated entry.\n  \u2022 If the list is writable, it shall support deleting one or more individual entries by indicating     an index per deleted entry.\n  \u2022 If the list is writable, it shall support adding one or more individual entries.\n  \u2022 A list may define an entry that is a struct that is fabric-scoped (see Fabric-Scoped Quality).\n### Fabric-Scoped List\n  \u2022 A fabric-scoped list shall define an entry data type that is a struct, which shall also be     fabric-scoped (see Fabric-Scoped Struct).\nEach entry in a fabric-scoped list shall be fabric-scoped to a particular fabric or no fabric.\n### A fabric-scoped list supports a fabric-filter that filters the view of the list for read and write interactions. This filter simplifies client side logic that does not want to read or write fabric data that is not associated with the accessing fabric.\n  \u2022 An interaction upon a list with fabric-filtering shall only indicate and access entries where     the associated fabric matches the accessing fabric, and all other entries shall be ignored.\n  \u2022 Fabric-filtered list entries shall be in the same order as the full list.\n  \u2022 Fabric-filtered list entries shall be indexed from 0 with no gaps, as if the other entries did     not exist.\n  \u2022 For a write interaction, fabric-filtering shall be enabled.\n  \u2022 When writing to a fabric-scoped list, the write interaction shall be on an accessing fabric,     otherwise, the write interaction shall fail (see Interaction Model).\n  \u2022 For a read interaction on a list, fabric-filtering may be enabled.\n  \u2022 For a read interaction on a list, with fabric-filtering disabled, the list shall be reported as     a full list with all entries.\nlist[1] = [ { FabricIndex = B, Value = 55 } ]\nchanges the full list to:\nlist = [ { FabricIndex = A, Value = 20 },\n{ FabricIndex = B, Value = 30 },\n{ FabricIndex = A, Value = 40 },\n{ FabricIndex = B, Value = 55 },\n{ FabricIndex = B, Value = 60 } ]',
  xref: { document: "core", section: "7.18.1.8" }
});
import_MatterDefinition.MatterDefinition.children.push(list);
//# sourceMappingURL=list.js.map
