/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Endpoint } from "#endpoint/Endpoint.js";
import { EndpointType } from "#endpoint/type/EndpointType.js";
import { Endpoints } from "./Endpoints.js";
class ClientNodeEndpoints extends Endpoints {
  /**
   * For nodes where the behavior/cluster structure can not be initialized automatically (e.g. by a subscription) or
   * when the subscription data misses special clusters, you can use this method to enable a cluster on a specific
   * endpoint.
   * The method adds the endpoint, if not existing.
   */
  require(endpointId, type = {}) {
    if (this.has(endpointId)) {
      return this.for(endpointId);
    }
    const endpoint = new Endpoint({
      id: `ep${endpointId}`,
      number: endpointId,
      type: EndpointType({
        name: "Unknown",
        deviceType: EndpointType.UNKNOWN_DEVICE_TYPE,
        deviceRevision: EndpointType.UNKNOWN_DEVICE_REVISION,
        ...type
      })
    });
    this.node.parts.add(endpoint);
    return endpoint;
  }
}
export {
  ClientNodeEndpoints
};
//# sourceMappingURL=ClientNodeEndpoints.js.map
