import type { Priority } from '../types/index.js'; /** * Custom error class for user cancellation */ export declare class UserCancelledError extends Error { constructor(); } /** * Confirm prompt with y/n format * * Displays a prompt asking the user to confirm with y (yes) or n (no). * Input is case-insensitive and whitespace is trimmed. Invalid input * shows an error message and re-prompts immediately. * * @param message - The question to ask the user * @param defaultValue - Default answer (true for y, false for n) * @returns Promise - true if user enters 'y', false if user enters 'n' * @throws UserCancelledError - If user presses Ctrl+C * * @example * const confirmed = await confirm("Proceed with merge?", false); * // Displays: ? Proceed with merge? (y/n) ‣ n * // Initial value shown: n (based on defaultValue = false) * // User can enter: y, n, Y, N (case-insensitive) * // Pressing Enter uses the default value * // Invalid input (e.g., "yes", "true") shows error and re-prompts */ export declare function confirm(message: string, defaultValue?: boolean): Promise; /** * Text input prompt */ export declare function input(message: string, defaultValue?: string): Promise; /** * Select from list prompt */ export declare function select(message: string, choices: T[], defaultValue?: T): Promise; /** * Multi-select from list prompt */ export declare function multiSelect(message: string, choices: T[] | Array<{ name: string; value: T; }>): Promise; /** * Select priority level */ export declare function selectPriority(message: string, priorities: { name: Priority; emoji: string; }[]): Promise; /** * Select from list with search */ export declare function searchSelect(message: string, choices: Array<{ name: string; value: T; }>): Promise; /** * Number input prompt */ export declare function numberInput(message: string, defaultValue?: number): Promise; /** * Editor prompt for multi-line text */ export declare function editor(message: string, defaultValue?: string): Promise; /** * Toggle prompt for boolean values (enquirer-specific) */ export declare function toggle(message: string, defaultValue?: boolean): Promise; /** * Form prompt for multiple fields at once (enquirer-specific) * Validates all fields after submission and re-prompts if any are invalid */ export declare function form>(message: string, choices: Array<{ name: string; message: string; initial?: string; validate?: (value: string) => boolean | string; }>): Promise; //# sourceMappingURL=prompts.d.ts.map