/**
 * @license
 * Copyright 2022-2024 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MatterDefinition } from "../MatterDefinition.js";
import {
  ClusterElement as Cluster,
  AttributeElement as Attribute,
  DatatypeElement as Datatype,
  FieldElement as Field
} from "../../elements/index.js";
const DeviceEnergyManagementMode = Cluster({
  name: "DeviceEnergyManagementMode",
  id: 159,
  type: "ModeBase",
  classification: "application",
  pics: "DEMM",
  details: "This cluster is derived from the Mode Base cluster, defining additional mode tags and namespaced enumerated values for Device Energy Management devices.\nNOTE Support for Device Energy Management Mode cluster is provisional.",
  xref: { document: "cluster", section: "9.6" },
  children: [
    Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
    Datatype({
      name: "ModeOptionStruct",
      type: "ModeOptionStruct",
      details: "The table below lists the changes relative to the Mode Base cluster for the fields of the ModeOptionStruct type. A blank field indicates no change.",
      xref: { document: "cluster", section: "9.6.4.1" }
    }),
    Datatype({
      name: "ModeTag",
      type: "enum16",
      children: [
        Field({
          name: "NoOptimization",
          id: 16384,
          details: "The device prohibits optimization of energy usage management: its energy usage is determined only by the user configuration and internal device needs. This tag cannot be included with any of the other tags defined below in a mode.",
          xref: { document: "cluster", section: "9.6.5.1.1" }
        }),
        Field({
          name: "DeviceOptimization",
          id: 16385,
          details: "The device is permitted to manage its own energy usage. For example, using tariff information it may obtain.",
          xref: { document: "cluster", section: "9.6.5.1.2" }
        }),
        Field({
          name: "LocalOptimization",
          id: 16386,
          details: "The device permits management of energy usage by an energy manager to optimize the local energy usage.",
          xref: { document: "cluster", section: "9.6.5.1.3" }
        }),
        Field({
          name: "GridOptimization",
          id: 16387,
          details: "The device permits management of energy usage by an energy manager to optimize the grid energy usage.",
          xref: { document: "cluster", section: "9.6.5.1.4" }
        })
      ]
    })
  ]
});
MatterDefinition.children.push(DeviceEnergyManagementMode);
export {
  DeviceEnergyManagementMode
};
//# sourceMappingURL=DeviceEnergyManagementMode.js.map
