/**
 * @license
 * Copyright 2022-2024 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
} from "../../elements/index.js";
const BooleanState = Cluster({
  name: "BooleanState",
  id: 69,
  classification: "application",
  pics: "BOOL",
  details: "This cluster provides an interface to a boolean state.",
  xref: { document: "cluster", section: "1.7" },
  children: [
    Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
    Attribute({
      name: "StateValue",
      id: 0,
      type: "bool",
      access: "R V",
      conformance: "M",
      quality: "P",
      details: "This represents a boolean state.\nThe semantics of this boolean state are defined by the device type using this cluster.\nFor example, in a Contact Sensor device type, FALSE=open or no contact, TRUE=closed or contact.",
      xref: { document: "cluster", section: "1.7.4.1" }
    }),
    Event({
      name: "StateChange",
      id: 0,
      access: "V",
      conformance: "O",
      priority: "info",
      details: "If this event is supported, it shall be generated when the StateValue attribute changes.",
      xref: { document: "cluster", section: "1.7.5.1" },
      children: [Field({
        name: "StateValue",
        id: 0,
        type: "bool",
        conformance: "M",
        details: "This field shall indicate the new value of the StateValue attribute.",
        xref: { document: "cluster", section: "1.7.5.1.1" }
      })]
    })
  ]
});
MatterDefinition.children.push(BooleanState);
export {
  BooleanState
};
//# sourceMappingURL=BooleanState.js.map
