/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { IdentifyServer as BaseIdentifyServer } from "../behaviors/identify/IdentifyServer.js";
import { GroupsServer as BaseGroupsServer } from "../behaviors/groups/GroupsServer.js";
import {
  ScenesManagementServer as BaseScenesManagementServer
} from "../behaviors/scenes-management/ScenesManagementServer.js";
import { OnOffServer as BaseOnOffServer } from "../behaviors/on-off/OnOffServer.js";
import { LevelControlServer as BaseLevelControlServer } from "../behaviors/level-control/LevelControlServer.js";
import {
  OccupancySensingBehavior as BaseOccupancySensingBehavior
} from "../behaviors/occupancy-sensing/OccupancySensingBehavior.js";
import { MutableEndpoint } from "../endpoint/type/MutableEndpoint.js";
import { SupportedBehaviors } from "../endpoint/properties/SupportedBehaviors.js";
var DimmablePlugInUnitRequirements;
((DimmablePlugInUnitRequirements2) => {
  DimmablePlugInUnitRequirements2.IdentifyServer = BaseIdentifyServer.alter({ commands: { triggerEffect: { optional: false } } });
  DimmablePlugInUnitRequirements2.GroupsServer = BaseGroupsServer;
  DimmablePlugInUnitRequirements2.ScenesManagementServer = BaseScenesManagementServer.alter({ commands: { copyScene: { optional: false } } });
  DimmablePlugInUnitRequirements2.OnOffServer = BaseOnOffServer.with("Lighting");
  DimmablePlugInUnitRequirements2.LevelControlServer = BaseLevelControlServer.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 = BaseOccupancySensingBehavior;
  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 = MutableEndpoint({
  name: "DimmablePlugInUnit",
  deviceType: 267,
  deviceRevision: 5,
  requirements: DimmablePlugInUnitRequirements,
  behaviors: 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;
export {
  DimmablePlugInUnitDevice,
  DimmablePlugInUnitDeviceDefinition,
  DimmablePlugInUnitRequirements
};
//# sourceMappingURL=dimmable-plug-in-unit.js.map
