"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 MeasurementAccuracy_exports = {};
__export(MeasurementAccuracy_exports, {
  TlvMeasurementAccuracy: () => TlvMeasurementAccuracy
});
module.exports = __toCommonJS(MeasurementAccuracy_exports);
var import_TlvObject = require("../tlv/TlvObject.js");
var import_TlvNumber = require("../tlv/TlvNumber.js");
var import_TlvBoolean = require("../tlv/TlvBoolean.js");
var import_TlvArray = require("../tlv/TlvArray.js");
var import_MeasurementAccuracyRange = require("./MeasurementAccuracyRange.js");
/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const TlvMeasurementAccuracy = (0, import_TlvObject.TlvObject)({
  /**
   * This field shall indicate the type of measurement for the accuracy provided.
   *
   * @see {@link MatterSpecification.v142.Cluster} § 2.1.3.3.1
   */
  measurementType: (0, import_TlvObject.TlvField)(0, (0, import_TlvNumber.TlvEnum)()),
  /**
   * This field shall indicate whether the associated measurement was directly measured. If this field is not set to
   * true, then the associated measurement was estimated.
   *
   * @see {@link MatterSpecification.v142.Cluster} § 2.1.3.3.2
   */
  measured: (0, import_TlvObject.TlvField)(1, import_TlvBoolean.TlvBoolean),
  minMeasuredValue: (0, import_TlvObject.TlvField)(2, import_TlvNumber.TlvInt64),
  maxMeasuredValue: (0, import_TlvObject.TlvField)(3, import_TlvNumber.TlvInt64),
  /**
   * This field shall indicate a list of measurement ranges and their associated accuracies.
   *
   * The value of the RangeMin field on the first MeasurementAccuracyRangeStruct in this list shall be equal to the
   * value of the MinMeasuredValue field.
   *
   * The value of the RangeMax field on the last MeasurementAccuracyRangeStruct in this list shall be less than or
   * equal to the value of the MaxMeasuredValue field.
   *
   * The value of the RangeMin field on each MeasurementAccuracyRangeStruct in this list other than the first shall be
   * one more the value of the RangeMax field on the previous MeasurementAccuracyRangeStruct in this list (i.e. there
   * shall be no gaps in the accuracy ranges, and the ranges shall be in increasing order).
   *
   * @see {@link MatterSpecification.v142.Cluster} § 2.1.3.3.5
   */
  accuracyRanges: (0, import_TlvObject.TlvField)(4, (0, import_TlvArray.TlvArray)(import_MeasurementAccuracyRange.TlvMeasurementAccuracyRange, { minLength: 1 }))
});
//# sourceMappingURL=MeasurementAccuracy.js.map
