/**
 * @license
 * Copyright 2022-2026 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 { OnOffServer as BaseOnOffServer } from "../behaviors/on-off/OnOffServer.js";
import { LevelControlServer as BaseLevelControlServer } from "../behaviors/level-control/LevelControlServer.js";
import {
  ScenesManagementServer as BaseScenesManagementServer
} from "../behaviors/scenes-management/ScenesManagementServer.js";
import {
  OccupancySensingClient as BaseOccupancySensingClient
} from "../behaviors/occupancy-sensing/OccupancySensingClient.js";
import { MutableEndpoint } from "../endpoint/type/MutableEndpoint.js";
import { SupportedBehaviors } from "../endpoint/properties/SupportedBehaviors.js";
var DimmableLightRequirements;
((DimmableLightRequirements2) => {
  DimmableLightRequirements2.IdentifyServer = BaseIdentifyServer.alter({ commands: { triggerEffect: { optional: false } } });
  DimmableLightRequirements2.GroupsServer = BaseGroupsServer;
  DimmableLightRequirements2.OnOffServer = BaseOnOffServer.with("Lighting");
  DimmableLightRequirements2.LevelControlServer = BaseLevelControlServer.with("Lighting", "OnOff").alter({
    attributes: {
      currentLevel: { min: 1, max: 254 },
      minLevel: { default: 1, min: 1, max: 2 },
      maxLevel: { default: 254, min: 254, max: 255 }
    }
  });
  DimmableLightRequirements2.ScenesManagementServer = BaseScenesManagementServer.alter({ commands: { copyScene: { optional: false } } });
  DimmableLightRequirements2.OccupancySensingClient = BaseOccupancySensingClient;
  DimmableLightRequirements2.server = {
    mandatory: {
      Identify: DimmableLightRequirements2.IdentifyServer,
      Groups: DimmableLightRequirements2.GroupsServer,
      OnOff: DimmableLightRequirements2.OnOffServer,
      LevelControl: DimmableLightRequirements2.LevelControlServer,
      ScenesManagement: DimmableLightRequirements2.ScenesManagementServer
    }
  };
  DimmableLightRequirements2.client = { optional: { OccupancySensing: DimmableLightRequirements2.OccupancySensingClient }, mandatory: {} };
})(DimmableLightRequirements || (DimmableLightRequirements = {}));
const DimmableLightDeviceDefinition = MutableEndpoint({
  name: "DimmableLight",
  deviceType: 257,
  deviceRevision: 3,
  requirements: DimmableLightRequirements,
  behaviors: SupportedBehaviors(
    DimmableLightRequirements.server.mandatory.Identify,
    DimmableLightRequirements.server.mandatory.Groups,
    DimmableLightRequirements.server.mandatory.OnOff,
    DimmableLightRequirements.server.mandatory.LevelControl,
    DimmableLightRequirements.server.mandatory.ScenesManagement
  )
});
Object.freeze(DimmableLightDeviceDefinition);
const DimmableLightDevice = DimmableLightDeviceDefinition;
export {
  DimmableLightDevice,
  DimmableLightDeviceDefinition,
  DimmableLightRequirements
};
//# sourceMappingURL=dimmable-light.js.map
