import type { Element } from "./elements.js";
export type ScrollListOpts<T> = {
    items: ReadonlyArray<T>;
    cursorIdx: number;
    scrollTop: number;
    viewportRows: number;
    renderItem: (item: T, isCursor: boolean) => Element;
};
export type ScrollListResult = {
    element: Element;
    scrollTop: number;
};
/**
 * Render a list of items into a scrollable, cursor-aware column.
 *
 * `scrollList` owns the boilerplate that every list-style TUI screen
 * has rewritten by hand: clamp `scrollTop` to a valid range, follow
 * the cursor if it has moved out of the viewport, slice the visible
 * window, and wrap the rendered items in a `flex-start` column so
 * they don't stretch.
 *
 * It is intentionally a pure builder, not a stateful component:
 * callers pass the cursor and scroll position in, get the new
 * scroll position back, and store both in whatever state shape they
 * want. Cursor styling, item rendering, and key handling all live
 * with the caller.
 */
export declare function scrollList<T>(opts: ScrollListOpts<T>): ScrollListResult;
