import { RequestTypes } from 'detritus-client-rest';
import { Timers } from 'detritus-utils';
import { BaseSet } from '../../collections/baseset';
import { Structure } from '../../structures/basestructure';
import { ComponentActionData } from './actionbase';
import { ComponentActionRowData, ComponentActionRow } from './actionrow';
import { ComponentButton } from './button';
import { ComponentContext } from './context';
import { ComponentSelectMenu } from './selectmenu';
export declare type ComponentOnTimeout = () => Promise<any> | any;
export declare type ComponentRun = (context: ComponentContext) => Promise<any> | any;
export declare type ComponentOnError = (context: ComponentContext, error: Error) => Promise<any> | any;
export interface ComponentsOptions {
    components?: Array<ComponentActionRowData | ComponentActionRow>;
    id?: string;
    timeout?: number;
    onTimeout?: ComponentOnTimeout;
    run?: ComponentRun;
    onError?: ComponentOnError;
}
/**
 * Utils Components Structure
 * @category Utils
 */
export declare class Components extends Structure {
    readonly _keys: BaseSet<string>;
    _timeout?: Timers.Timeout;
    components: Array<ComponentActionRow>;
    id?: string;
    timeout: number;
    onTimeout?(): Promise<any> | any;
    run?(context: ComponentContext): Promise<any> | any;
    onError?(context: ComponentContext, error: Error): Promise<any> | any;
    constructor(data?: ComponentsOptions);
    addActionRow(data?: ComponentActionRow | ComponentActionRowData): this;
    addButton(data?: ComponentButton | ComponentActionData, inline?: boolean): this;
    addSelectMenu(data?: ComponentSelectMenu | ComponentActionData): this;
    createActionRow(data?: ComponentActionRowData): ComponentActionRow;
    createButton(data?: ComponentActionData, inline?: boolean): ComponentButton;
    createSelectMenu(data?: ComponentActionData): ComponentSelectMenu;
    mergeValue(key: string, value: any): void;
    toJSON(): Array<RequestTypes.RawChannelMessageComponent>;
}
