"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 commodity_price_element_exports = {};
__export(commodity_price_element_exports, {
  CommodityPrice: () => CommodityPrice
});
module.exports = __toCommonJS(commodity_price_element_exports);
var import_MatterDefinition = require("../MatterDefinition.js");
var import_elements = require("../../elements/index.js");
/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const CommodityPrice = (0, import_elements.ClusterElement)(
  { name: "CommodityPrice", id: 149, classification: "application" },
  (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 4 }),
  (0, import_elements.AttributeElement)(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    (0, import_elements.FieldElement)({ name: "FORE", conformance: "O", constraint: "0", title: "Forecasting" })
  ),
  (0, import_elements.AttributeElement)({ name: "TariffUnit", id: 0, type: "TariffUnitEnum", access: "R V", conformance: "M" }),
  (0, import_elements.AttributeElement)({ name: "Currency", id: 1, type: "currency", access: "R V", conformance: "M", quality: "X" }),
  (0, import_elements.AttributeElement)(
    { name: "CurrentPrice", id: 2, type: "CommodityPriceStruct", access: "R V", conformance: "M", quality: "X" }
  ),
  (0, import_elements.AttributeElement)(
    { name: "PriceForecast", id: 3, type: "list", access: "R V", conformance: "FORE", constraint: "max 56" },
    (0, import_elements.FieldElement)({ name: "entry", type: "CommodityPriceStruct" })
  ),
  (0, import_elements.EventElement)(
    { name: "PriceChange", id: 0, access: "V", conformance: "O", priority: "info" },
    (0, import_elements.FieldElement)({ name: "CurrentPrice", id: 0, type: "CommodityPriceStruct", conformance: "M", quality: "X" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "GetDetailedPriceRequest",
      id: 0,
      access: "O",
      conformance: "O",
      direction: "request",
      response: "GetDetailedPriceResponse"
    },
    (0, import_elements.FieldElement)({ name: "Details", id: 0, type: "CommodityPriceDetailBitmap", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    { name: "GetDetailedPriceResponse", id: 1, conformance: "GetDetailedPriceRequest", direction: "response" },
    (0, import_elements.FieldElement)({ name: "CurrentPrice", id: 0, type: "CommodityPriceStruct", conformance: "M", quality: "X" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "GetDetailedForecastRequest",
      id: 2,
      access: "O",
      conformance: "[FORE]",
      direction: "request",
      quality: "L",
      response: "GetDetailedForecastResponse"
    },
    (0, import_elements.FieldElement)({ name: "Details", id: 0, type: "CommodityPriceDetailBitmap", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "GetDetailedForecastResponse",
      id: 3,
      conformance: "GetDetailedForecastRequest",
      direction: "response",
      quality: "L"
    },
    (0, import_elements.FieldElement)(
      { name: "PriceForecast", id: 0, type: "list", conformance: "M", constraint: "max 56" },
      (0, import_elements.FieldElement)({ name: "entry", type: "CommodityPriceStruct" })
    )
  ),
  (0, import_elements.DatatypeElement)(
    { name: "CommodityPriceDetailBitmap", type: "map16" },
    (0, import_elements.FieldElement)({ name: "Description", constraint: "0" }),
    (0, import_elements.FieldElement)({ name: "Components", constraint: "1" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "CommodityPriceComponentStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Price", id: 0, type: "money", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Source", id: 1, type: "TariffPriceTypeEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Description", id: 2, type: "string", conformance: "O", constraint: "max 32" }),
    (0, import_elements.FieldElement)({ name: "TariffComponentId", id: 3, type: "uint32", conformance: "O" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "CommodityPriceStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "PeriodStart", id: 0, type: "epoch-s", conformance: "M" }),
    (0, import_elements.FieldElement)({
      name: "PeriodEnd",
      id: 1,
      type: "epoch-s",
      conformance: "M",
      constraint: "min periodStart + 1",
      quality: "X"
    }),
    (0, import_elements.FieldElement)({ name: "Price", id: 2, type: "money", conformance: "O.b+" }),
    (0, import_elements.FieldElement)({ name: "PriceLevel", id: 3, type: "int16", conformance: "O.b+" }),
    (0, import_elements.FieldElement)({ name: "Description", id: 4, type: "string", conformance: "O", constraint: "max 32" }),
    (0, import_elements.FieldElement)(
      { name: "Components", id: 5, type: "list", conformance: "[Price]", constraint: "max 10", default: [] },
      (0, import_elements.FieldElement)({ name: "entry", type: "CommodityPriceComponentStruct" })
    )
  )
);
import_MatterDefinition.MatterDefinition.children.push(CommodityPrice);
//# sourceMappingURL=commodity-price.element.js.map
