/**
 * Pure functions for viewport-based select menu scrolling.
 *
 * Handles scroll offset calculation and viewport-limited rendering.
 */
import type { SelectOptionItem, ViewportState } from './select-menu.js';
/**
 * Create viewport state from terminal dimensions and menu content.
 *
 * When all items fit within the available terminal space, viewport is
 * inactive and the menu renders without scrolling (identical to the
 * pre-viewport behaviour).
 */
export declare function createViewportState<T extends string>(terminalRows: number, options: SelectOptionItem<T>[], hasCancelOption: boolean): ViewportState;
/**
 * Adjust scrollOffset so that selectedIndex is visible within the viewport.
 *
 * Returns the new scrollOffset value.
 */
export declare function adjustScrollOffset<T extends string>(selectedIndex: number, scrollOffset: number, options: SelectOptionItem<T>[], hasCancelOption: boolean, maxOptionLines: number): number;
/**
 * Render the visible portion of the menu with viewport scrolling.
 *
 * Returns rendered lines including hidden-item indicators.
 */
export declare function renderMenuWithViewport<T extends string>(options: SelectOptionItem<T>[], selectedIndex: number, hasCancelOption: boolean, scrollOffset: number, maxOptionLines: number, cancelLabel: string): string[];
//# sourceMappingURL=select-viewport.d.ts.map