/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MatterDefinition } from "../MatterDefinition.js";
import {
  ClusterElement as Cluster,
  AttributeElement as Attribute,
  FieldElement as Field,
  CommandElement as Command,
  DatatypeElement as Datatype
} from "../../elements/index.js";
const ResourceMonitoring = Cluster(
  { name: "ResourceMonitoring", classification: "application" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
  Attribute(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    Field({ name: "CON", conformance: "O", constraint: "0", title: "Condition" }),
    Field({ name: "WRN", conformance: "O", constraint: "1", title: "Warning" }),
    Field({ name: "REP", conformance: "O", constraint: "2", title: "ReplacementProductList" })
  ),
  Attribute({ name: "Condition", id: 0, type: "percent", access: "R V", conformance: "CON" }),
  Attribute({
    name: "DegradationDirection",
    id: 1,
    type: "DegradationDirectionEnum",
    access: "R V",
    conformance: "CON",
    constraint: "desc",
    quality: "F"
  }),
  Attribute({ name: "ChangeIndication", id: 2, type: "ChangeIndicationEnum", access: "R V", conformance: "M" }),
  Attribute({ name: "InPlaceIndicator", id: 3, type: "bool", access: "R V", conformance: "O" }),
  Attribute({
    name: "LastChangedTime",
    id: 4,
    type: "epoch-s",
    access: "RW VO",
    conformance: "O",
    default: null,
    quality: "X N"
  }),
  Attribute(
    {
      name: "ReplacementProductList",
      id: 5,
      type: "list",
      access: "R V",
      conformance: "REP",
      constraint: "max 5",
      quality: "F"
    },
    Field({ name: "entry", type: "ReplacementProductStruct" })
  ),
  Command({ name: "ResetCondition", id: 0, access: "O", conformance: "O", direction: "request", response: "status" }),
  Datatype(
    { name: "DegradationDirectionEnum", type: "enum8" },
    Field({ name: "Up", id: 0, conformance: "M" }),
    Field({ name: "Down", id: 1, conformance: "M" })
  ),
  Datatype(
    { name: "ChangeIndicationEnum", type: "enum8" },
    Field({ name: "Ok", id: 0, conformance: "M" }),
    Field({ name: "Warning", id: 1, conformance: "WRN" }),
    Field({ name: "Critical", id: 2, conformance: "M" })
  ),
  Datatype(
    { name: "ProductIdentifierTypeEnum", type: "enum8" },
    Field({ name: "Upc", id: 0, conformance: "M" }),
    Field({ name: "Gtin8", id: 1, conformance: "M" }),
    Field({ name: "Ean", id: 2, conformance: "M" }),
    Field({ name: "Gtin14", id: 3, conformance: "M" }),
    Field({ name: "Oem", id: 4, conformance: "M" })
  ),
  Datatype(
    { name: "ReplacementProductStruct", type: "struct" },
    Field({
      name: "ProductIdentifierType",
      id: 0,
      type: "ProductIdentifierTypeEnum",
      conformance: "M",
      constraint: "desc"
    }),
    Field({ name: "ProductIdentifierValue", id: 1, type: "string", conformance: "M", constraint: "max 20" })
  )
);
MatterDefinition.children.push(ResourceMonitoring);
export {
  ResourceMonitoring
};
//# sourceMappingURL=resource-monitoring.element.js.map
