/**
 * @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 OnOff = Cluster(
  { name: "OnOff", id: 6, classification: "application" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 6 }),
  Attribute(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    Field({ name: "LT", conformance: "[!OFFONLY]", constraint: "0", title: "Lighting" }),
    Field({ name: "DF", conformance: "[!OFFONLY]", constraint: "1", title: "DeadFrontBehavior" }),
    Field({ name: "OFFONLY", conformance: "[!LT | DF]", constraint: "2", title: "OffOnly" })
  ),
  Attribute({ name: "OnOff", id: 0, type: "bool", access: "R V", conformance: "M", quality: "N S" }),
  Attribute({ name: "GlobalSceneControl", id: 16384, type: "bool", access: "R V", conformance: "LT" }),
  Attribute({ name: "OnTime", id: 16385, type: "uint16", access: "RW VO", conformance: "LT" }),
  Attribute({ name: "OffWaitTime", id: 16386, type: "uint16", access: "RW VO", conformance: "LT" }),
  Attribute({
    name: "StartUpOnOff",
    id: 16387,
    type: "StartUpOnOffEnum",
    access: "RW VM",
    conformance: "LT",
    constraint: "desc",
    quality: "X N"
  }),
  Command({ name: "Off", id: 0, access: "O", conformance: "M", direction: "request", response: "status" }),
  Command({ name: "On", id: 1, access: "O", conformance: "!OFFONLY", direction: "request", response: "status" }),
  Command({ name: "Toggle", id: 2, access: "O", conformance: "!OFFONLY", direction: "request", response: "status" }),
  Command(
    { name: "OffWithEffect", id: 64, access: "O", conformance: "LT", direction: "request", response: "status" },
    Field({ name: "EffectIdentifier", id: 0, type: "EffectIdentifierEnum", conformance: "M", constraint: "desc" }),
    Field({ name: "EffectVariant", id: 1, type: "enum8", conformance: "M", constraint: "desc" })
  ),
  Command({
    name: "OnWithRecallGlobalScene",
    id: 65,
    access: "O",
    conformance: "LT",
    direction: "request",
    response: "status"
  }),
  Command(
    { name: "OnWithTimedOff", id: 66, access: "O", conformance: "LT", direction: "request", response: "status" },
    Field({ name: "OnOffControl", id: 0, type: "OnOffControlBitmap", conformance: "M", constraint: "0 to 1" }),
    Field({ name: "OnTime", id: 1, type: "uint16", conformance: "M", constraint: "max 65534" }),
    Field({ name: "OffWaitTime", id: 2, type: "uint16", conformance: "M", constraint: "max 65534" })
  ),
  Datatype({ name: "OnOffControlBitmap", type: "map8" }, Field({ name: "AcceptOnlyWhenOn", constraint: "0" })),
  Datatype(
    { name: "StartUpOnOffEnum", type: "enum8" },
    Field({ name: "Off", id: 0, conformance: "M" }),
    Field({ name: "On", id: 1, conformance: "M" }),
    Field({ name: "Toggle", id: 2, conformance: "M" })
  ),
  Datatype(
    { name: "EffectIdentifierEnum", type: "enum8" },
    Field({ name: "DelayedAllOff", id: 0, conformance: "M" }),
    Field({ name: "DyingLight", id: 1, conformance: "M" })
  ),
  Datatype(
    { name: "DelayedAllOffEffectVariantEnum", type: "enum8" },
    Field({ name: "DelayedOffFastFade", id: 0, conformance: "M" }),
    Field({ name: "NoFade", id: 1, conformance: "M" }),
    Field({ name: "DelayedOffSlowFade", id: 2, conformance: "M" })
  ),
  Datatype(
    { name: "DyingLightEffectVariantEnum", type: "enum8" },
    Field({ name: "DyingLightFadeOff", id: 0, conformance: "M" })
  )
);
MatterDefinition.children.push(OnOff);
export {
  OnOff
};
//# sourceMappingURL=on-off.element.js.map
