/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { AtLeastOne, HandlerFunction, NamedHandler } from "@matter/general";
import { Endpoint as NodeEndpoint } from "@matter/node";
import { ClusterClientObj } from "@matter/protocol";
import { ClusterType, EndpointNumber } from "@matter/types";
import { DeviceTypeDefinition } from "./DeviceTypes.js";
import { Endpoint, EndpointOptions } from "./Endpoint.js";
/**
 * Temporary used device class for paired devices until we added a layer to choose the right specialized device class
 * based on the device classes and features of the paired device
 */
export declare class PairedDevice extends Endpoint {
    /**
     * Create a new PairedDevice instance. All data are automatically parsed from the paired device!
     *
     * @param endpoint Underlying ClientEndpoint instance
     * @param definition DeviceTypeDefinitions of the paired device as reported by the device
     * @param clusters Clusters of the paired device as reported by the device
     * @param endpointId Endpoint ID of the paired device as reported by the device
     */
    constructor(endpoint: NodeEndpoint, definition: AtLeastOne<DeviceTypeDefinition>, clusters: ClusterClientObj[] | undefined, endpointId: EndpointNumber);
}
/**
 * Root endpoint of a device. This is used internally and not needed to be instanced by the user.
 */
export declare class RootEndpoint extends Endpoint {
    /**
     * Create a new RootEndpoint instance. This is automatically instanced by the CommissioningServer class.
     */
    constructor(endpoint: NodeEndpoint);
    /**
     * Add a cluster client to the root endpoint. This is mainly used internally and not needed to be called by the user.
     *
     * @param cluster ClusterClient object to add
     */
    addRootClusterClient(cluster: ClusterClientObj): void;
    /**
     * Get a cluster client from the root endpoint. This is mainly used internally and not needed to be called by the user.
     *
     * @param cluster ClusterClient to get or undefined if not existing
     */
    getRootClusterClient<const N extends ClusterType.Concrete>(cluster: N): ClusterClientObj<N["Typing"]> | undefined;
}
/**
 * Base class for all devices. This class should be extended by all devices.
 */
export declare class Device extends Endpoint {
    protected commandHandler: NamedHandler<any>;
    /**
     * Create a new Device instance.
     *
     * @param endpoint Underlying ClientEndpoint instance
     * @param definition DeviceTypeDefinitions of the device
     * @param options Optional endpoint options
     */
    constructor(endpoint: NodeEndpoint, definition: DeviceTypeDefinition, options?: EndpointOptions);
    /**
     * Method to add command handlers to the device.
     * The base class do not expose any commands!
     *
     * @param command Command name to add a handler for
     * @param handler Handler function to be executed when the command is received
     */
    addCommandHandler(command: never, handler: HandlerFunction): void;
    /**
     * Method to remove command handlers from the device.
     * The base class do not expose any commands!
     *
     * @param command Command name to remove the handler from
     * @param handler Handler function to be removed
     */
    removeCommandHandler(command: never, handler: HandlerFunction): void;
    /**
     * Execute a command handler. Should only be used internally, but cannot be declared as protected officially
     * because needed public for derived classes.
     *
     * @protected
     * @param command Command name to execute the handler for
     * @param args Arguments to be passed to the handler
     */
    protected _executeHandler(command: never, ...args: any[]): Promise<any>;
}
//# sourceMappingURL=Device.d.ts.map