"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 pump_configuration_and_control_exports = {};
__export(pump_configuration_and_control_exports, {
  PumpConfigurationAndControl: () => PumpConfigurationAndControl,
  PumpConfigurationAndControlCluster: () => PumpConfigurationAndControlCluster
});
module.exports = __toCommonJS(pump_configuration_and_control_exports);
var import_MutableCluster = require("../cluster/mutation/MutableCluster.js");
var import_Cluster = require("../cluster/Cluster.js");
var import_TlvNumber = require("../tlv/TlvNumber.js");
var import_TlvNullable = require("../tlv/TlvNullable.js");
var import_BitmapSchema = require("../schema/BitmapSchema.js");
var import_model = require("#model");
var import_Priority = require("../globals/Priority.js");
var import_TlvNoArguments = require("../tlv/TlvNoArguments.js");
var import_ClusterRegistry = require("../cluster/ClusterRegistry.js");
/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
var PumpConfigurationAndControl;
((PumpConfigurationAndControl2) => {
  let Feature;
  ((Feature2) => {
    Feature2["ConstantPressure"] = "ConstantPressure";
    Feature2["CompensatedPressure"] = "CompensatedPressure";
    Feature2["ConstantFlow"] = "ConstantFlow";
    Feature2["ConstantSpeed"] = "ConstantSpeed";
    Feature2["ConstantTemperature"] = "ConstantTemperature";
    Feature2["Automatic"] = "Automatic";
    Feature2["LocalOperation"] = "LocalOperation";
  })(Feature = PumpConfigurationAndControl2.Feature || (PumpConfigurationAndControl2.Feature = {}));
  PumpConfigurationAndControl2.PumpStatus = {
    /**
     * A fault related to the system or pump device is detected.
     *
     * If this bit is set, it may correspond to an event in the range 2-16, see Events.
     *
     * @see {@link MatterSpecification.v142.Cluster} § 4.2.6.1.1
     */
    deviceFault: (0, import_BitmapSchema.BitFlag)(0),
    /**
     * A fault related to the supply to the pump is detected.
     *
     * If this bit is set, it may correspond to an event in the range 0-1 or 13, see Events.
     *
     * @see {@link MatterSpecification.v142.Cluster} § 4.2.6.1.2
     */
    supplyFault: (0, import_BitmapSchema.BitFlag)(1),
    /**
     * Setpoint is too low to achieve.
     */
    speedLow: (0, import_BitmapSchema.BitFlag)(2),
    /**
     * Setpoint is too high to achieve.
     */
    speedHigh: (0, import_BitmapSchema.BitFlag)(3),
    /**
     * Device control is overridden by hardware, such as an external STOP button or via a local HMI.
     *
     * While this bit is set, the EffectiveOperationMode is adjusted to Local. Any request changing OperationMode
     * shall generate a FAILURE error status until LocalOverride is cleared on the physical device. When
     * LocalOverride is cleared, the device shall return to the operation mode set in OperationMode.
     *
     * @see {@link MatterSpecification.v142.Cluster} § 4.2.6.1.3
     */
    localOverride: (0, import_BitmapSchema.BitFlag)(4),
    /**
     * Pump is currently running
     */
    running: (0, import_BitmapSchema.BitFlag)(5),
    /**
     * A remote pressure sensor is used as the sensor for the regulation of the pump.
     *
     * If this bit is set, EffectiveControlMode is ConstantPressure and the setpoint for the pump is interpreted as
     * a percentage of the range of the remote sensor ([MinMeasuredValue – MaxMeasuredValue]).
     *
     * @see {@link MatterSpecification.v142.Cluster} § 4.2.6.1.4
     */
    remotePressure: (0, import_BitmapSchema.BitFlag)(6),
    /**
     * A remote flow sensor is used as the sensor for the regulation of the pump.
     *
     * If this bit is set, EffectiveControlMode is ConstantFlow, and the setpoint for the pump is interpreted as a
     * percentage of the range of the remote sensor ([MinMeasuredValue – MaxMeasuredValue]).
     *
     * @see {@link MatterSpecification.v142.Cluster} § 4.2.6.1.5
     */
    remoteFlow: (0, import_BitmapSchema.BitFlag)(7),
    /**
     * A remote temperature sensor is used as the sensor for the regulation of the pump.
     *
     * If this bit is set, EffectiveControlMode is ConstantTemperature, and the setpoint for the pump is interpreted
     * as a percentage of the range of the remote sensor ([MinMeasuredValue – MaxMeasuredValue])
     *
     * @see {@link MatterSpecification.v142.Cluster} § 4.2.6.1.6
     */
    remoteTemperature: (0, import_BitmapSchema.BitFlag)(8)
  };
  let OperationMode;
  ((OperationMode2) => {
    OperationMode2[OperationMode2["Normal"] = 0] = "Normal";
    OperationMode2[OperationMode2["Minimum"] = 1] = "Minimum";
    OperationMode2[OperationMode2["Maximum"] = 2] = "Maximum";
    OperationMode2[OperationMode2["Local"] = 3] = "Local";
  })(OperationMode = PumpConfigurationAndControl2.OperationMode || (PumpConfigurationAndControl2.OperationMode = {}));
  let ControlMode;
  ((ControlMode2) => {
    ControlMode2[ControlMode2["ConstantSpeed"] = 0] = "ConstantSpeed";
    ControlMode2[ControlMode2["ConstantPressure"] = 1] = "ConstantPressure";
    ControlMode2[ControlMode2["ProportionalPressure"] = 2] = "ProportionalPressure";
    ControlMode2[ControlMode2["ConstantFlow"] = 3] = "ConstantFlow";
    ControlMode2[ControlMode2["ConstantTemperature"] = 5] = "ConstantTemperature";
    ControlMode2[ControlMode2["Automatic"] = 7] = "Automatic";
  })(ControlMode = PumpConfigurationAndControl2.ControlMode || (PumpConfigurationAndControl2.ControlMode = {}));
  PumpConfigurationAndControl2.ConstantPressureComponent = import_MutableCluster.MutableCluster.Component({
    attributes: {
      /**
       * This attribute specifies the minimum pressure the pump can achieve when it is working with the
       * ControlMode attribute set to ConstantPressure.
       *
       * Valid range is –3,276.7 kPa to 3,276.7 kPa (steps of 0.1 kPa). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.4
       */
      minConstPressure: (0, import_Cluster.FixedAttribute)(3, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvInt16), { default: null }),
      /**
       * This attribute specifies the maximum pressure the pump can achieve when it is working with the
       * ControlMode attribute set to ConstantPressure.
       *
       * Valid range is –3,276.7 kPa to 3,276.7 kPa (steps of 0.1 kPa). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.5
       */
      maxConstPressure: (0, import_Cluster.FixedAttribute)(4, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvInt16), { default: null })
    }
  });
  PumpConfigurationAndControl2.AutomaticComponent = import_MutableCluster.MutableCluster.Component({
    attributes: {
      /**
       * This attribute specifies the minimum pressure the pump can achieve when it is working with the
       * ControlMode attribute set to ConstantPressure.
       *
       * Valid range is –3,276.7 kPa to 3,276.7 kPa (steps of 0.1 kPa). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.4
       */
      minConstPressure: (0, import_Cluster.OptionalFixedAttribute)(3, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvInt16), { default: null }),
      /**
       * This attribute specifies the maximum pressure the pump can achieve when it is working with the
       * ControlMode attribute set to ConstantPressure.
       *
       * Valid range is –3,276.7 kPa to 3,276.7 kPa (steps of 0.1 kPa). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.5
       */
      maxConstPressure: (0, import_Cluster.OptionalFixedAttribute)(4, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvInt16), { default: null }),
      /**
       * This attribute specifies the minimum compensated pressure the pump can achieve when it is working with
       * the ControlMode attribute set to ProportionalPressure.
       *
       * Valid range is –3,276.7 kPa to 3,276.7 kPa (steps of 0.1 kPa). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.6
       */
      minCompPressure: (0, import_Cluster.OptionalFixedAttribute)(5, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvInt16), { default: null }),
      /**
       * This attribute specifies the maximum compensated pressure the pump can achieve when it is working with
       * the ControlMode attribute set to ProportionalPressure.
       *
       * Valid range is –3,276.7 kPa to 3,276.7 kPa (steps of 0.1 kPa). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.7
       */
      maxCompPressure: (0, import_Cluster.OptionalFixedAttribute)(6, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvInt16), { default: null }),
      /**
       * This attribute specifies the minimum speed the pump can achieve when it is working with the Con trolMode
       * attribute set to ConstantSpeed.
       *
       * Valid range is 0 to 65,534 RPM (steps of 1 RPM). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.8
       */
      minConstSpeed: (0, import_Cluster.OptionalFixedAttribute)(7, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvUInt16), { default: null }),
      /**
       * This attribute specifies the maximum speed the pump can achieve when it is working with the ControlMode
       * attribute set to ConstantSpeed.
       *
       * Valid range is 0 to 65,534 RPM (steps of 1 RPM). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.9
       */
      maxConstSpeed: (0, import_Cluster.OptionalFixedAttribute)(8, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvUInt16), { default: null }),
      /**
       * This attribute specifies the minimum flow the pump can achieve when it is working with the ControlMode
       * attribute set to ConstantFlow.
       *
       * Valid range is 0 m/h to 6,553.4 m/h (steps of 0.1 m/h). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.10
       */
      minConstFlow: (0, import_Cluster.OptionalFixedAttribute)(9, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvUInt16), { default: null }),
      /**
       * This attribute specifies the maximum flow the pump can achieve when it is working with the ControlMode
       * attribute set to ConstantFlow.
       *
       * Valid range is 0 m/h to 6,553.4 m/h (steps of 0.1 m/h). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.11
       */
      maxConstFlow: (0, import_Cluster.OptionalFixedAttribute)(10, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvUInt16), { default: null }),
      /**
       * This attribute specifies the minimum temperature the pump can maintain in the system when it is working
       * with the ControlMode attribute set to ConstantTemperature.
       *
       * Valid range is –273.15 °C to 327.67 °C (steps of 0.01 °C). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.12
       */
      minConstTemp: (0, import_Cluster.OptionalFixedAttribute)(11, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvInt16.bound({ min: -27315 })), { default: null }),
      /**
       * This attribute specifies the maximum temperature the pump can maintain in the system when it is working
       * with the ControlMode attribute set to ConstantTemperature.
       *
       * MaxConstTemp shall be greater than or equal to MinConstTemp Valid range is –273.15 °C to 327.67 °C (steps
       * of 0.01 °C).
       *
       * Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.13
       */
      maxConstTemp: (0, import_Cluster.OptionalFixedAttribute)(12, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvInt16.bound({ min: -27315 })), { default: null })
    }
  });
  PumpConfigurationAndControl2.CompensatedPressureComponent = import_MutableCluster.MutableCluster.Component({
    attributes: {
      /**
       * This attribute specifies the minimum compensated pressure the pump can achieve when it is working with
       * the ControlMode attribute set to ProportionalPressure.
       *
       * Valid range is –3,276.7 kPa to 3,276.7 kPa (steps of 0.1 kPa). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.6
       */
      minCompPressure: (0, import_Cluster.FixedAttribute)(5, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvInt16), { default: null }),
      /**
       * This attribute specifies the maximum compensated pressure the pump can achieve when it is working with
       * the ControlMode attribute set to ProportionalPressure.
       *
       * Valid range is –3,276.7 kPa to 3,276.7 kPa (steps of 0.1 kPa). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.7
       */
      maxCompPressure: (0, import_Cluster.FixedAttribute)(6, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvInt16), { default: null })
    }
  });
  PumpConfigurationAndControl2.ConstantSpeedComponent = import_MutableCluster.MutableCluster.Component({
    attributes: {
      /**
       * This attribute specifies the minimum speed the pump can achieve when it is working with the Con trolMode
       * attribute set to ConstantSpeed.
       *
       * Valid range is 0 to 65,534 RPM (steps of 1 RPM). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.8
       */
      minConstSpeed: (0, import_Cluster.FixedAttribute)(7, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvUInt16), { default: null }),
      /**
       * This attribute specifies the maximum speed the pump can achieve when it is working with the ControlMode
       * attribute set to ConstantSpeed.
       *
       * Valid range is 0 to 65,534 RPM (steps of 1 RPM). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.9
       */
      maxConstSpeed: (0, import_Cluster.FixedAttribute)(8, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvUInt16), { default: null })
    }
  });
  PumpConfigurationAndControl2.ConstantFlowComponent = import_MutableCluster.MutableCluster.Component({
    attributes: {
      /**
       * This attribute specifies the minimum flow the pump can achieve when it is working with the ControlMode
       * attribute set to ConstantFlow.
       *
       * Valid range is 0 m/h to 6,553.4 m/h (steps of 0.1 m/h). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.10
       */
      minConstFlow: (0, import_Cluster.FixedAttribute)(9, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvUInt16), { default: null }),
      /**
       * This attribute specifies the maximum flow the pump can achieve when it is working with the ControlMode
       * attribute set to ConstantFlow.
       *
       * Valid range is 0 m/h to 6,553.4 m/h (steps of 0.1 m/h). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.11
       */
      maxConstFlow: (0, import_Cluster.FixedAttribute)(10, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvUInt16), { default: null })
    }
  });
  PumpConfigurationAndControl2.ConstantTemperatureComponent = import_MutableCluster.MutableCluster.Component({
    attributes: {
      /**
       * This attribute specifies the minimum temperature the pump can maintain in the system when it is working
       * with the ControlMode attribute set to ConstantTemperature.
       *
       * Valid range is –273.15 °C to 327.67 °C (steps of 0.01 °C). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.12
       */
      minConstTemp: (0, import_Cluster.FixedAttribute)(11, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvInt16.bound({ min: -27315 })), { default: null }),
      /**
       * This attribute specifies the maximum temperature the pump can maintain in the system when it is working
       * with the ControlMode attribute set to ConstantTemperature.
       *
       * MaxConstTemp shall be greater than or equal to MinConstTemp Valid range is –273.15 °C to 327.67 °C (steps
       * of 0.01 °C).
       *
       * Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.13
       */
      maxConstTemp: (0, import_Cluster.FixedAttribute)(12, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvInt16.bound({ min: -27315 })), { default: null })
    }
  });
  PumpConfigurationAndControl2.Base = import_MutableCluster.MutableCluster.Component({
    id: 512,
    name: "PumpConfigurationAndControl",
    revision: 4,
    features: {
      /**
       * Supports operating in constant pressure mode
       */
      constantPressure: (0, import_BitmapSchema.BitFlag)(0),
      /**
       * Supports operating in compensated pressure mode
       */
      compensatedPressure: (0, import_BitmapSchema.BitFlag)(1),
      /**
       * Supports operating in constant flow mode
       */
      constantFlow: (0, import_BitmapSchema.BitFlag)(2),
      /**
       * Supports operating in constant speed mode
       */
      constantSpeed: (0, import_BitmapSchema.BitFlag)(3),
      /**
       * Supports operating in constant temperature mode
       */
      constantTemperature: (0, import_BitmapSchema.BitFlag)(4),
      /**
       * Supports operating in automatic mode
       */
      automatic: (0, import_BitmapSchema.BitFlag)(5),
      /**
       * Supports operating using local settings
       */
      localOperation: (0, import_BitmapSchema.BitFlag)(6)
    },
    attributes: {
      /**
       * This attribute specifies the maximum pressure the pump can achieve. It is a physical limit, and does not
       * apply to any specific control mode or operation mode.
       *
       * Valid range is -3,276.7 kPa to 3,276.7 kPa (steps of 0.1 kPa). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.1
       */
      maxPressure: (0, import_Cluster.FixedAttribute)(0, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvInt16), { default: null }),
      /**
       * This attribute specifies the maximum speed the pump can achieve. It is a physical limit, and does not
       * apply to any specific control mode or operation mode.
       *
       * Valid range is 0 to 65,534 RPM (steps of 1 RPM). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.2
       */
      maxSpeed: (0, import_Cluster.FixedAttribute)(1, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvUInt16), { default: null }),
      /**
       * This attribute specifies the maximum flow the pump can achieve. It is a physical limit, and does not
       * apply to any specific control mode or operation mode.
       *
       * Valid range is 0 m/h to 6,553.4 m/h (steps of 0.1 m/h). Null if the value is invalid.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.3
       */
      maxFlow: (0, import_Cluster.FixedAttribute)(2, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvUInt16), { default: null }),
      /**
       * This attribute specifies the activity status of the pump functions as listed in PumpStatusBitmap. Where a
       * pump controller function is active, the corresponding bit shall be set to 1. Where a pump controller
       * function is not active, the corresponding bit shall be set to 0.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.14
       */
      pumpStatus: (0, import_Cluster.OptionalAttribute)(16, (0, import_TlvNumber.TlvBitmap)(import_TlvNumber.TlvUInt16, PumpConfigurationAndControl2.PumpStatus)),
      /**
       * This attribute specifies current effective operation mode of the pump as defined in OperationModeEnum.
       *
       * The value of the EffectiveOperationMode attribute is the same as the OperationMode attribute, unless one
       * of the following points are true:
       *
       *   • The pump is physically set to run with the local settings
       *
       *   • The LocalOverride bit in the PumpStatus attribute is set,
       *
       * See OperationMode Attribute and ControlMode Attribute for a detailed description of the operation and
       * control of the pump.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.15
       */
      effectiveOperationMode: (0, import_Cluster.Attribute)(17, (0, import_TlvNumber.TlvEnum)(), { persistent: true }),
      /**
       * This attribute specifies the current effective control mode of the pump as defined in ControlModeEnum.
       *
       * This attribute contains the control mode that currently applies to the pump. It will have the value of
       * the ControlMode attribute, unless one of the following points are true:
       *
       *   • The ControlMode attribute is set to Automatic. In this case, the value of the EffectiveControlMode
       *     shall match the behavior of the pump.
       *
       *   • A remote sensor is used as the sensor for regulation of the pump. In this case, EffectiveControlMode
       *     will display ConstantPressure, ConstantFlow or ConstantTemperature if the remote sensor is a pressure
       *     sensor, a flow sensor or a temperature sensor respectively, regardless of the value of the
       *     ControlMode attribute.
       *
       * In case the ControlMode attribute is not included on the device and no remote sensors are connected, the
       * value of the EffectiveControlMode shall match the vendor-specific behavior of the pump.
       *
       * See OperationMode Attribute and ControlMode Attribute for detailed a description of the operation and
       * control of the pump.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.16
       */
      effectiveControlMode: (0, import_Cluster.Attribute)(18, (0, import_TlvNumber.TlvEnum)(), { persistent: true }),
      /**
       * This attribute specifies the actual capacity of the pump as a percentage of the effective maximum
       * setpoint value. It is updated dynamically as the speed of the pump changes.
       *
       * If the value is not available (the measurement or estimation of the speed is done in the pump), this
       * attribute will indicate the null value.
       *
       * Valid range is 0 % to 163.835% (0.005 % granularity). Although this attribute is a signed value, values
       * of capacity less than zero have no physical meaning.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.17
       */
      capacity: (0, import_Cluster.Attribute)(19, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvInt16), { default: null }),
      /**
       * This attribute specifies the actual speed of the pump measured in RPM. It is updated dynamically as the
       * speed of the pump changes.
       *
       * If the value is not available (the measurement or estimation of the speed is done in the pump), this
       * attribute will indicate the null value.
       *
       * Valid range is 0 to 65,534 RPM.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.18
       */
      speed: (0, import_Cluster.OptionalAttribute)(20, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvUInt16), { default: null }),
      /**
       * This attribute specifies the accumulated number of hours that the pump has been powered and the motor has
       * been running. It is updated dynamically as it increases. It is preserved over power cycles of the pump.
       * If LifeTimeRunningHours rises above maximum value it “rolls over” and starts at 0 (zero).
       *
       * This attribute is writeable, in order to allow setting to an appropriate value after maintenance. If the
       * value is not available, this attribute will indicate the null value.
       *
       * Valid range is 0 to 16,777,214 hrs.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.19
       */
      lifetimeRunningHours: (0, import_Cluster.OptionalWritableAttribute)(
        21,
        (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvUInt24),
        { persistent: true, default: 0, writeAcl: import_model.AccessLevel.Manage }
      ),
      /**
       * This attribute specifies the actual power consumption of the pump in Watts. The value of this attribute
       * is updated dynamically as the power consumption of the pump changes.
       *
       * This attribute is read only. If the value is not available (the measurement of power consumption is not
       * done in the pump), this attribute will indicate the null value.
       *
       * Valid range is 0 to 16,777,214 Watts.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.20
       */
      power: (0, import_Cluster.OptionalAttribute)(22, (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvUInt24), { default: null }),
      /**
       * This attribute specifies the accumulated energy consumption of the pump through the entire lifetime of
       * the pump in kWh. The value of the LifetimeEnergyConsumed attribute is updated dynamically as the energy
       * consumption of the pump increases. If LifetimeEnergyConsumed rises above maximum value it “rolls over”
       * and starts at 0 (zero).
       *
       * This attribute is writeable, in order to allow setting to an appropriate value after maintenance. Valid
       * range is 0 kWh to 4,294,967,294 kWh.
       *
       * Null if the value is unknown.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.21
       */
      lifetimeEnergyConsumed: (0, import_Cluster.OptionalWritableAttribute)(
        23,
        (0, import_TlvNullable.TlvNullable)(import_TlvNumber.TlvUInt32),
        { persistent: true, default: 0, writeAcl: import_model.AccessLevel.Manage }
      ),
      /**
       * This attribute specifies the operation mode of the pump as defined in OperationModeEnum.
       *
       * The actual operating mode of the pump is a result of the setting of the attributes OperationMode,
       * ControlMode and the optional connection of a remote sensor. The operation and control is prioritized as
       * shown in the scheme below:
       *
       * ### Priority Scheme of Pump Operation and Control
       *
       * If this attribute is Maximum, Minimum or Local, the OperationMode attribute decides how the pump is
       * operated.
       *
       * If this attribute is Normal and a remote sensor is connected to the pump, the type of the remote sensor
       * decides the control mode of the pump. A connected remote pressure sensor will make the pump run in
       * control mode Constant pressure and vice versa for flow and temperature type sensors. This is regardless
       * of the setting of the ControlMode attribute.
       *
       * If this attribute is Normal and no remote sensor is connected, the control mode of the pump is decided by
       * the ControlMode attribute.
       *
       * OperationMode may be changed at any time, even when the pump is running. The behavior of the pump at the
       * point of changing the value of this attribute is vendor-specific.
       *
       * In the case a device does not support a specific operation mode, the write interaction to this attribute
       * with an unsupported operation mode value shall be ignored and a response containing the status of
       * CONSTRAINT_ERROR shall be returned.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.22
       */
      operationMode: (0, import_Cluster.WritableAttribute)(
        32,
        (0, import_TlvNumber.TlvEnum)(),
        { persistent: true, default: 0 /* Normal */, writeAcl: import_model.AccessLevel.Manage }
      ),
      /**
       * This attribute specifies the control mode of the pump as defined in ControlModeEnum.
       *
       * See OperationMode Attribute for a detailed description of the operation and control of the pump.
       *
       * ControlMode may be changed at any time, even when the pump is running. The behavior of the pump at the
       * point of changing is vendor-specific.
       *
       * In the case a device does not support a specific control mode, the write interaction to this attribute
       * with an unsupported control mode value shall be ignored and a response containing the status of
       * CONSTRAINT_ERROR shall be returned.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7.23
       */
      controlMode: (0, import_Cluster.OptionalWritableAttribute)(
        33,
        (0, import_TlvNumber.TlvEnum)(),
        { persistent: true, default: 0 /* ConstantSpeed */, writeAcl: import_model.AccessLevel.Manage }
      ),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.7
       * @deprecated
       */
      alarmMask: (0, import_Cluster.OptionalWritableAttribute)(34, import_TlvNumber.TlvUInt16)
    },
    events: {
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      supplyVoltageLow: (0, import_Cluster.OptionalEvent)(0, import_Priority.Priority.Info, import_TlvNoArguments.TlvNoArguments),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      supplyVoltageHigh: (0, import_Cluster.OptionalEvent)(1, import_Priority.Priority.Info, import_TlvNoArguments.TlvNoArguments),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      powerMissingPhase: (0, import_Cluster.OptionalEvent)(2, import_Priority.Priority.Info, import_TlvNoArguments.TlvNoArguments),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      systemPressureLow: (0, import_Cluster.OptionalEvent)(3, import_Priority.Priority.Info, import_TlvNoArguments.TlvNoArguments),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      systemPressureHigh: (0, import_Cluster.OptionalEvent)(4, import_Priority.Priority.Info, import_TlvNoArguments.TlvNoArguments),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      dryRunning: (0, import_Cluster.OptionalEvent)(5, import_Priority.Priority.Critical, import_TlvNoArguments.TlvNoArguments),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      motorTemperatureHigh: (0, import_Cluster.OptionalEvent)(6, import_Priority.Priority.Info, import_TlvNoArguments.TlvNoArguments),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      pumpMotorFatalFailure: (0, import_Cluster.OptionalEvent)(7, import_Priority.Priority.Critical, import_TlvNoArguments.TlvNoArguments),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      electronicTemperatureHigh: (0, import_Cluster.OptionalEvent)(8, import_Priority.Priority.Info, import_TlvNoArguments.TlvNoArguments),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      pumpBlocked: (0, import_Cluster.OptionalEvent)(9, import_Priority.Priority.Critical, import_TlvNoArguments.TlvNoArguments),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      sensorFailure: (0, import_Cluster.OptionalEvent)(10, import_Priority.Priority.Info, import_TlvNoArguments.TlvNoArguments),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      electronicNonFatalFailure: (0, import_Cluster.OptionalEvent)(11, import_Priority.Priority.Info, import_TlvNoArguments.TlvNoArguments),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      electronicFatalFailure: (0, import_Cluster.OptionalEvent)(12, import_Priority.Priority.Critical, import_TlvNoArguments.TlvNoArguments),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      generalFault: (0, import_Cluster.OptionalEvent)(13, import_Priority.Priority.Info, import_TlvNoArguments.TlvNoArguments),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      leakage: (0, import_Cluster.OptionalEvent)(14, import_Priority.Priority.Info, import_TlvNoArguments.TlvNoArguments),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      airDetection: (0, import_Cluster.OptionalEvent)(15, import_Priority.Priority.Info, import_TlvNoArguments.TlvNoArguments),
      /**
       * @see {@link MatterSpecification.v142.Cluster} § 4.2.8
       */
      turbineOperation: (0, import_Cluster.OptionalEvent)(16, import_Priority.Priority.Info, import_TlvNoArguments.TlvNoArguments)
    },
    /**
     * This metadata controls which PumpConfigurationAndControlCluster elements matter.js activates for specific
     * feature combinations.
     */
    extensions: import_MutableCluster.MutableCluster.Extensions(
      { flags: { constantPressure: true }, component: PumpConfigurationAndControl2.ConstantPressureComponent },
      { flags: { automatic: true }, component: PumpConfigurationAndControl2.AutomaticComponent },
      { flags: { compensatedPressure: true }, component: PumpConfigurationAndControl2.CompensatedPressureComponent },
      { flags: { constantSpeed: true }, component: PumpConfigurationAndControl2.ConstantSpeedComponent },
      { flags: { constantFlow: true }, component: PumpConfigurationAndControl2.ConstantFlowComponent },
      { flags: { constantTemperature: true }, component: PumpConfigurationAndControl2.ConstantTemperatureComponent },
      {
        flags: {
          constantPressure: false,
          compensatedPressure: false,
          constantFlow: false,
          constantSpeed: false,
          constantTemperature: false
        },
        component: false
      }
    )
  });
  PumpConfigurationAndControl2.ClusterInstance = import_MutableCluster.MutableCluster.ExtensibleOnly(PumpConfigurationAndControl2.Base);
  PumpConfigurationAndControl2.Cluster = PumpConfigurationAndControl2.ClusterInstance;
  const PRSCONST = { constantPressure: true };
  const AUTO = { automatic: true };
  const PRSCOMP = { compensatedPressure: true };
  const SPD = { constantSpeed: true };
  const FLW = { constantFlow: true };
  const TEMP = { constantTemperature: true };
  PumpConfigurationAndControl2.CompleteInstance = (0, import_MutableCluster.MutableCluster)({
    id: PumpConfigurationAndControl2.Base.id,
    name: PumpConfigurationAndControl2.Base.name,
    revision: PumpConfigurationAndControl2.Base.revision,
    features: PumpConfigurationAndControl2.Base.features,
    attributes: {
      ...PumpConfigurationAndControl2.Base.attributes,
      minConstPressure: import_MutableCluster.MutableCluster.AsConditional(
        PumpConfigurationAndControl2.ConstantPressureComponent.attributes.minConstPressure,
        { mandatoryIf: [PRSCONST], optionalIf: [AUTO] }
      ),
      maxConstPressure: import_MutableCluster.MutableCluster.AsConditional(
        PumpConfigurationAndControl2.ConstantPressureComponent.attributes.maxConstPressure,
        { mandatoryIf: [PRSCONST], optionalIf: [AUTO] }
      ),
      minCompPressure: import_MutableCluster.MutableCluster.AsConditional(
        PumpConfigurationAndControl2.AutomaticComponent.attributes.minCompPressure,
        { optionalIf: [AUTO], mandatoryIf: [PRSCOMP] }
      ),
      maxCompPressure: import_MutableCluster.MutableCluster.AsConditional(
        PumpConfigurationAndControl2.AutomaticComponent.attributes.maxCompPressure,
        { optionalIf: [AUTO], mandatoryIf: [PRSCOMP] }
      ),
      minConstSpeed: import_MutableCluster.MutableCluster.AsConditional(
        PumpConfigurationAndControl2.AutomaticComponent.attributes.minConstSpeed,
        { optionalIf: [AUTO], mandatoryIf: [SPD] }
      ),
      maxConstSpeed: import_MutableCluster.MutableCluster.AsConditional(
        PumpConfigurationAndControl2.AutomaticComponent.attributes.maxConstSpeed,
        { optionalIf: [AUTO], mandatoryIf: [SPD] }
      ),
      minConstFlow: import_MutableCluster.MutableCluster.AsConditional(
        PumpConfigurationAndControl2.AutomaticComponent.attributes.minConstFlow,
        { optionalIf: [AUTO], mandatoryIf: [FLW] }
      ),
      maxConstFlow: import_MutableCluster.MutableCluster.AsConditional(
        PumpConfigurationAndControl2.AutomaticComponent.attributes.maxConstFlow,
        { optionalIf: [AUTO], mandatoryIf: [FLW] }
      ),
      minConstTemp: import_MutableCluster.MutableCluster.AsConditional(
        PumpConfigurationAndControl2.AutomaticComponent.attributes.minConstTemp,
        { optionalIf: [AUTO], mandatoryIf: [TEMP] }
      ),
      maxConstTemp: import_MutableCluster.MutableCluster.AsConditional(
        PumpConfigurationAndControl2.AutomaticComponent.attributes.maxConstTemp,
        { optionalIf: [AUTO], mandatoryIf: [TEMP] }
      )
    },
    events: PumpConfigurationAndControl2.Base.events
  });
  PumpConfigurationAndControl2.Complete = PumpConfigurationAndControl2.CompleteInstance;
})(PumpConfigurationAndControl || (PumpConfigurationAndControl = {}));
const PumpConfigurationAndControlCluster = PumpConfigurationAndControl.Cluster;
import_ClusterRegistry.ClusterRegistry.register(PumpConfigurationAndControl.Complete);
//# sourceMappingURL=pump-configuration-and-control.js.map
