"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 dishwasher_mode_exports = {};
__export(dishwasher_mode_exports, {
  DishwasherMode: () => DishwasherMode,
  DishwasherModeCluster: () => DishwasherModeCluster
});
module.exports = __toCommonJS(dishwasher_mode_exports);
var import_MutableCluster = require("../cluster/mutation/MutableCluster.js");
var import_BitmapSchema = require("../schema/BitmapSchema.js");
var import_Cluster = require("../cluster/Cluster.js");
var import_TlvArray = require("../tlv/TlvArray.js");
var import_TlvObject = require("../tlv/TlvObject.js");
var import_TlvString = require("../tlv/TlvString.js");
var import_TlvNumber = require("../tlv/TlvNumber.js");
var import_VendorId = require("../datatype/VendorId.js");
var import_mode_base = require("./mode-base.js");
var import_ClusterRegistry = require("../cluster/ClusterRegistry.js");
/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
var DishwasherMode;
((DishwasherMode2) => {
  let Feature;
  ((Feature2) => {
    Feature2["OnOff"] = "OnOff";
  })(Feature = DishwasherMode2.Feature || (DishwasherMode2.Feature = {}));
  let ModeTag;
  ((ModeTag2) => {
    ModeTag2[ModeTag2["Auto"] = 0] = "Auto";
    ModeTag2[ModeTag2["Quick"] = 1] = "Quick";
    ModeTag2[ModeTag2["Quiet"] = 2] = "Quiet";
    ModeTag2[ModeTag2["LowNoise"] = 3] = "LowNoise";
    ModeTag2[ModeTag2["LowEnergy"] = 4] = "LowEnergy";
    ModeTag2[ModeTag2["Vacation"] = 5] = "Vacation";
    ModeTag2[ModeTag2["Min"] = 6] = "Min";
    ModeTag2[ModeTag2["Max"] = 7] = "Max";
    ModeTag2[ModeTag2["Night"] = 8] = "Night";
    ModeTag2[ModeTag2["Day"] = 9] = "Day";
    ModeTag2[ModeTag2["Normal"] = 16384] = "Normal";
    ModeTag2[ModeTag2["Heavy"] = 16385] = "Heavy";
    ModeTag2[ModeTag2["Light"] = 16386] = "Light";
  })(ModeTag = DishwasherMode2.ModeTag || (DishwasherMode2.ModeTag = {}));
  DishwasherMode2.TlvModeTagStruct = (0, import_TlvObject.TlvObject)({
    /**
     * If the MfgCode field exists, the Value field shall be in the manufacturer-specific value range (see Section
     * 1.10.8, “Mode Namespace”).
     *
     * This field shall indicate the manufacturer’s VendorID and it shall determine the meaning of the Value field.
     *
     * The same manufacturer code and mode tag value in separate cluster instances are part of the same namespace
     * and have the same meaning. For example: a manufacturer tag meaning "pinch" can be used both in a cluster
     * whose purpose is to choose the amount of sugar, or in a cluster whose purpose is to choose the amount of
     * salt.
     *
     * @see {@link MatterSpecification.v142.Cluster} § 1.10.5.1.1
     */
    mfgCode: (0, import_TlvObject.TlvOptionalField)(0, import_VendorId.TlvVendorId),
    /**
     * This field shall indicate the mode tag within a mode tag namespace which is either manufacturer specific or
     * standard.
     *
     * @see {@link MatterSpecification.v142.Cluster} § 1.10.5.1.2
     */
    value: (0, import_TlvObject.TlvField)(1, (0, import_TlvNumber.TlvEnum)())
  });
  DishwasherMode2.TlvModeOption = (0, import_TlvObject.TlvObject)({
    /**
     * This field shall indicate readable text that describes the mode option, so that a client can provide it to
     * the user to indicate what this option means. This field is meant to be readable and understandable by the
     * user.
     *
     * @see {@link MatterSpecification.v142.Cluster} § 1.10.5.2.1
     */
    label: (0, import_TlvObject.TlvField)(0, import_TlvString.TlvString.bound({ maxLength: 64 })),
    /**
     * This field is used to identify the mode option.
     *
     * @see {@link MatterSpecification.v142.Cluster} § 1.10.5.2.2
     */
    mode: (0, import_TlvObject.TlvField)(1, import_TlvNumber.TlvUInt8),
    /**
     * This field shall contain a list of tags that are associated with the mode option. This may be used by clients
     * to determine the full or the partial semantics of a certain mode, depending on which tags they understand,
     * using standard definitions and/or manufacturer specific namespace definitions.
     *
     * The standard mode tags are defined in this cluster specification. For the derived cluster instances, if the
     * specification of the derived cluster defines a namespace, the set of standard mode tags also includes the
     * mode tag values from that namespace.
     *
     * Mode tags can help clients look for options that meet certain criteria, render the user interface, use the
     * mode in an automation, or to craft help text their voice-driven interfaces. A mode tag shall be either a
     * standard tag or a manufacturer specific tag, as defined in each ModeTagStruct list entry.
     *
     * A mode option may have more than one mode tag. A mode option may be associated with a mixture of standard and
     * manufacturer specific mode tags. A mode option shall be associated with at least one standard mode tag.
     *
     * Each mode tag in this field shall be distinct from other mode tags in this field. For example, a simplified
     * list containing [Auto, Auto] would not be allowed.
     *
     * A few examples are provided below.
     *
     *   • A mode named "100%" can have both the High (manufacturer specific) and Max (standard) mode tag. Clients
     *     seeking the mode for either High or Max will find the same mode in this case.
     *
     *   • A mode that includes a LowEnergy tag can be displayed by the client using a widget icon that shows a
     *     green leaf.
     *
     *   • A mode that includes a LowNoise tag may be used by the client when the user wishes for a lower level of
     *     audible sound, less likely to disturb the household’s activities.
     *
     *   • A mode that includes a LowEnergy tag (standard, defined in this cluster specification) and also a
     *     Delicate tag (standard, defined in the namespace of a Laundry Mode derived cluster).
     *
     *   • A mode that includes both a generic Quick tag (defined here), and Vacuum and Mop tags, (defined in the
     *     RVC Clean cluster that is a derivation of this cluster).
     *
     * @see {@link MatterSpecification.v142.Cluster} § 1.10.5.2.3
     */
    modeTags: (0, import_TlvObject.TlvField)(2, (0, import_TlvArray.TlvArray)(DishwasherMode2.TlvModeTagStruct, { maxLength: 8 }))
  });
  DishwasherMode2.Base = import_MutableCluster.MutableCluster.Component({
    id: 89,
    name: "DishwasherMode",
    revision: 3,
    features: {
      /**
       * Dependency with the OnOff cluster
       */
      onOff: (0, import_BitmapSchema.BitFlag)(0)
    },
    attributes: {
      /**
       * At least one entry in the SupportedModes attribute shall include the Normal mode tag in the ModeTags
       * field list.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 8.3.6.1
       */
      supportedModes: (0, import_Cluster.FixedAttribute)(
        0,
        (0, import_TlvArray.TlvArray)(DishwasherMode2.TlvModeOption, { minLength: 2, maxLength: 255 }),
        { default: [] }
      ),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 8.3.6
       */
      currentMode: (0, import_Cluster.Attribute)(1, import_TlvNumber.TlvUInt8, { persistent: true })
    },
    commands: {
      /**
       * This command is used to change device modes.
       *
       * On receipt of this command the device shall respond with a ChangeToModeResponse command.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 1.10.7.1
       */
      changeToMode: (0, import_Cluster.Command)(0, import_mode_base.ModeBase.TlvChangeToModeRequest, 1, import_mode_base.ModeBase.TlvChangeToModeResponse)
    },
    /**
     * This metadata controls which DishwasherModeCluster elements matter.js activates for specific feature
     * combinations.
     */
    extensions: import_MutableCluster.MutableCluster.Extensions({ flags: { onOff: true }, component: false })
  });
  DishwasherMode2.ClusterInstance = (0, import_MutableCluster.MutableCluster)(DishwasherMode2.Base);
  DishwasherMode2.Cluster = DishwasherMode2.ClusterInstance;
  DishwasherMode2.Complete = DishwasherMode2.Cluster;
})(DishwasherMode || (DishwasherMode = {}));
const DishwasherModeCluster = DishwasherMode.Cluster;
import_ClusterRegistry.ClusterRegistry.register(DishwasherMode.Complete);
//# sourceMappingURL=dishwasher-mode.js.map
