import type { Channel } from '../../../channel';
import type { Middleware } from '../../../middleware';
import type { SearchSourceOptions } from '../../../search';
import { BaseSearchSourceSync } from '../../../search';
import type { MessageComposer } from '../../messageComposer';
import type { CommandSuggestion, TextComposerMiddlewareOptions } from './types';
import type { TextComposerMiddlewareExecutorState } from './TextComposerMiddlewareExecutor';
export declare class CommandSearchSource extends BaseSearchSourceSync<CommandSuggestion> {
    readonly type = "commands";
    protected channel: Channel;
    constructor(channel: Channel, options?: SearchSourceOptions);
    canExecuteQuery: (newSearchString?: string) => boolean;
    getStateBeforeFirstQuery(newSearchString: string): {
        items: CommandSuggestion[] | undefined;
        hasNext: boolean;
        isActive: boolean;
        isLoading: boolean;
        searchQuery: string;
        lastQueryError?: Error;
        next?: string | null;
        offset?: number;
    };
    query(searchQuery: string): {
        items: {
            id: "all" | "giphy" | "ban" | "fun_set" | "moderation_set" | "mute" | "unban" | "unmute";
            created_at?: string | undefined;
            updated_at?: string | undefined;
            args?: string;
            description?: string;
            name: "all" | "giphy" | "ban" | "fun_set" | "moderation_set" | "mute" | "unban" | "unmute";
            set?: import("../../..").CommandVariants;
        }[];
        next: null;
    };
    protected filterQueryResults(items: CommandSuggestion[]): CommandSuggestion[];
}
export type CommandsMiddleware = Middleware<TextComposerMiddlewareExecutorState<CommandSuggestion>, 'onChange' | 'onSuggestionItemSelect'>;
export declare const createCommandsMiddleware: (channel: Channel, options?: Partial<TextComposerMiddlewareOptions> & {
    composer?: MessageComposer;
    searchSource?: CommandSearchSource;
}) => CommandsMiddleware;
