import { EditorView } from "@codemirror/view";
import { type AIConfig } from "./api";
import type { AIPluginI18n } from "./index";
import { AILoadingToast } from "./loading-toast";
export declare class AIDialog {
    dom: HTMLElement | null;
    input: HTMLInputElement;
    commandsContainer: HTMLElement;
    view: EditorView;
    config: AIConfig;
    i18n?: Partial<AIPluginI18n>;
    clickHandler: (e: MouseEvent) => void;
    savedSelection: {
        from: number;
        to: number;
    } | null;
    hasSelection: boolean;
    private initialized;
    loadingToast: AILoadingToast;
    lastPosition: {
        top: number;
        left: number;
    } | null;
    currentController: AbortController | null;
    constructor(view: EditorView, config: AIConfig & {
        i18n?: Partial<AIPluginI18n>;
    });
    private initializeDOM;
    createDOM(): HTMLElement;
    private submit;
    private renderPresets;
    show(position: {
        top: number;
        left: number;
    }, selection?: {
        from: number;
        to: number;
    }): void;
    hide(): void;
    handleCommand(instruction: string): Promise<void>;
    handleSlashCommand(instruction: string): Promise<void>;
    destroy(): void;
}
//# sourceMappingURL=dialog.d.ts.map