"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var LaundryWasherControls_exports = {};
__export(LaundryWasherControls_exports, {
  LaundryWasherControls: () => LaundryWasherControls
});
module.exports = __toCommonJS(LaundryWasherControls_exports);
var import_MatterDefinition = require("../MatterDefinition.js");
var import_elements = require("../../elements/index.js");
/**
 * @license
 * Copyright 2022-2024 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const LaundryWasherControls = (0, import_elements.ClusterElement)({
  name: "LaundryWasherControls",
  id: 83,
  classification: "application",
  pics: "WASHERCTRL",
  details: "This cluster provides a way to access options associated with the operation of a laundry washer device type.",
  xref: { document: "cluster", section: "8.6" },
  children: [
    (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
    (0, import_elements.AttributeElement)({
      name: "FeatureMap",
      id: 65532,
      type: "FeatureMap",
      xref: { document: "cluster", section: "8.6.4" },
      children: [
        (0, import_elements.FieldElement)({
          name: "SPIN",
          conformance: "O",
          constraint: "0",
          description: "Spin",
          details: "This feature indicates multiple spin speeds are supported in at least one supported mode. Note that some modes may not support multiple spin speeds even if this feature is supported.",
          xref: { document: "cluster", section: "8.6.4.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "RINSE",
          conformance: "O",
          constraint: "1",
          description: "Rinse",
          details: "This feature indicates multiple rinse cycles are supported in at least one supported mode. Note that some modes may not support selection of the number of rinse cycles even if this feature is supported.",
          xref: { document: "cluster", section: "8.6.4.2" }
        })
      ]
    }),
    (0, import_elements.AttributeElement)({
      name: "SpinSpeeds",
      id: 0,
      type: "list",
      access: "R V",
      conformance: "SPIN",
      constraint: "max 16[max 64]",
      details: "This attribute indicates the list of spin speeds available to the appliance in the currently selected mode. The spin speed values are determined by the manufacturer. At least one spin speed value shall be provided in the SpinSpeeds list. The list of spin speeds may change depending on the currently selected Laundry Washer mode. For example, Quick mode might have a completely different list of SpinSpeeds than Delicates mode.",
      xref: { document: "cluster", section: "8.6.6.1" },
      children: [(0, import_elements.FieldElement)({ name: "entry", type: "string" })]
    }),
    (0, import_elements.AttributeElement)({
      name: "SpinSpeedCurrent",
      id: 1,
      type: "uint8",
      access: "RW VO",
      conformance: "SPIN",
      constraint: "0 to 15",
      quality: "X",
      details: "This attribute indicates the currently selected spin speed. It is the index into the SpinSpeeds list of the selected spin speed, as such, this attribute can be an integer between 0 and the number of entries in SpinSpeeds - 1. If a value is received that is outside of the defined constraints, a CONSTRAINT_ERROR shall be sent as the response. If a value is attempted to be written that doesn\u2019t match a valid index (e.g. an index of 5 when the list has 4 values), a CONSTRAINT_ERROR shall be sent as the response. If null is written to this attribute, there will be no spin speed for the selected cycle. If the value is null, there will be no spin speed on the current mode.",
      xref: { document: "cluster", section: "8.6.6.2" }
    }),
    (0, import_elements.AttributeElement)({
      name: "NumberOfRinses",
      id: 2,
      type: "NumberOfRinsesEnum",
      access: "RW VO",
      conformance: "RINSE",
      constraint: "desc",
      default: 1,
      details: "This attribute represents how many times a rinse cycle shall be performed on a device for the current mode of operation. A value of None shall indicate that no rinse cycle will be performed. This value may be set by the client to adjust the number of rinses that are performed for the current mode of operation. If the device is not in a compatible state to accept the provided value, an INVALID_IN_STATE error shall be sent as the response.",
      xref: { document: "cluster", section: "8.6.6.3" }
    }),
    (0, import_elements.AttributeElement)({
      name: "SupportedRinses",
      id: 3,
      type: "list",
      access: "R V",
      conformance: "RINSE",
      constraint: "max 4",
      details: "This attribute represents the amount of rinses allowed for a specific mode. Each entry shall indicate a NumberOfRinsesEnum value that is possible in the selected mode on the device. The value of this attribute may change at runtime based on the currently selected mode. Each entry shall be distinct.",
      xref: { document: "cluster", section: "8.6.6.4" },
      children: [(0, import_elements.FieldElement)({ name: "entry", type: "NumberOfRinsesEnum" })]
    }),
    (0, import_elements.DatatypeElement)({
      name: "NumberOfRinsesEnum",
      type: "enum8",
      details: "The NumberOfRinsesEnum provides a representation of the number of rinses that will be performed for a selected mode. NumberOfRinsesEnum is derived from enum8. It is up to the device manufacturer to determine the mapping between the enum values and the corresponding numbers of rinses.",
      xref: { document: "cluster", section: "8.6.5.1" },
      children: [
        (0, import_elements.FieldElement)({
          name: "None",
          id: 0,
          conformance: "RINSE",
          description: "This laundry washer mode does not perform rinse cycles"
        }),
        (0, import_elements.FieldElement)({
          name: "Normal",
          id: 1,
          conformance: "RINSE",
          description: "This laundry washer mode performs normal rinse cycles determined by the manufacturer"
        }),
        (0, import_elements.FieldElement)({
          name: "Extra",
          id: 2,
          conformance: "RINSE",
          description: "This laundry washer mode performs an extra rinse cycle"
        }),
        (0, import_elements.FieldElement)({
          name: "Max",
          id: 3,
          conformance: "RINSE",
          description: "This laundry washer mode performs the maximum number of rinse cycles determined by the manufacturer"
        })
      ]
    })
  ]
});
import_MatterDefinition.MatterDefinition.children.push(LaundryWasherControls);
//# sourceMappingURL=LaundryWasherControls.js.map
