/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MatterDefinition } from "../MatterDefinition.js";
import {
  ClusterElement as Cluster,
  AttributeElement as Attribute,
  CommandElement as Command,
  FieldElement as Field,
  DatatypeElement as Datatype
} from "../../elements/index.js";
const JointFabricAdministrator = Cluster(
  { name: "JointFabricAdministrator", id: 1875, classification: "node" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
  Attribute({
    name: "AdministratorFabricIndex",
    id: 0,
    type: "fabric-idx",
    access: "A",
    conformance: "P, M",
    constraint: "1 to 254",
    quality: "X"
  }),
  Command({
    name: "IcaccsrRequest",
    id: 0,
    access: "A",
    conformance: "P, M",
    direction: "request",
    response: "IcaccsrResponse"
  }),
  Command(
    { name: "IcaccsrResponse", id: 1, conformance: "P, M", direction: "response" },
    Field({ name: "Icaccsr", id: 0, type: "octstr", conformance: "M", constraint: "max 600" })
  ),
  Command(
    { name: "AddIcac", id: 2, access: "A", conformance: "P, M", direction: "request", response: "IcacResponse" },
    Field({ name: "IcacValue", id: 1, type: "octstr", conformance: "M", constraint: "max 400" })
  ),
  Command(
    { name: "IcacResponse", id: 3, conformance: "P, M", direction: "response" },
    Field({ name: "StatusCode", id: 0, type: "ICACResponseStatusEnum", conformance: "M" })
  ),
  Command(
    {
      name: "OpenJointCommissioningWindow",
      id: 4,
      access: "A",
      conformance: "P, M",
      direction: "request",
      response: "status"
    },
    Field({ name: "CommissioningTimeout", id: 0, type: "uint16", conformance: "M", constraint: "desc" }),
    Field({ name: "PakePasscodeVerifier", id: 1, type: "octstr", conformance: "M", constraint: "97" }),
    Field({ name: "Discriminator", id: 2, type: "uint16", conformance: "M", constraint: "max 4095" }),
    Field({ name: "Iterations", id: 3, type: "uint32", conformance: "M", constraint: "1000 to 100000" }),
    Field({ name: "Salt", id: 4, type: "octstr", conformance: "M", constraint: "16 to 32" })
  ),
  Command({
    name: "TransferAnchorRequest",
    id: 5,
    access: "A",
    conformance: "P, M",
    direction: "request",
    response: "TransferAnchorResponse"
  }),
  Command(
    { name: "TransferAnchorResponse", id: 6, access: "A", conformance: "P, M", direction: "response" },
    Field({ name: "StatusCode", id: 0, type: "TransferAnchorResponseStatusEnum", conformance: "M" })
  ),
  Command({
    name: "TransferAnchorComplete",
    id: 7,
    access: "A",
    conformance: "P, M",
    direction: "request",
    response: "status"
  }),
  Command(
    {
      name: "AnnounceJointFabricAdministrator",
      id: 8,
      access: "A",
      conformance: "P, M",
      direction: "request",
      response: "status"
    },
    Field({ name: "EndpointId", id: 0, type: "endpoint-no", conformance: "M" })
  ),
  Datatype(
    { name: "ICACResponseStatusEnum", type: "enum8" },
    Field({ name: "Ok", id: 0, conformance: "M" }),
    Field({ name: "InvalidPublicKey", id: 1, conformance: "M" }),
    Field({ name: "InvalidIcac", id: 2, conformance: "M" })
  ),
  Datatype(
    { name: "TransferAnchorResponseStatusEnum", type: "enum8" },
    Field({ name: "Ok", id: 0, conformance: "M" }),
    Field({ name: "TransferAnchorStatusDatastoreBusy", id: 1, conformance: "M" }),
    Field({ name: "TransferAnchorStatusNoUserConsent", id: 2, conformance: "M" })
  ),
  Datatype(
    { name: "StatusCodeEnum", type: "enum8" },
    Field({ name: "Busy", id: 2, conformance: "P, M" }),
    Field({ name: "PakeParameterError", id: 3, conformance: "P, M" }),
    Field({ name: "WindowNotOpen", id: 4, conformance: "P, M" }),
    Field({ name: "VidNotVerified", id: 5, conformance: "P, M" }),
    Field({ name: "InvalidAdministratorFabricIndex", id: 6, conformance: "P, M" })
  )
);
MatterDefinition.children.push(JointFabricAdministrator);
export {
  JointFabricAdministrator
};
//# sourceMappingURL=joint-fabric-administrator-cluster.element.js.map
