import { Editor, type EditorOptions, type EditorTheme, type TUI } from "@earendil-works/pi-tui";
import type { AppKeybinding, KeybindingsManager } from "../../../core/keybindings.ts";
export interface CustomEditorOptions extends EditorOptions {
    promptPrefix?: string;
    placeholder?: string | (() => string);
}
/**
 * Custom editor that handles app-level keybindings for coding-agent.
 */
export declare class CustomEditor extends Editor {
    private keybindings;
    private promptPrefix;
    private placeholder;
    actionHandlers: Map<AppKeybinding, () => void>;
    onEscape?: () => void;
    onCtrlD?: () => void;
    onPasteImage?: () => void;
    /** Handler for extension-registered shortcuts. Returns true if handled. */
    onExtensionShortcut?: (data: string) => boolean;
    constructor(tui: TUI, theme: EditorTheme, keybindings: KeybindingsManager, options?: CustomEditorOptions);
    setPlaceholder(placeholder: string | (() => string) | undefined): void;
    render(width: number): string[];
    private renderPlaceholder;
    private isEditorBorderLine;
    private extendBorderLine;
    private padLine;
    /**
     * Register a handler for an app action.
     */
    onAction(action: AppKeybinding, handler: () => void): void;
    handleInput(data: string): void;
}
//# sourceMappingURL=custom-editor.d.ts.map