/**
 * Shell-layer extension UI contract.
 *
 * Extends the headless ExtensionUIContext with a `custom()` method that
 * renders arbitrary TUI components (overlays, approval prompts, etc.).
 * The `hasCustomExtensionUI` guard narrows an ExtensionContext to this
 * richer interface at runtime.
 */
import type { ExtensionContext, ExtensionUIContext } from '../app/extensions/index.js';
import type { Component, OverlayHandle, OverlayOptions, TUI } from '../tui/index.js';
import type { KeybindingsManager } from './keybindings.js';
import type { Theme } from './theme/runtime.js';
export interface ExtensionWidgetOptions {
    placement?: 'aboveEditor' | 'belowEditor';
}
export interface ShellExtensionUIContext extends ExtensionUIContext {
    custom<T>(factory: (tui: TUI, theme: Theme, keybindings: KeybindingsManager, done: (result: T) => void) => (Component & {
        dispose?(): void;
    }) | Promise<Component & {
        dispose?(): void;
    }>, options?: {
        placement?: 'editor' | 'conversation';
        fullscreen?: boolean;
        overlay?: boolean;
        overlayOptions?: OverlayOptions | (() => OverlayOptions);
        onHandle?: (handle: OverlayHandle) => void;
    }): Promise<T>;
}
export declare function hasCustomExtensionUI(ctx: Pick<ExtensionContext, 'hasUI' | 'ui'> | undefined): ctx is Pick<ExtensionContext, 'hasUI'> & {
    ui: ShellExtensionUIContext;
};
//# sourceMappingURL=extension-ui.d.ts.map