"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 dimmable_plug_in_unit_exports = {};
__export(dimmable_plug_in_unit_exports, {
  DimmablePlugInUnitDevice: () => DimmablePlugInUnitDevice,
  DimmablePlugInUnitDeviceDefinition: () => DimmablePlugInUnitDeviceDefinition,
  DimmablePlugInUnitRequirements: () => DimmablePlugInUnitRequirements
});
module.exports = __toCommonJS(dimmable_plug_in_unit_exports);
var import_IdentifyServer = require("../behaviors/identify/IdentifyServer.js");
var import_GroupsServer = require("../behaviors/groups/GroupsServer.js");
var import_ScenesManagementServer = require("../behaviors/scenes-management/ScenesManagementServer.js");
var import_OnOffServer = require("../behaviors/on-off/OnOffServer.js");
var import_LevelControlServer = require("../behaviors/level-control/LevelControlServer.js");
var import_OccupancySensingBehavior = require("../behaviors/occupancy-sensing/OccupancySensingBehavior.js");
var import_MutableEndpoint = require("../endpoint/type/MutableEndpoint.js");
var import_SupportedBehaviors = require("../endpoint/properties/SupportedBehaviors.js");
/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
var DimmablePlugInUnitRequirements;
((DimmablePlugInUnitRequirements2) => {
  DimmablePlugInUnitRequirements2.IdentifyServer = import_IdentifyServer.IdentifyServer.alter({ commands: { triggerEffect: { optional: false } } });
  DimmablePlugInUnitRequirements2.GroupsServer = import_GroupsServer.GroupsServer;
  DimmablePlugInUnitRequirements2.ScenesManagementServer = import_ScenesManagementServer.ScenesManagementServer.alter({ commands: { copyScene: { optional: false } } });
  DimmablePlugInUnitRequirements2.OnOffServer = import_OnOffServer.OnOffServer.with("Lighting");
  DimmablePlugInUnitRequirements2.LevelControlServer = import_LevelControlServer.LevelControlServer.with("OnOff", "Lighting").alter({
    attributes: {
      currentLevel: { min: 1, max: 254 },
      minLevel: { default: 1, min: 1, max: 2 },
      maxLevel: { default: 254, min: 254, max: 255 }
    }
  });
  DimmablePlugInUnitRequirements2.OccupancySensingBehavior = import_OccupancySensingBehavior.OccupancySensingBehavior;
  DimmablePlugInUnitRequirements2.server = {
    mandatory: {
      Identify: DimmablePlugInUnitRequirements2.IdentifyServer,
      Groups: DimmablePlugInUnitRequirements2.GroupsServer,
      ScenesManagement: DimmablePlugInUnitRequirements2.ScenesManagementServer,
      OnOff: DimmablePlugInUnitRequirements2.OnOffServer,
      LevelControl: DimmablePlugInUnitRequirements2.LevelControlServer
    }
  };
  DimmablePlugInUnitRequirements2.client = { optional: { OccupancySensing: DimmablePlugInUnitRequirements2.OccupancySensingBehavior }, mandatory: {} };
})(DimmablePlugInUnitRequirements || (DimmablePlugInUnitRequirements = {}));
const DimmablePlugInUnitDeviceDefinition = (0, import_MutableEndpoint.MutableEndpoint)({
  name: "DimmablePlugInUnit",
  deviceType: 267,
  deviceRevision: 5,
  requirements: DimmablePlugInUnitRequirements,
  behaviors: (0, import_SupportedBehaviors.SupportedBehaviors)(
    DimmablePlugInUnitRequirements.server.mandatory.Identify,
    DimmablePlugInUnitRequirements.server.mandatory.Groups,
    DimmablePlugInUnitRequirements.server.mandatory.ScenesManagement,
    DimmablePlugInUnitRequirements.server.mandatory.OnOff,
    DimmablePlugInUnitRequirements.server.mandatory.LevelControl
  )
});
Object.freeze(DimmablePlugInUnitDeviceDefinition);
const DimmablePlugInUnitDevice = DimmablePlugInUnitDeviceDefinition;
//# sourceMappingURL=dimmable-plug-in-unit.js.map
