/**
 * @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 WindowCovering = Cluster(
  { name: "WindowCovering", id: 258, classification: "application" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 6 }),
  Attribute(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    Field({ name: "LF", conformance: "O.a+", constraint: "0", title: "Lift" }),
    Field({ name: "TL", conformance: "O.a+", constraint: "1", title: "Tilt" }),
    Field({ name: "PA_LF", conformance: "[LF]", constraint: "2", title: "PositionAwareLift" }),
    Field({ name: "ABS", conformance: "P, O", constraint: "3", title: "AbsolutePosition" }),
    Field({ name: "PA_TL", conformance: "[TL]", constraint: "4", title: "PositionAwareTilt" })
  ),
  Attribute({
    name: "Type",
    id: 0,
    type: "TypeEnum",
    access: "R V",
    conformance: "M",
    constraint: "desc",
    default: 0,
    quality: "F"
  }),
  Attribute({
    name: "PhysicalClosedLimitLift",
    id: 1,
    type: "uint16",
    access: "R V",
    conformance: "P, [LF & PA_LF & ABS]",
    default: 0,
    quality: "F"
  }),
  Attribute({
    name: "PhysicalClosedLimitTilt",
    id: 2,
    type: "uint16",
    access: "R V",
    conformance: "P, [TL & PA_TL & ABS]",
    default: 0,
    quality: "F"
  }),
  Attribute({
    name: "CurrentPositionLift",
    id: 3,
    type: "uint16",
    access: "R V",
    conformance: "P, [LF & PA_LF & ABS]",
    constraint: "installedOpenLimitLift to installedClosedLimitLift",
    default: null,
    quality: "X N"
  }),
  Attribute({
    name: "CurrentPositionTilt",
    id: 4,
    type: "uint16",
    access: "R V",
    conformance: "P, [TL & PA_TL & ABS]",
    constraint: "installedOpenLimitTilt to installedClosedLimitTilt",
    default: null,
    quality: "X N"
  }),
  Attribute({
    name: "NumberOfActuationsLift",
    id: 5,
    type: "uint16",
    access: "R V",
    conformance: "[LF]",
    default: 0,
    quality: "N"
  }),
  Attribute({
    name: "NumberOfActuationsTilt",
    id: 6,
    type: "uint16",
    access: "R V",
    conformance: "[TL]",
    default: 0,
    quality: "N"
  }),
  Attribute({
    name: "ConfigStatus",
    id: 7,
    type: "ConfigStatusBitmap",
    access: "R V",
    conformance: "M",
    constraint: "desc",
    quality: "N"
  }),
  Attribute({
    name: "CurrentPositionLiftPercentage",
    id: 8,
    type: "percent",
    access: "R V",
    conformance: "[LF & PA_LF]",
    default: null,
    quality: "X N P"
  }),
  Attribute({
    name: "CurrentPositionTiltPercentage",
    id: 9,
    type: "percent",
    access: "R V",
    conformance: "[TL & PA_TL]",
    default: null,
    quality: "X N P"
  }),
  Attribute({
    name: "OperationalStatus",
    id: 10,
    type: "OperationalStatusBitmap",
    access: "R V",
    conformance: "M",
    constraint: "max 63",
    default: 0,
    quality: "P"
  }),
  Attribute({
    name: "TargetPositionLiftPercent100ths",
    id: 11,
    type: "percent100ths",
    access: "R V",
    conformance: "LF & PA_LF",
    default: null,
    quality: "X P"
  }),
  Attribute({
    name: "TargetPositionTiltPercent100ths",
    id: 12,
    type: "percent100ths",
    access: "R V",
    conformance: "TL & PA_TL",
    default: null,
    quality: "X P"
  }),
  Attribute({
    name: "EndProductType",
    id: 13,
    type: "EndProductTypeEnum",
    access: "R V",
    conformance: "M",
    constraint: "desc",
    default: 0,
    quality: "F"
  }),
  Attribute({
    name: "CurrentPositionLiftPercent100ths",
    id: 14,
    type: "percent100ths",
    access: "R V",
    conformance: "LF & PA_LF",
    constraint: "max 10000",
    default: null,
    quality: "X N P"
  }),
  Attribute({
    name: "CurrentPositionTiltPercent100ths",
    id: 15,
    type: "percent100ths",
    access: "R V",
    conformance: "TL & PA_TL",
    constraint: "max 10000",
    default: null,
    quality: "X N P"
  }),
  Attribute({
    name: "InstalledOpenLimitLift",
    id: 16,
    type: "uint16",
    access: "R V",
    conformance: "P, LF & PA_LF & ABS",
    constraint: "max 65534",
    default: 0,
    quality: "N"
  }),
  Attribute({
    name: "InstalledClosedLimitLift",
    id: 17,
    type: "uint16",
    access: "R V",
    conformance: "P, LF & PA_LF & ABS",
    constraint: "max 65534",
    default: 65534,
    quality: "N"
  }),
  Attribute({
    name: "InstalledOpenLimitTilt",
    id: 18,
    type: "uint16",
    access: "R V",
    conformance: "P, TL & PA_TL & ABS",
    constraint: "max 65534",
    default: 0,
    quality: "N"
  }),
  Attribute({
    name: "InstalledClosedLimitTilt",
    id: 19,
    type: "uint16",
    access: "R V",
    conformance: "P, TL & PA_TL & ABS",
    constraint: "max 65534",
    default: 65534,
    quality: "N"
  }),
  Attribute({ name: "VelocityLift", id: 20, conformance: "D" }),
  Attribute({ name: "AccelerationTimeLift", id: 21, conformance: "D" }),
  Attribute({ name: "DecelerationTimeLift", id: 22, conformance: "D" }),
  Attribute({
    name: "Mode",
    id: 23,
    type: "ModeBitmap",
    access: "RW VM",
    conformance: "M",
    constraint: "max 15",
    default: 0,
    quality: "N"
  }),
  Attribute({ name: "IntermediateSetpointsLift", id: 24, conformance: "D" }),
  Attribute({ name: "IntermediateSetpointsTilt", id: 25, conformance: "D" }),
  Attribute({
    name: "SafetyStatus",
    id: 26,
    type: "SafetyStatusBitmap",
    access: "R V",
    conformance: "O",
    constraint: "desc",
    default: 0,
    quality: "P"
  }),
  Command({ name: "UpOrOpen", id: 0, access: "O", conformance: "M", direction: "request", response: "status" }),
  Command({ name: "DownOrClose", id: 1, access: "O", conformance: "M", direction: "request", response: "status" }),
  Command({ name: "StopMotion", id: 2, access: "O", conformance: "M", direction: "request", response: "status" }),
  Command(
    {
      name: "GoToLiftValue",
      id: 4,
      access: "O",
      conformance: "P, [LF & ABS]",
      direction: "request",
      response: "status"
    },
    Field({
      name: "LiftValue",
      id: 0,
      type: "uint16",
      conformance: "M",
      constraint: "installedOpenLimitLift to installedClosedLimitLift"
    })
  ),
  Command(
    {
      name: "GoToLiftPercentage",
      id: 5,
      access: "O",
      conformance: "LF & PA_LF, [LF]",
      direction: "request",
      response: "status"
    },
    Field({ name: "LiftPercent100thsValue", id: 0, type: "percent100ths", conformance: "M", constraint: "desc" }),
    Field({ name: "Ignored", id: 1, conformance: "X" })
  ),
  Command(
    {
      name: "GoToTiltValue",
      id: 7,
      access: "O",
      conformance: "P, [TL & ABS]",
      direction: "request",
      response: "status"
    },
    Field({
      name: "TiltValue",
      id: 0,
      type: "uint16",
      conformance: "M",
      constraint: "installedOpenLimitTilt to installedClosedLimitTilt"
    })
  ),
  Command(
    {
      name: "GoToTiltPercentage",
      id: 8,
      access: "O",
      conformance: "TL & PA_TL, [TL]",
      direction: "request",
      response: "status"
    },
    Field({ name: "TiltPercent100thsValue", id: 0, type: "percent100ths", conformance: "M", constraint: "desc" }),
    Field({ name: "Ignored", id: 1, conformance: "X" })
  ),
  Datatype(
    { name: "ConfigStatusBitmap", type: "map8" },
    Field({ name: "Operational", constraint: "0" }),
    Field({ name: "OnlineReserved", constraint: "1" }),
    Field({ name: "LiftMovementReversed", constraint: "2" }),
    Field({ name: "LiftPositionAware", constraint: "3" }),
    Field({ name: "TiltPositionAware", constraint: "4" }),
    Field({ name: "LiftEncoderControlled", constraint: "5" }),
    Field({ name: "TiltEncoderControlled", constraint: "6" })
  ),
  Datatype(
    { name: "ModeBitmap", type: "map8" },
    Field({ name: "MotorDirectionReversed", constraint: "0" }),
    Field({ name: "CalibrationMode", constraint: "1" }),
    Field({ name: "MaintenanceMode", constraint: "2" }),
    Field({ name: "LedFeedback", constraint: "3" })
  ),
  Datatype(
    { name: "OperationalStatusBitmap", type: "map8" },
    Field({ name: "Global", type: "MovementStatus", constraint: "0 to 1" }),
    Field({ name: "Lift", type: "MovementStatus", constraint: "2 to 3" }),
    Field({ name: "Tilt", type: "MovementStatus", constraint: "4 to 5" })
  ),
  Datatype(
    { name: "SafetyStatusBitmap", type: "map16" },
    Field({ name: "RemoteLockout", constraint: "0" }),
    Field({ name: "TamperDetection", constraint: "1" }),
    Field({ name: "FailedCommunication", constraint: "2" }),
    Field({ name: "PositionFailure", constraint: "3" }),
    Field({ name: "ThermalProtection", constraint: "4" }),
    Field({ name: "ObstacleDetected", constraint: "5" }),
    Field({ name: "Power", constraint: "6" }),
    Field({ name: "StopInput", constraint: "7" }),
    Field({ name: "MotorJammed", constraint: "8" }),
    Field({ name: "HardwareFailure", constraint: "9" }),
    Field({ name: "ManualOperation", constraint: "10" }),
    Field({ name: "Protection", constraint: "11" })
  ),
  Datatype(
    { name: "TypeEnum", type: "enum8" },
    Field({ name: "Rollershade", id: 0, conformance: "LF & !TL" }),
    Field({ name: "Rollershade2Motor", id: 1, conformance: "LF & !TL" }),
    Field({ name: "RollershadeExterior", id: 2, conformance: "LF & !TL" }),
    Field({ name: "RollershadeExterior2Motor", id: 3, conformance: "LF & !TL" }),
    Field({ name: "Drapery", id: 4, conformance: "LF & !TL" }),
    Field({ name: "Awning", id: 5, conformance: "LF & !TL" }),
    Field({ name: "Shutter", id: 6, conformance: "LF | TL" }),
    Field({ name: "TiltBlindTiltOnly", id: 7, conformance: "!LF & TL" }),
    Field({ name: "TiltBlindLift", id: 8, conformance: "LF & TL" }),
    Field({ name: "ProjectorScreen", id: 9, conformance: "LF & !TL" }),
    Field({ name: "Unknown", id: 255, conformance: "O" })
  ),
  Datatype(
    { name: "EndProductTypeEnum", type: "enum8" },
    Field({ name: "RollerShade", id: 0, conformance: "M" }),
    Field({ name: "RomanShade", id: 1, conformance: "M" }),
    Field({ name: "BalloonShade", id: 2, conformance: "M" }),
    Field({ name: "WovenWood", id: 3, conformance: "M" }),
    Field({ name: "PleatedShade", id: 4, conformance: "M" }),
    Field({ name: "CellularShade", id: 5, conformance: "M" }),
    Field({ name: "LayeredShade", id: 6, conformance: "M" }),
    Field({ name: "LayeredShade2D", id: 7, conformance: "M" }),
    Field({ name: "SheerShade", id: 8, conformance: "M" }),
    Field({ name: "TiltOnlyInteriorBlind", id: 9, conformance: "M" }),
    Field({ name: "InteriorBlind", id: 10, conformance: "M" }),
    Field({ name: "VerticalBlindStripCurtain", id: 11, conformance: "M" }),
    Field({ name: "InteriorVenetianBlind", id: 12, conformance: "M" }),
    Field({ name: "ExteriorVenetianBlind", id: 13, conformance: "M" }),
    Field({ name: "LateralLeftCurtain", id: 14, conformance: "M" }),
    Field({ name: "LateralRightCurtain", id: 15, conformance: "M" }),
    Field({ name: "CentralCurtain", id: 16, conformance: "M" }),
    Field({ name: "RollerShutter", id: 17, conformance: "M" }),
    Field({ name: "ExteriorVerticalScreen", id: 18, conformance: "M" }),
    Field({ name: "AwningTerracePatio", id: 19, conformance: "M" }),
    Field({ name: "AwningVerticalScreen", id: 20, conformance: "M" }),
    Field({ name: "TiltOnlyPergola", id: 21, conformance: "M" }),
    Field({ name: "SwingingShutter", id: 22, conformance: "M" }),
    Field({ name: "SlidingShutter", id: 23, conformance: "M" }),
    Field({ name: "Unknown", id: 255, conformance: "M" })
  ),
  Datatype(
    { name: "MovementStatus", type: "enum8" },
    Field({ name: "Stopped", id: 0 }),
    Field({ name: "Opening", id: 1 }),
    Field({ name: "Closing", id: 2 })
  )
);
MatterDefinition.children.push(WindowCovering);
export {
  WindowCovering
};
//# sourceMappingURL=window-covering-cluster.element.js.map
