/**
 * @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,
  FieldElement as Field,
  CommandElement as Command
} from "../../elements/index.js";
const MicrowaveOvenControl = Cluster(
  { name: "MicrowaveOvenControl", id: 95, classification: "application" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
  Attribute(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    Field({ name: "PWRNUM", conformance: "O.a", constraint: "0", title: "PowerAsNumber" }),
    Field({ name: "WATTS", conformance: "P, O.a", constraint: "1", title: "PowerInWatts" }),
    Field({ name: "PWRLMTS", conformance: "[PWRNUM]", constraint: "2", title: "PowerNumberLimits" })
  ),
  Attribute({ name: "CookTime", id: 0, type: "elapsed-s", access: "R V", conformance: "M", constraint: "1 to maxCookTime" }),
  Attribute({
    name: "MaxCookTime",
    id: 1,
    type: "elapsed-s",
    access: "R V",
    conformance: "M",
    constraint: "1 to 86400",
    quality: "F"
  }),
  Attribute({ name: "PowerSetting", id: 2, type: "uint8", access: "R V", conformance: "PWRNUM", constraint: "desc" }),
  Attribute({
    name: "MinPower",
    id: 3,
    type: "uint8",
    access: "R V",
    conformance: "PWRLMTS",
    constraint: "1 to 99",
    quality: "F"
  }),
  Attribute({
    name: "MaxPower",
    id: 4,
    type: "uint8",
    access: "R V",
    conformance: "PWRLMTS",
    constraint: "minPower + 1 to 100",
    quality: "F"
  }),
  Attribute({
    name: "PowerStep",
    id: 5,
    type: "uint8",
    access: "R V",
    conformance: "PWRLMTS",
    constraint: "desc",
    quality: "F"
  }),
  Attribute(
    {
      name: "SupportedWatts",
      id: 6,
      type: "list",
      access: "R V",
      conformance: "P, WATTS",
      constraint: "1 to 10",
      quality: "F"
    },
    Field({ name: "entry", type: "uint16" })
  ),
  Attribute({ name: "SelectedWattIndex", id: 7, type: "uint8", access: "R V", conformance: "P, WATTS", constraint: "desc" }),
  Attribute({ name: "WattRating", id: 8, type: "uint16", access: "R V", conformance: "O", quality: "F" }),
  Command(
    {
      name: "SetCookingParameters",
      id: 0,
      access: "O",
      conformance: "M",
      direction: "request",
      response: "status"
    },
    Field({ name: "CookMode", id: 0, type: "uint8", conformance: "O.b+", constraint: "desc" }),
    Field({
      name: "CookTime",
      id: 1,
      type: "elapsed-s",
      conformance: "O.b+",
      constraint: "1 to maxCookTime",
      default: 30
    }),
    Field({
      name: "PowerSetting",
      id: 2,
      type: "uint8",
      conformance: "[PWRNUM].b+",
      constraint: "minPower to maxPower",
      default: { type: "reference", name: "MaxPower" }
    }),
    Field({ name: "WattSettingIndex", id: 3, type: "uint8", conformance: "[WATTS].b+", constraint: "desc" }),
    Field({ name: "StartAfterSetting", id: 4, type: "bool", conformance: "O", default: false })
  ),
  Command(
    { name: "AddMoreTime", id: 1, access: "O", conformance: "O", direction: "request", response: "status" },
    Field({ name: "TimeToAdd", id: 0, type: "elapsed-s", conformance: "M", constraint: "1 to maxCookTime" })
  )
);
MatterDefinition.children.push(MicrowaveOvenControl);
export {
  MicrowaveOvenControl
};
//# sourceMappingURL=microwave-oven-control.element.js.map
