import { Component } from "../interfaces/Component";
import { AnyComponentInteraction } from "../util";
import { BaseHandler } from "./BaseHandler";
export declare class ComponentHandler extends BaseHandler {
    components: Component[];
    protected componentExists(name: string): boolean;
    register(...components: Component[]): ComponentHandler;
    /**
     * registerFromDir automatically loads files & creates class instances in the directory specified.
     * If recurse is true, it will also load commands from subdirectories.
     * Auto-load commands need to have a __default__ export. Otherwise they will be ignored.
     * @param dir The directory to load files from.
     * @param recurse Whether to load files from subdirectories.
     * */
    registerFromDir(dir: string, recurse?: boolean): ComponentHandler;
    private static isInstanceOfComponent;
    runComponent(event: AnyComponentInteraction, metadata?: any): void;
    private callErrorIfPresent;
}
