import type { Ace } from "ace-builds";
import { Component } from "react";
import _ from "underscore";
import "ace/ace";
import "ace/ext-language_tools";
import "ace/ext-searchbox";
import "ace/mode-sql";
import "ace/mode-json";
import "ace/snippets/text";
import "ace/snippets/sql";
import "ace/snippets/json";
import type { Card, CardId, NativeQuerySnippet } from "../../../../../metabase-types/api";
import type { EditorProps, EditorRef } from "../Editor";
import type { AutocompleteItem, CardCompletionItem } from "./types";
type AceCompletionsGetter = Ace.Completer["getCompletions"];
type SizeProps = {
    width: number | null;
    height: number | null;
};
type StateProps = {
    autocompleteResultsFn?: (prefix: string) => Promise<AutocompleteItem[]>;
    cardAutocompleteResultsFn?: (prefix: string) => Promise<CardCompletionItem[]>;
};
type SnippetProps = {
    snippets?: NativeQuerySnippet[];
};
type DispatchProps = {
    fetchQuestion: (cardId: CardId) => Promise<Card>;
};
type AceEditorProps = EditorProps & SizeProps & StateProps & DispatchProps & SnippetProps;
export declare class AceEditorInner extends Component<AceEditorProps> {
    editor: import("react").RefObject<HTMLDivElement>;
    nextCompleters?: (position: Ace.Position) => Ace.Completer[];
    _editor: Ace.Editor | null;
    _localUpdate: boolean;
    _focusFrame: number;
    componentDidMount(): void;
    componentWillUnmount(): void;
    componentDidUpdate(prevProps: AceEditorProps): void;
    focus(): void;
    resize(): void;
    getSelectionTarget(): Element | null;
    loadAceEditor(): void;
    HACK_initializeCompletionsPopup: () => void;
    onChange: (() => void) & _.Cancelable;
    _retriggerAutocomplete: (() => void) & _.Cancelable;
    handleSelectionChange: () => void;
    handleCursorChange: ((_evt: Event, { cursor }: {
        cursor: Ace.Position;
    }) => void) & _.Cancelable;
    handleQueryUpdate: (queryText: string) => void;
    handleRightClick: (event: MouseEvent) => void;
    getSnippetNameAtCursor: ({ row, column }: Ace.Position) => string | null;
    getCardTagNameAtCursor: ({ row, column }: Ace.Position) => string | null;
    cardTagIdAtCursor: ({ row, column }: Ace.Position) => number | null;
    getSnippetCompletions: AceCompletionsGetter;
    getCardTagCompletions: AceCompletionsGetter;
    render(): import("react/jsx-runtime").JSX.Element;
}
export declare const AceEditor: (props: EditorProps & import("react").RefAttributes<EditorRef>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
export {};
