import type { Terminal } from "./terminal.ts";
import { type Component, TuiBase, type TuiStopOptions, VIEWPORT_TUI, type ViewportTUI } from "./tui.ts";
export interface TuiAltScreenOptions {
    /** Number of logical lines moved for each mouse-wheel event. */
    wheelScrollLines?: number;
    /** Capture mouse events for viewport scrolling and application-owned text selection. */
    mouse?: boolean;
    /** Style a non-current transcript search match. */
    searchMatchStyle?: (text: string) => string;
    /** Style the current transcript search match. */
    searchCurrentMatchStyle?: (text: string) => string;
    /** Open an OSC 8 hyperlink activated with a primary-button click. */
    openUrl?: (url: string) => void;
    /** Handle an unmodified secondary-button press for clipboard paste. Currently enabled on Windows only. */
    onRightClickPaste?: () => void;
    /**
     * Copy selected text to the system clipboard. Return `true` on success; the caller flashes
     * an error otherwise. When omitted, the selection is copied via an OSC 52 write.
     */
    copySelection?: (text: string) => Promise<boolean>;
}
/** Alternate-screen TUI with a scrollable, application-owned viewport. */
export declare class TuiAltScreen extends TuiBase implements ViewportTUI {
    readonly mode: "fullscreen";
    readonly [VIEWPORT_TUI]: true;
    private previousScreen;
    private lastDocument;
    private previousScreenWidth;
    private previousScreenHeight;
    private layoutRoot;
    private currentLayout;
    private readonly implicitDocument;
    private readonly implicitScrollView;
    private readonly flashes;
    private altScreenActive;
    private imageProtocol;
    private savedCapabilities?;
    private readonly uploadedKittyImages;
    private selectionAnchor?;
    private selectionFocus?;
    private selectionGranularity;
    private selectionInitialRange?;
    private lastClick?;
    private selectionDragPointer?;
    private selectionAutoScrollDirection;
    private selectionAutoScrollTimer?;
    private selectionPressActive;
    private scrollbarDrag?;
    private scrollbarHover?;
    private activeSearch?;
    private pressedUrl?;
    private selectionDragged;
    private readonly wheelScrollLines;
    private readonly mouseEnabled;
    private readonly searchMatchStyle;
    private readonly searchCurrentMatchStyle;
    private readonly openUrl?;
    private readonly onRightClickPaste?;
    private readonly copySelection?;
    constructor(terminal: Terminal, showHardwareCursor?: boolean, logDirectory?: string, options?: TuiAltScreenOptions);
    get viewportTop(): number;
    get isFollowingOutput(): boolean;
    setLayoutRoot(component: Component | undefined): void;
    render(width: number): string[];
    protected getMountedRoots(): readonly Component[];
    private getPrimaryScrollView;
    protected beforeTerminalStart(): void;
    protected beforeTerminalStop(_options: TuiStopOptions): void;
    protected afterTerminalStop(options: TuiStopOptions): void;
    private deleteKittyImages;
    private prepareKittyScreen;
    protected resetRenderState(): void;
    scrollBy(lines: number): void;
    scrollToTop(): void;
    scrollToBottom(): void;
    private scrollToPrompt;
    private openSearch;
    private closeSearch;
    private updateSearchQuery;
    private navigateSearch;
    private refreshSearch;
    /** Show a transient message in the alternate-screen flash stack. */
    flash(message: string, durationMs?: number): void;
    private shouldDeferViewportInputToOverlay;
    private handleViewportInput;
    private parseWheelEvent;
    private routeWheel;
    private parseSgrMouseEvent;
    private handleRightClickPaste;
    private getScrollbarTargetAt;
    private setScrollbarHover;
    private updateScrollbarHover;
    private stopScrollbarHover;
    private handleScrollbarMouseEvent;
    private stopScrollbarDrag;
    private getScrollSelectionPoint;
    private getSelectionPoint;
    private getSelectionSourceLine;
    private getWordSelection;
    private getLineSelection;
    private updateSelectionFocus;
    private getClickCount;
    private updateSelectionAutoScroll;
    private autoScrollSelection;
    private stopSelectionAutoScroll;
    private handleSelectionMouseEvent;
    private getSelectionBounds;
    private getSelectionColumns;
    private copySelectionToClipboard;
    private applySearchTextHighlight;
    private applySearchHighlights;
    private applySelectionHighlight;
    private applySelection;
    private isMouseSequence;
    private compositeFlashes;
    protected doRender(): void;
}
//# sourceMappingURL=tui-alt-screen.d.ts.map