import { Editor, type EditorOptions, type EditorTheme, type TUI } from "@threadwell/tui";
import type { AppKeybinding, KeybindingsManager } from "../../../core/keybindings.js";
export type ImageAttachment = {
    id: number;
    path: string;
    mimeType: string;
};
/**
 * Custom editor that handles app-level keybindings for coding-agent.
 */
export declare class CustomEditor extends Editor {
    private keybindings;
    actionHandlers: Map<AppKeybinding, () => void>;
    onEscape?: () => void;
    onCtrlD?: () => void;
    onPasteImage?: () => void;
    /** Handler for extension-registered shortcuts. Returns true if handled. */
    onExtensionShortcut?: (data: string) => boolean;
    private imageAttachments;
    private submittedImageAttachments;
    private nextImageAttachmentId;
    constructor(tui: TUI, theme: EditorTheme, keybindings: KeybindingsManager, options?: EditorOptions);
    /**
     * Register a handler for an app action.
     */
    onAction(action: AppKeybinding, handler: () => void): void;
    insertImageAttachment(path: string, mimeType: string): void;
    setText(text: string): void;
    render(width: number): string[];
    protected prepareSubmitText(text: string): string;
    protected afterSubmit(): void;
    prepareExternalSubmitText(): string;
    consumeSubmittedImageAttachments(): ImageAttachment[];
    private renderImageChip;
    private getActiveImageAttachments;
    handleInput(data: string): void;
}
//# sourceMappingURL=custom-editor.d.ts.map