/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Endpoint } from "./Endpoint.js";
class ComposedDevice extends Endpoint {
  /**
   * Creates a new ComposedDevice.
   *
   * @param endpoint Underlying ClientEndpoint instance
   * @param definition DeviceTypeDefinitions of the composed device
   * @param devices Array with devices that should be combined into one device that are directly added.
   * @param options Optional Endpoint options
   */
  constructor(endpoint, definition, devices = [], options = {}) {
    super(endpoint, [definition], options);
    devices.forEach((device) => this.addDevice(device));
  }
  /**
   * Add a sub-device to the composed device.
   * @param device Device instance to add
   */
  addDevice(device) {
    this.addChildEndpoint(device);
  }
  /**
   * Get all sub-devices of the composed device.
   *
   * @returns Array with all sub-devices
   */
  getDevices() {
    return this.getChildEndpoints();
  }
  /**
   * Verify that the required clusters exists on the device.
   */
  verifyRequiredClusters() {
    return;
  }
}
export {
  ComposedDevice
};
//# sourceMappingURL=ComposedDevice.js.map
