/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MatterDefinition } from "../MatterDefinition.js";
import {
  ClusterElement as Cluster,
  AttributeElement as Attribute,
  FieldElement as Field,
  CommandElement as Command,
  DatatypeElement as Datatype
} from "../../elements/index.js";
const ThreadNetworkDirectory = Cluster(
  { name: "ThreadNetworkDirectory", id: 1107, classification: "application" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
  Attribute({
    name: "PreferredExtendedPanId",
    id: 0,
    type: "octstr",
    access: "RW VM",
    conformance: "M",
    constraint: "8",
    quality: "X N"
  }),
  Attribute(
    {
      name: "ThreadNetworks",
      id: 1,
      type: "list",
      access: "R V",
      conformance: "M",
      constraint: "max threadNetworkTableSize",
      quality: "N"
    },
    Field({ name: "entry", type: "ThreadNetworkStruct" })
  ),
  Attribute({
    name: "ThreadNetworkTableSize",
    id: 2,
    type: "uint8",
    access: "R V",
    conformance: "M",
    constraint: "desc",
    quality: "F"
  }),
  Command(
    { name: "AddNetwork", id: 0, access: "M T", conformance: "M", direction: "request", response: "status" },
    Field({ name: "OperationalDataset", id: 0, type: "octstr", conformance: "M", constraint: "max 254" })
  ),
  Command(
    { name: "RemoveNetwork", id: 1, access: "M T", conformance: "M", direction: "request", response: "status" },
    Field({ name: "ExtendedPanId", id: 0, type: "octstr", conformance: "M", constraint: "8" })
  ),
  Command(
    {
      name: "GetOperationalDataset",
      id: 2,
      access: "M",
      conformance: "M",
      direction: "request",
      response: "OperationalDatasetResponse"
    },
    Field({ name: "ExtendedPanId", id: 0, type: "octstr", conformance: "M", constraint: "8" })
  ),
  Command(
    { name: "OperationalDatasetResponse", id: 3, conformance: "M", direction: "response" },
    Field({ name: "OperationalDataset", id: 0, type: "octstr", conformance: "M", constraint: "max 254" })
  ),
  Datatype(
    { name: "ThreadNetworkStruct", type: "struct" },
    Field({ name: "ExtendedPanId", id: 0, type: "octstr", conformance: "M", constraint: "8" }),
    Field({ name: "NetworkName", id: 1, type: "string", conformance: "M", constraint: "1 to 16" }),
    Field({ name: "Channel", id: 2, type: "uint16", conformance: "M" }),
    Field({ name: "ActiveTimestamp", id: 3, type: "uint64", conformance: "M" })
  )
);
MatterDefinition.children.push(ThreadNetworkDirectory);
export {
  ThreadNetworkDirectory
};
//# sourceMappingURL=thread-network-directory.element.js.map
