/**
 * @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,
  EventElement as Event,
  FieldElement as Field,
  CommandElement as Command,
  DatatypeElement as Datatype
} from "../../elements/index.js";
const CommissionerControl = Cluster(
  { name: "CommissionerControl", id: 1873, classification: "node" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
  Attribute({
    name: "SupportedDeviceCategories",
    id: 0,
    type: "SupportedDeviceCategoryBitmap",
    access: "R M",
    conformance: "M",
    default: 0
  }),
  Event(
    { name: "CommissioningRequestResult", id: 0, access: "S M", conformance: "M", priority: "info" },
    Field({ name: "RequestId", id: 0, type: "uint64", access: "S", conformance: "M" }),
    Field({ name: "ClientNodeId", id: 1, type: "node-id", access: "S", conformance: "M" }),
    Field({ name: "StatusCode", id: 2, type: "status", access: "S", conformance: "M", constraint: "desc" }),
    Field({ name: "FabricIndex", id: 254, type: "FabricIndex" })
  ),
  Command(
    {
      name: "RequestCommissioningApproval",
      id: 0,
      access: "M",
      conformance: "M",
      direction: "request",
      response: "status"
    },
    Field({ name: "RequestId", id: 0, type: "uint64", conformance: "M" }),
    Field({ name: "VendorId", id: 1, type: "vendor-id", conformance: "M" }),
    Field({ name: "ProductId", id: 2, type: "uint16", conformance: "M" }),
    Field({ name: "Label", id: 3, type: "string", conformance: "O", constraint: "max 64" })
  ),
  Command(
    {
      name: "CommissionNode",
      id: 1,
      access: "M",
      conformance: "M",
      direction: "request",
      response: "ReverseOpenCommissioningWindow"
    },
    Field({ name: "RequestId", id: 0, type: "uint64", conformance: "M" }),
    Field({
      name: "ResponseTimeoutSeconds",
      id: 1,
      type: "uint16",
      conformance: "M",
      constraint: "30 to 120",
      default: 30
    })
  ),
  Command(
    { name: "ReverseOpenCommissioningWindow", id: 2, conformance: "M", direction: "response" },
    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" })
  ),
  Datatype(
    { name: "SupportedDeviceCategoryBitmap", type: "map32" },
    Field({ name: "FabricSynchronization", constraint: "0" })
  )
);
MatterDefinition.children.push(CommissionerControl);
export {
  CommissionerControl
};
//# sourceMappingURL=commissioner-control.element.js.map
