"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_tariff_element_exports = {};
__export(commodity_tariff_element_exports, {
  CommodityTariff: () => CommodityTariff
});
module.exports = __toCommonJS(commodity_tariff_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 CommodityTariff = (0, import_elements.ClusterElement)(
  { name: "CommodityTariff", id: 1792, classification: "application" },
  (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
  (0, import_elements.AttributeElement)(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    (0, import_elements.FieldElement)({ name: "PRICE", conformance: "O.a+", constraint: "0", title: "Pricing" }),
    (0, import_elements.FieldElement)({ name: "FCRED", conformance: "O.a+", constraint: "1", title: "FriendlyCredit" }),
    (0, import_elements.FieldElement)({ name: "AUXLD", conformance: "O.a+", constraint: "2", title: "AuxiliaryLoad" }),
    (0, import_elements.FieldElement)({ name: "PEAKP", conformance: "O", constraint: "3", title: "PeakPeriod" }),
    (0, import_elements.FieldElement)({ name: "PWRTHLD", conformance: "O", constraint: "4", title: "PowerThreshold" }),
    (0, import_elements.FieldElement)({ name: "RNDM", conformance: "O", constraint: "5", title: "Randomization" })
  ),
  (0, import_elements.AttributeElement)(
    { name: "TariffInfo", id: 0, type: "TariffInformationStruct", access: "R V", conformance: "M", quality: "X" }
  ),
  (0, import_elements.AttributeElement)({ name: "TariffUnit", id: 1, type: "TariffUnitEnum", access: "R V", conformance: "M", quality: "X" }),
  (0, import_elements.AttributeElement)({ name: "StartDate", id: 2, type: "epoch-s", access: "R V", conformance: "M", constraint: "desc", quality: "X" }),
  (0, import_elements.AttributeElement)(
    {
      name: "DayEntries",
      id: 3,
      type: "list",
      access: "R V",
      conformance: "M",
      constraint: "max 672",
      quality: "X"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "DayEntryStruct" })
  ),
  (0, import_elements.AttributeElement)(
    {
      name: "DayPatterns",
      id: 4,
      type: "list",
      access: "R V",
      conformance: "M",
      constraint: "max 28",
      quality: "X"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "DayPatternStruct" })
  ),
  (0, import_elements.AttributeElement)(
    {
      name: "CalendarPeriods",
      id: 5,
      type: "list",
      access: "R V",
      conformance: "M",
      constraint: "1 to 4",
      quality: "X"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "CalendarPeriodStruct" })
  ),
  (0, import_elements.AttributeElement)(
    {
      name: "IndividualDays",
      id: 6,
      type: "list",
      access: "R V",
      conformance: "M",
      constraint: "max 50",
      quality: "X"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "DayStruct" })
  ),
  (0, import_elements.AttributeElement)({ name: "CurrentDay", id: 7, type: "DayStruct", access: "R V", conformance: "M", quality: "X" }),
  (0, import_elements.AttributeElement)({ name: "NextDay", id: 8, type: "DayStruct", access: "R V", conformance: "M", quality: "X" }),
  (0, import_elements.AttributeElement)({ name: "CurrentDayEntry", id: 9, type: "DayEntryStruct", access: "R V", conformance: "M", quality: "X" }),
  (0, import_elements.AttributeElement)({ name: "CurrentDayEntryDate", id: 10, type: "epoch-s", access: "R V", conformance: "M", quality: "X" }),
  (0, import_elements.AttributeElement)({ name: "NextDayEntry", id: 11, type: "DayEntryStruct", access: "R V", conformance: "M", quality: "X" }),
  (0, import_elements.AttributeElement)({ name: "NextDayEntryDate", id: 12, type: "epoch-s", access: "R V", conformance: "M", quality: "X" }),
  (0, import_elements.AttributeElement)(
    {
      name: "TariffComponents",
      id: 13,
      type: "list",
      access: "R V",
      conformance: "M",
      constraint: "1 to 672",
      quality: "X"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "TariffComponentStruct" })
  ),
  (0, import_elements.AttributeElement)(
    {
      name: "TariffPeriods",
      id: 14,
      type: "list",
      access: "R V",
      conformance: "M",
      constraint: "1 to 672",
      quality: "X"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "TariffPeriodStruct" })
  ),
  (0, import_elements.AttributeElement)(
    {
      name: "CurrentTariffComponents",
      id: 15,
      type: "list",
      access: "R V",
      conformance: "M",
      constraint: "max 20",
      quality: "X"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "TariffComponentStruct" })
  ),
  (0, import_elements.AttributeElement)(
    {
      name: "NextTariffComponents",
      id: 16,
      type: "list",
      access: "R V",
      conformance: "M",
      constraint: "max 20",
      quality: "X"
    },
    (0, import_elements.FieldElement)({ name: "entry", type: "TariffComponentStruct" })
  ),
  (0, import_elements.AttributeElement)({
    name: "DefaultRandomizationOffset",
    id: 17,
    type: "int16",
    access: "R V",
    conformance: "RNDM",
    constraint: "desc",
    quality: "X"
  }),
  (0, import_elements.AttributeElement)({
    name: "DefaultRandomizationType",
    id: 18,
    type: "DayEntryRandomizationTypeEnum",
    access: "R V",
    conformance: "RNDM",
    quality: "X"
  }),
  (0, import_elements.CommandElement)(
    {
      name: "GetTariffComponent",
      id: 0,
      access: "O",
      conformance: "M",
      direction: "request",
      response: "GetTariffComponentResponse"
    },
    (0, import_elements.FieldElement)({ name: "TariffComponentId", id: 0, type: "uint32", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    { name: "GetTariffComponentResponse", id: 0, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "Label", id: 0, type: "string", conformance: "M", constraint: "max 128", quality: "X" }),
    (0, import_elements.FieldElement)(
      { name: "DayEntryIDs", id: 1, type: "list", conformance: "M", constraint: "1 to 96" },
      (0, import_elements.FieldElement)({ name: "entry", type: "uint32" })
    ),
    (0, import_elements.FieldElement)({ name: "TariffComponent", id: 2, type: "TariffComponentStruct", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    {
      name: "GetDayEntry",
      id: 1,
      access: "O",
      conformance: "M",
      direction: "request",
      response: "GetDayEntryResponse"
    },
    (0, import_elements.FieldElement)({ name: "DayEntryId", id: 0, type: "uint32", conformance: "M" })
  ),
  (0, import_elements.CommandElement)(
    { name: "GetDayEntryResponse", id: 1, conformance: "M", direction: "response" },
    (0, import_elements.FieldElement)({ name: "DayEntry", id: 0, type: "DayEntryStruct", conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "DayPatternDayOfWeekBitmap", type: "map8" },
    (0, import_elements.FieldElement)({ name: "Sunday", constraint: "0" }),
    (0, import_elements.FieldElement)({ name: "Monday", constraint: "1" }),
    (0, import_elements.FieldElement)({ name: "Tuesday", constraint: "2" }),
    (0, import_elements.FieldElement)({ name: "Wednesday", constraint: "3" }),
    (0, import_elements.FieldElement)({ name: "Thursday", constraint: "4" }),
    (0, import_elements.FieldElement)({ name: "Friday", constraint: "5" }),
    (0, import_elements.FieldElement)({ name: "Saturday", constraint: "6" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "AuxiliaryLoadSettingEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Off", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "On", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "None", id: 2, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "DayTypeEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Standard", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Holiday", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Dynamic", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Event", id: 3, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "PeakPeriodSeverityEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "Unused", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Low", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Medium", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "High", id: 3, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "DayEntryRandomizationTypeEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "None", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Fixed", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Random", id: 2, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "RandomPositive", id: 3, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "RandomNegative", id: 4, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "BlockModeEnum", type: "enum8" },
    (0, import_elements.FieldElement)({ name: "NoBlock", id: 0, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Combined", id: 1, conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Individual", id: 2, conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "AuxiliaryLoadSwitchSettingsStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Number", id: 0, type: "uint8", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "RequiredState", id: 1, type: "AuxiliaryLoadSettingEnum", conformance: "M" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "AuxiliaryLoadSwitchesSettingsStruct", type: "struct" },
    (0, import_elements.FieldElement)(
      { name: "SwitchStates", id: 0, type: "list", conformance: "M", constraint: "max 8" },
      (0, import_elements.FieldElement)({ name: "entry", type: "AuxiliaryLoadSwitchSettingsStruct" })
    )
  ),
  (0, import_elements.DatatypeElement)(
    { name: "CalendarPeriodStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "StartDate", id: 0, type: "epoch-s", conformance: "M", constraint: "min startDate", quality: "X" }),
    (0, import_elements.FieldElement)(
      { name: "DayPatternIDs", id: 1, type: "list", conformance: "M", constraint: "1 to 7" },
      (0, import_elements.FieldElement)({ name: "entry", type: "uint32" })
    )
  ),
  (0, import_elements.DatatypeElement)(
    { name: "DayEntryStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "DayEntryId", id: 0, type: "uint32", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "StartTime", id: 1, type: "uint16", conformance: "M", constraint: "max 1499" }),
    (0, import_elements.FieldElement)({ name: "Duration", id: 2, type: "uint16", conformance: "O", constraint: "max 1500 - startTime" }),
    (0, import_elements.FieldElement)({ name: "RandomizationOffset", id: 3, type: "int16", conformance: "[RNDM]" }),
    (0, import_elements.FieldElement)({
      name: "RandomizationType",
      id: 4,
      type: "DayEntryRandomizationTypeEnum",
      conformance: "[RNDM]",
      default: 0
    })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "DayStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Date", id: 0, type: "epoch-s", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "DayType", id: 1, type: "DayTypeEnum", conformance: "M", constraint: "any" }),
    (0, import_elements.FieldElement)(
      { name: "DayEntryIDs", id: 2, type: "list", conformance: "M", constraint: "1 to 96" },
      (0, import_elements.FieldElement)({ name: "entry", type: "uint32" })
    )
  ),
  (0, import_elements.DatatypeElement)(
    { name: "DayPatternStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "DayPatternId", id: 0, type: "uint32", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "DaysOfWeek", id: 1, type: "DayPatternDayOfWeekBitmap", conformance: "M" }),
    (0, import_elements.FieldElement)(
      { name: "DayEntryIDs", id: 2, type: "list", conformance: "M", constraint: "1 to 96" },
      (0, import_elements.FieldElement)({ name: "entry", type: "uint32" })
    )
  ),
  (0, import_elements.DatatypeElement)(
    { name: "PeakPeriodStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Severity", id: 0, type: "PeakPeriodSeverityEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "PeakPeriod", id: 1, type: "uint16", conformance: "M", constraint: "min 1" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "TariffInformationStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "TariffLabel", id: 0, type: "string", conformance: "M", constraint: "max 128", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "ProviderName", id: 1, type: "string", conformance: "M", constraint: "max 128", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "Currency", id: 2, type: "currency", conformance: "PRICE", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "BlockMode", id: 3, type: "BlockModeEnum", conformance: "M", quality: "X" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "TariffPriceStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "PriceType", id: 0, type: "TariffPriceTypeEnum", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Price", id: 1, type: "money", conformance: "O.c+" }),
    (0, import_elements.FieldElement)({ name: "PriceLevel", id: 2, type: "int16", conformance: "O.c+" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "TariffComponentStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "TariffComponentId", id: 0, type: "uint32", conformance: "M" }),
    (0, import_elements.FieldElement)({ name: "Price", id: 1, type: "TariffPriceStruct", conformance: "[PRICE].b+", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "FriendlyCredit", id: 2, type: "bool", conformance: "[FCRED].b+" }),
    (0, import_elements.FieldElement)({ name: "AuxiliaryLoad", id: 3, type: "AuxiliaryLoadSwitchSettingsStruct", conformance: "[AUXLD].b+" }),
    (0, import_elements.FieldElement)({ name: "PeakPeriod", id: 4, type: "PeakPeriodStruct", conformance: "[PEAKP].b+", default: { type: "none" } }),
    (0, import_elements.FieldElement)({
      name: "PowerThreshold",
      id: 5,
      type: "PowerThresholdStruct",
      conformance: "[PWRTHLD].b+",
      default: { type: "none" }
    }),
    (0, import_elements.FieldElement)({ name: "Threshold", id: 6, type: "int64", conformance: "M", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "Label", id: 7, type: "string", conformance: "O", constraint: "max 128", quality: "X" }),
    (0, import_elements.FieldElement)({ name: "Predicted", id: 8, type: "bool", conformance: "O" })
  ),
  (0, import_elements.DatatypeElement)(
    { name: "TariffPeriodStruct", type: "struct" },
    (0, import_elements.FieldElement)({ name: "Label", id: 0, type: "string", conformance: "M", constraint: "max 128", quality: "X" }),
    (0, import_elements.FieldElement)(
      { name: "DayEntryIDs", id: 1, type: "list", conformance: "M", constraint: "1 to 20" },
      (0, import_elements.FieldElement)({ name: "entry", type: "uint32" })
    ),
    (0, import_elements.FieldElement)(
      { name: "TariffComponentIDs", id: 2, type: "list", conformance: "M", constraint: "1 to 20" },
      (0, import_elements.FieldElement)({ name: "entry", type: "uint32" })
    )
  )
);
import_MatterDefinition.MatterDefinition.children.push(CommodityTariff);
//# sourceMappingURL=commodity-tariff.element.js.map
