/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MutableCluster } from "../cluster/mutation/MutableCluster.js";
import { BitFlag } from "../schema/BitmapSchema.js";
import { Attribute } from "../cluster/Cluster.js";
import { TlvEnum } from "../tlv/TlvNumber.js";
import { ClusterRegistry } from "../cluster/ClusterRegistry.js";
var AirQuality;
((AirQuality2) => {
  let Feature;
  ((Feature2) => {
    Feature2["Fair"] = "Fair";
    Feature2["Moderate"] = "Moderate";
    Feature2["VeryPoor"] = "VeryPoor";
    Feature2["ExtremelyPoor"] = "ExtremelyPoor";
  })(Feature = AirQuality2.Feature || (AirQuality2.Feature = {}));
  let AirQualityEnum;
  ((AirQualityEnum2) => {
    AirQualityEnum2[AirQualityEnum2["Unknown"] = 0] = "Unknown";
    AirQualityEnum2[AirQualityEnum2["Good"] = 1] = "Good";
    AirQualityEnum2[AirQualityEnum2["Fair"] = 2] = "Fair";
    AirQualityEnum2[AirQualityEnum2["Moderate"] = 3] = "Moderate";
    AirQualityEnum2[AirQualityEnum2["Poor"] = 4] = "Poor";
    AirQualityEnum2[AirQualityEnum2["VeryPoor"] = 5] = "VeryPoor";
    AirQualityEnum2[AirQualityEnum2["ExtremelyPoor"] = 6] = "ExtremelyPoor";
  })(AirQualityEnum = AirQuality2.AirQualityEnum || (AirQuality2.AirQualityEnum = {}));
  AirQuality2.Base = MutableCluster.Component({
    id: 91,
    name: "AirQuality",
    revision: 1,
    features: {
      /**
       * Cluster supports the Fair air quality level
       */
      fair: BitFlag(0),
      /**
       * Cluster supports the Moderate air quality level
       */
      moderate: BitFlag(1),
      /**
       * Cluster supports the Very poor air quality level
       */
      veryPoor: BitFlag(2),
      /**
       * Cluster supports the Extremely poor air quality level
       */
      extremelyPoor: BitFlag(3)
    },
    attributes: {
      /**
       * Indicates a value from AirQualityEnum that is indicative of the currently measured air quality.
       *
       * @see {@link MatterSpecification.v142.Cluster} § 2.9.6.1
       */
      airQuality: Attribute(0, TlvEnum())
    },
    /**
     * This metadata controls which AirQualityCluster elements matter.js activates for specific feature
     * combinations.
     */
    extensions: MutableCluster.Extensions()
  });
  AirQuality2.ClusterInstance = MutableCluster(AirQuality2.Base);
  AirQuality2.Cluster = AirQuality2.ClusterInstance;
  AirQuality2.Complete = AirQuality2.Cluster;
})(AirQuality || (AirQuality = {}));
const AirQualityCluster = AirQuality.Cluster;
ClusterRegistry.register(AirQuality.Complete);
export {
  AirQuality,
  AirQualityCluster
};
//# sourceMappingURL=air-quality.js.map
