/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import type { Behavior } from "#behavior/Behavior.js";
import type { ActionContext } from "#behavior/context/ActionContext.js";
import { LocalActorContext } from "#behavior/context/server/LocalActorContext.js";
import type { Endpoint } from "#endpoint/Endpoint.js";
import type { EndpointType } from "#endpoint/type/EndpointType.js";
export type Commands<T extends EndpointType> = {
    [K in keyof T["behaviors"]]: Commands.OfBehavior<T["behaviors"][K]>;
};
export declare function Commands<T extends EndpointType = EndpointType.Empty>(endpoint: Endpoint<T>): Commands<T>;
export declare namespace Commands {
    type CommandContext = ActionContext | LocalActorContext.Options;
    interface Command<C extends (arg: unknown) => unknown = (arg: unknown) => unknown> {
        (...args: Parameters<C> extends [] ? [input?: void, context?: CommandContext] : [input: Parameters<C>[0], context?: CommandContext]): Promise<Awaited<ReturnType<C>>>;
    }
    type OfBehavior<T extends Behavior.Type> = {
        [K in keyof InstanceType<T>]: InstanceType<T>[K] extends (arg: any) => any ? Command<InstanceType<T>[K]> : never;
    };
}
//# sourceMappingURL=Commands.d.ts.map