/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MatterDefinition } from "../MatterDefinition.js";
import {
  ClusterElement as Cluster,
  AttributeElement as Attribute,
  FieldElement as Field,
  DatatypeElement as Datatype
} from "../../elements/index.js";
const ConcentrationMeasurement = Cluster(
  { name: "ConcentrationMeasurement", classification: "application" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 3 }),
  Attribute(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    Field({ name: "MEA", conformance: "O.a+", constraint: "0", title: "NumericMeasurement" }),
    Field({ name: "LEV", conformance: "O.a+", constraint: "1", title: "LevelIndication" }),
    Field({ name: "MED", conformance: "[LEV]", constraint: "2", title: "MediumLevel" }),
    Field({ name: "CRI", conformance: "[LEV]", constraint: "3", title: "CriticalLevel" }),
    Field({ name: "PEA", conformance: "[MEA]", constraint: "4", title: "PeakMeasurement" }),
    Field({ name: "AVG", conformance: "[MEA]", constraint: "5", title: "AverageMeasurement" })
  ),
  Attribute({
    name: "MeasuredValue",
    id: 0,
    type: "single",
    access: "R V",
    conformance: "MEA",
    constraint: "minMeasuredValue to maxMeasuredValue",
    quality: "X P"
  }),
  Attribute({ name: "MinMeasuredValue", id: 1, type: "single", access: "R V", conformance: "MEA", quality: "X" }),
  Attribute({
    name: "MaxMeasuredValue",
    id: 2,
    type: "single",
    access: "R V",
    conformance: "MEA",
    constraint: "min minMeasuredValue",
    quality: "X"
  }),
  Attribute({
    name: "PeakMeasuredValue",
    id: 3,
    type: "single",
    access: "R V",
    conformance: "PEA",
    constraint: "minMeasuredValue to maxMeasuredValue",
    quality: "X P"
  }),
  Attribute({
    name: "PeakMeasuredValueWindow",
    id: 4,
    type: "elapsed-s",
    access: "R V",
    conformance: "PEA",
    constraint: "max 604800",
    quality: "P"
  }),
  Attribute({
    name: "AverageMeasuredValue",
    id: 5,
    type: "single",
    access: "R V",
    conformance: "AVG",
    constraint: "minMeasuredValue to maxMeasuredValue",
    quality: "X P"
  }),
  Attribute({
    name: "AverageMeasuredValueWindow",
    id: 6,
    type: "elapsed-s",
    access: "R V",
    conformance: "AVG",
    constraint: "max 604800",
    quality: "P"
  }),
  Attribute({ name: "Uncertainty", id: 7, type: "single", access: "R V", conformance: "[MEA]", constraint: "ms" }),
  Attribute({ name: "MeasurementUnit", id: 8, type: "MeasurementUnitEnum", access: "R V", conformance: "MEA", quality: "F" }),
  Attribute({
    name: "MeasurementMedium",
    id: 9,
    type: "MeasurementMediumEnum",
    access: "R V",
    conformance: "M",
    quality: "F"
  }),
  Attribute({ name: "LevelValue", id: 10, type: "LevelValueEnum", access: "R V", conformance: "LEV" }),
  Datatype(
    { name: "MeasurementUnitEnum", type: "enum8" },
    Field({ name: "Ppm", id: 0, conformance: "MEA" }),
    Field({ name: "Ppb", id: 1, conformance: "MEA" }),
    Field({ name: "Ppt", id: 2, conformance: "MEA" }),
    Field({ name: "Mgm3", id: 3, conformance: "MEA" }),
    Field({ name: "Ugm3", id: 4, conformance: "MEA" }),
    Field({ name: "Ngm3", id: 5, conformance: "MEA" }),
    Field({ name: "Pm3", id: 6, conformance: "MEA" }),
    Field({ name: "Bqm3", id: 7, conformance: "MEA" })
  ),
  Datatype(
    { name: "MeasurementMediumEnum", type: "enum8" },
    Field({ name: "Air", id: 0, conformance: "M" }),
    Field({ name: "Water", id: 1, conformance: "M" }),
    Field({ name: "Soil", id: 2, conformance: "M" })
  ),
  Datatype(
    { name: "LevelValueEnum", type: "enum8" },
    Field({ name: "Unknown", id: 0, conformance: "M" }),
    Field({ name: "Low", id: 1, conformance: "M" }),
    Field({ name: "Medium", id: 2, conformance: "MED" }),
    Field({ name: "High", id: 3, conformance: "M" }),
    Field({ name: "Critical", id: 4, conformance: "CRI" })
  )
);
MatterDefinition.children.push(ConcentrationMeasurement);
export {
  ConcentrationMeasurement
};
//# sourceMappingURL=concentration-measurement.element.js.map
