import React, { KeyboardEvent } from "react";
import { Room } from "matrix-js-sdk/src/matrix";
import Autocompleter, { ICompletion, ISelectionRange, IProviderCompletions } from "../../../autocomplete/Autocompleter";
import RoomContext from "../../../contexts/RoomContext";
export declare const generateCompletionDomId: (n: number) => string;
interface IProps {
    query: string;
    onConfirm: (completion: ICompletion) => void;
    onSelectionChange?: (partIndex: number) => void;
    selection: ISelectionRange;
    room: Room;
}
interface IState {
    completions: IProviderCompletions[];
    completionList: ICompletion[];
    selectionOffset: number;
    shouldShowCompletions: boolean;
    hide: boolean;
    forceComplete: boolean;
}
export default class Autocomplete extends React.PureComponent<IProps, IState> {
    autocompleter?: Autocompleter;
    queryRequested?: string;
    debounceCompletionsRequest?: number;
    private containerRef;
    static contextType: React.Context<import("../../structures/RoomView").IRoomState & {
        threadId?: string;
    }>;
    context: React.ContextType<typeof RoomContext>;
    constructor(props: IProps, context: React.ContextType<typeof RoomContext>);
    componentDidMount(): void;
    private applyNewProps;
    componentWillUnmount(): void;
    private complete;
    private processQuery;
    private processCompletions;
    hasSelection(): boolean;
    countCompletions(): number;
    moveSelection(delta: number): void;
    onEscape(e: KeyboardEvent): boolean | undefined;
    private hide;
    forceComplete(): Promise<number>;
    onConfirmCompletion: () => void;
    private onCompletionClicked;
    private setSelection;
    componentDidUpdate(prevProps: IProps): void;
    render(): React.ReactNode;
}
export {};
