import { type Key } from './keys.js'; import { Prompt } from './prompt.js'; import type { Style } from './style.js'; /** One line of free text, with the cursor drawn as reverse video over it. */ export declare class TextPrompt extends Prompt { #private; protected readonly style: Style; readonly title: string; constructor(style: Style, title: string, initial: string); /** An error to show instead of accepting, or `undefined` to accept. */ protected validate(_value: string): string | undefined; /** The line under the field when there is nothing wrong with the value. */ protected hint(): string; frame(width: number): readonly string[]; summary(width: number): string; protected handle(key: Key): void; } /** Yes or no, defaulting to whichever the caller says is safe. */ export declare class ConfirmPrompt extends Prompt { #private; private readonly style; private readonly title; constructor(style: Style, title: string, initial: boolean); frame(width: number): readonly string[]; summary(width: number): string; protected handle(key: Key): void; } export interface SelectItem { readonly value: string; readonly label: string; readonly hint: string; } /** * A multi-select list: space toggles, the arrows move, Enter takes the set. * * The list scrolls rather than being clipped, because eighteen features do not fit * a 24-row terminal alongside anything else. The window offset is the one piece of * state `frame` writes, since only `frame` is told how tall the terminal is. */ export declare class SelectPrompt extends Prompt { #private; protected readonly style: Style; readonly title: string; protected readonly items: readonly SelectItem[]; constructor(style: Style, title: string, items: readonly SelectItem[], initial?: readonly string[]); /** Values the chosen set pulls in without the user having chosen them. */ protected implied(_chosen: ReadonlySet): ReadonlySet; /** Lines between the list and the footer: what came along, what it needs. */ protected notes(_chosen: ReadonlySet): readonly string[]; frame(width: number, height: number): readonly string[]; summary(width: number): string; protected handle(key: Key): void; }