/**
 * Compute the maximum number of visible items for a selector list,
 * dynamically based on terminal height.
 *
 * @param overhead - Number of lines consumed by the component's chrome
 *                   (borders, headers, search input, footers, spacers, etc.)
 * @param minVisible - Minimum number of visible items (default: 5)
 * @returns The number of items to show in the scrolling window
 */
export function getMaxVisible(overhead, minVisible = 5) {
    const rows = process.stdout.rows || 24; // fallback to 24 if unavailable
    return Math.max(minVisible, rows - overhead);
}
//# sourceMappingURL=selector-utils.js.map