import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
import type { AutocompletePlugin } from '../autocompletePluginType';
export declare const autocompletePluginKey: PluginKey;
export interface AutocompletePluginState {
    /** The decoration set containing the ghost text widget */
    decorationSet: DecorationSet;
    /** The document position where the ghost text should appear */
    ghostPosition: number;
    /** The predicted ghost text to display */
    ghostText: string;
}
/**
 * Context provided to the autocomplete plugin on first editor focus.
 * Text fields are selectively ingested to boost word-frequency scoring for
 * predictions, giving words already present in the document/thread an L1
 * priority boost.
 */
export interface AutocompleteContext {
    /** Full page content as a string (e.g. markdown). */
    fullPageContent?: string;
    /** The currently selected text on the page, if any. */
    pageSelectionContent?: string;
    /** Content of the parent comment when the editor is in reply or edit mode. */
    parentCommentContent?: string;
    /** Contents of sibling comments when the editor is in reply or edit mode. */
    siblingCommentsContents?: string[];
}
export interface AutocompletePluginOptions {
    /**
     * Async function called once on first editor focus to retrieve context for
     * word-frequency boosting. Called lazily so the preset can remain synchronous.
     */
    getContext?: () => Promise<AutocompleteContext | undefined>;
    /**
     * Async function that resolves to a URL for the word vectors binary file.
     * When provided, this takes precedence over the bundled asset URL.
     * Use this to serve vectors from a CDN or media service in production.
     */
    getVectorsBinaryUrl?: () => Promise<string>;
    /**
     * User locale used to determine whether autocomplete should run.
     * Defaults to browser locale when omitted.
     */
    locale?: string;
    /**
     * Subscription for hosts with live external context (e.g. Rovo chat). The plugin
     * re-fetches via getContext() on each notification and unsubscribes on destroy.
     * Only meaningful alongside `getContext`; without it each notification is a no-op.
     */
    subscribeToContextUpdates?: (onContextUpdated: () => void) => () => void;
    /**
     * When true, uses on-device inference via WebGPU (MLC WebLLM) instead of
     * the network-based slow-lane backend. Defaults to false (network client).
     */
    useLocalModel?: boolean;
}
export declare const createAutocompletePlugin: (options?: AutocompletePluginOptions, api?: ExtractInjectionAPI<AutocompletePlugin>) => SafePlugin<AutocompletePluginState>;
