import type { Component, TUI } from '@earendil-works/pi-tui';
import { type AutocompleteItem, type AutocompleteProvider } from '@earendil-works/pi-tui';
import type { ExtensionRegistryImpl } from '../../extensions/loader.js';
import type { TuiAutocompleteSuggestion, TuiSlashCommandHandler } from '../../extensions/types/tui.js';
import type { ChatLog } from '../components/chat-log.js';
import type { TuiHeader } from '../components/tui-header.js';
import type { TuiBottomBar } from '../components/tui-bottom-bar.js';
import type { TuiState } from '../tui-types.js';
import { TuiExtensionSurface } from './surface.js';
export interface TuiExtensionSlashCommand {
    name: string;
    description: string;
    handler: TuiSlashCommandHandler;
}
export interface TuiExtensionRuntime {
    surface: TuiExtensionSurface;
    slashCommands: TuiExtensionSlashCommand[];
    autocompleteProvider: AutocompleteProvider;
    activate(): Promise<void>;
    dispose(): void;
}
export interface CreateTuiExtensionRuntimeOptions {
    registry?: ExtensionRegistryImpl;
    tui: TUI;
    chatLog: ChatLog;
    header: TuiHeader;
    bottomBar: TuiBottomBar;
    getState: () => TuiState;
    baseSlashCommands: Array<{
        name: string;
        description: string;
    }>;
    cwd: string;
    fdPath: string | null;
    openOverlay: (component: Component) => void;
    closeOverlay: () => void;
    onInvalidate: () => void;
}
declare function suggestionsToAutocompleteItems(suggestions: TuiAutocompleteSuggestion[]): AutocompleteItem[];
export declare function createTuiExtensionRuntime(opts: CreateTuiExtensionRuntimeOptions): TuiExtensionRuntime;
/** Exported for tests */
export { suggestionsToAutocompleteItems };
