namespace Spectre.Console;
///
/// Represents a strategy for a list prompt.
///
/// The list data type.
internal interface IListPromptStrategy
where T : notnull
{
///
/// Handles any input received from the user.
///
/// The key that was pressed.
/// The current state.
/// A result representing an action.
ListPromptInputResult HandleInput(ConsoleKeyInfo key, ListPromptState state);
///
/// Calculates the page size.
///
/// The console.
/// The total number of items.
/// The requested number of items to show.
/// The page size that should be used.
public int CalculatePageSize(IAnsiConsole console, int totalItemCount, int requestedPageSize);
///
/// Builds a from the current state.
///
/// The console.
/// Whether or not the list is scrollable.
/// The cursor index.
/// The visible items.
/// A value indicating whether or not the prompt should skip unselectable items.
/// The search text.
/// A representing the items.
public IRenderable Render(IAnsiConsole console, bool scrollable, int cursorIndex,
IEnumerable<(int Index, ListPromptItem Node)> items, bool skipUnselectableItems, string searchText);
}