/**
 * @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 FanControl = Cluster(
  { name: "FanControl", id: 514, classification: "application" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 5 }),
  Attribute(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    Field({ name: "SPD", conformance: "O", constraint: "0", title: "MultiSpeed" }),
    Field({ name: "AUT", conformance: "O", constraint: "1", title: "Auto" }),
    Field({ name: "RCK", conformance: "O", constraint: "2", title: "Rocking" }),
    Field({ name: "WND", conformance: "O", constraint: "3", title: "Wind" }),
    Field({ name: "STEP", conformance: "O", constraint: "4", title: "Step" }),
    Field({ name: "DIR", conformance: "O", constraint: "5", title: "AirflowDirection" })
  ),
  Attribute({
    name: "FanMode",
    id: 0,
    type: "FanModeEnum",
    access: "RW VO",
    conformance: "M",
    constraint: "desc",
    quality: "N"
  }),
  Attribute({ name: "FanModeSequence", id: 1, type: "FanModeSequenceEnum", access: "R V", conformance: "M", quality: "F" }),
  Attribute({
    name: "PercentSetting",
    id: 2,
    type: "percent",
    access: "RW VO",
    conformance: "M",
    constraint: "max 100",
    quality: "X"
  }),
  Attribute({ name: "PercentCurrent", id: 3, type: "percent", access: "R V", conformance: "M", constraint: "max 100" }),
  Attribute({
    name: "SpeedMax",
    id: 4,
    type: "uint8",
    access: "R V",
    conformance: "SPD",
    constraint: "1 to 100",
    quality: "F"
  }),
  Attribute({
    name: "SpeedSetting",
    id: 5,
    type: "uint8",
    access: "RW VO",
    conformance: "SPD",
    constraint: "max speedMax",
    quality: "X"
  }),
  Attribute({
    name: "SpeedCurrent",
    id: 6,
    type: "uint8",
    access: "R V",
    conformance: "SPD",
    constraint: "max speedMax",
    quality: "P"
  }),
  Attribute({
    name: "RockSupport",
    id: 7,
    type: "RockBitmap",
    access: "R V",
    conformance: "RCK",
    constraint: "min 1",
    quality: "F"
  }),
  Attribute({
    name: "RockSetting",
    id: 8,
    type: "RockBitmap",
    access: "RW VO",
    conformance: "RCK",
    constraint: "desc",
    quality: "P"
  }),
  Attribute({
    name: "WindSupport",
    id: 9,
    type: "WindBitmap",
    access: "R V",
    conformance: "WND",
    constraint: "min 1",
    quality: "F"
  }),
  Attribute({
    name: "WindSetting",
    id: 10,
    type: "WindBitmap",
    access: "RW VO",
    conformance: "WND",
    constraint: "desc",
    quality: "P"
  }),
  Attribute({
    name: "AirflowDirection",
    id: 11,
    type: "AirflowDirectionEnum",
    access: "RW VO",
    conformance: "DIR",
    quality: "P"
  }),
  Command(
    { name: "Step", id: 0, access: "O", conformance: "STEP", direction: "request", response: "status" },
    Field({ name: "Direction", id: 0, type: "StepDirectionEnum", conformance: "M" }),
    Field({ name: "Wrap", id: 1, type: "bool", conformance: "O", default: false }),
    Field({ name: "LowestOff", id: 2, type: "bool", conformance: "O", default: true })
  ),
  Datatype(
    { name: "RockBitmap", type: "map8" },
    Field({ name: "RockLeftRight", constraint: "0" }),
    Field({ name: "RockUpDown", constraint: "1" }),
    Field({ name: "RockRound", constraint: "2" })
  ),
  Datatype(
    { name: "WindBitmap", type: "map8" },
    Field({ name: "SleepWind", constraint: "0" }),
    Field({ name: "NaturalWind", constraint: "1" })
  ),
  Datatype(
    { name: "StepDirectionEnum", type: "enum8" },
    Field({ name: "Increase", id: 0, conformance: "M" }),
    Field({ name: "Decrease", id: 1, conformance: "M" })
  ),
  Datatype(
    { name: "AirflowDirectionEnum", type: "enum8" },
    Field({ name: "Forward", id: 0, conformance: "M" }),
    Field({ name: "Reverse", id: 1, conformance: "M" })
  ),
  Datatype(
    { name: "FanModeEnum", type: "enum8" },
    Field({ name: "Off", id: 0, conformance: "M" }),
    Field({ name: "Low", id: 1, conformance: "O" }),
    Field({ name: "Medium", id: 2, conformance: "[Low]" }),
    Field({ name: "High", id: 3, conformance: "M" }),
    Field({ name: "On", id: 4, conformance: "D" }),
    Field({ name: "Auto", id: 5, conformance: "AUT" }),
    Field({ name: "Smart", id: 6, conformance: "D" })
  ),
  Datatype(
    { name: "FanModeSequenceEnum", type: "enum8" },
    Field({ name: "OffLowMedHigh", id: 0, conformance: "[!AUT].a" }),
    Field({ name: "OffLowHigh", id: 1, conformance: "[!AUT].a" }),
    Field({ name: "OffLowMedHighAuto", id: 2, conformance: "[AUT].b" }),
    Field({ name: "OffLowHighAuto", id: 3, conformance: "[AUT].b" }),
    Field({ name: "OffHighAuto", id: 4, conformance: "[AUT].b" }),
    Field({ name: "OffHigh", id: 5, conformance: "[!AUT].a" })
  )
);
MatterDefinition.children.push(FanControl);
export {
  FanControl
};
//# sourceMappingURL=fan-control.element.js.map
