"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 laundry_washer_mode_exports = {};
__export(laundry_washer_mode_exports, {
  LaundryWasherMode: () => LaundryWasherMode,
  LaundryWasherModeCluster: () => LaundryWasherModeCluster
});
module.exports = __toCommonJS(laundry_washer_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-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
var LaundryWasherMode;
((LaundryWasherMode2) => {
  let Feature;
  ((Feature2) => {
    Feature2["OnOff"] = "OnOff";
  })(Feature = LaundryWasherMode2.Feature || (LaundryWasherMode2.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["Delicate"] = 16385] = "Delicate";
    ModeTag2[ModeTag2["Heavy"] = 16386] = "Heavy";
    ModeTag2[ModeTag2["Whites"] = 16387] = "Whites";
  })(ModeTag = LaundryWasherMode2.ModeTag || (LaundryWasherMode2.ModeTag = {}));
  LaundryWasherMode2.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)())
  });
  LaundryWasherMode2.TlvModeOption = (0, import_TlvObject.TlvObject)({
    label: (0, import_TlvObject.TlvField)(0, import_TlvString.TlvString.bound({ maxLength: 64 })),
    mode: (0, import_TlvObject.TlvField)(1, import_TlvNumber.TlvUInt8),
    modeTags: (0, import_TlvObject.TlvField)(2, (0, import_TlvArray.TlvArray)(LaundryWasherMode2.TlvModeTagStruct, { minLength: 1, maxLength: 8 }))
  });
  LaundryWasherMode2.Base = import_MutableCluster.MutableCluster.Component({
    id: 81,
    name: "LaundryWasherMode",
    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.5.6.1
       */
      supportedModes: (0, import_Cluster.FixedAttribute)(
        0,
        (0, import_TlvArray.TlvArray)(LaundryWasherMode2.TlvModeOption, { minLength: 2, maxLength: 255 }),
        { default: [] }
      ),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 8.5.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 LaundryWasherModeCluster elements matter.js activates for specific feature
     * combinations.
     */
    extensions: import_MutableCluster.MutableCluster.Extensions({ flags: { onOff: true }, component: false })
  });
  LaundryWasherMode2.ClusterInstance = (0, import_MutableCluster.MutableCluster)(LaundryWasherMode2.Base);
  LaundryWasherMode2.Cluster = LaundryWasherMode2.ClusterInstance;
  LaundryWasherMode2.Complete = LaundryWasherMode2.Cluster;
})(LaundryWasherMode || (LaundryWasherMode = {}));
const LaundryWasherModeCluster = LaundryWasherMode.Cluster;
import_ClusterRegistry.ClusterRegistry.register(LaundryWasherMode.Complete);
//# sourceMappingURL=laundry-washer-mode.js.map
