import { prompt } from './prompt.js'; type ConfirmCommandOptions = { abortedMessage?: string; comparison: string; confirmation?: string; promptFunction?: typeof prompt; warningMessage?: string; }; /** * @description Prompts the user to confirm a destructive action by typing a comparison string, or validates a * pre-provided confirmation. * @param options - Configuration options for the confirmation command. * @param options.abortedMessage - Custom message to display when the action is aborted (default: 'Aborted.'). * @param options.comparison - The string that must be entered to confirm the action (required). Typically the app name, * but can be other identifiers like a Private Space name. * @param options.confirmation - Pre-provided confirmation string to validate without prompting (optional). If provided * and matches comparison, returns immediately without prompting. * @param options.promptFunction - Function to use for prompting (default: prompt, used for dependency injection in tests). * @param options.warningMessage - Custom warning message to display before prompting (optional). Default message assumes * comparison is an app name. Provide a custom message if using a different identifier. * @returns Promise that resolves if confirmation matches, or throws an error if it doesn't. * @throws {Error} When confirmation doesn't match the comparison string. * @example * // Interactive prompt * await confirmCommand({comparison: 'my-app'}) * * // Pre-provided confirmation (no prompt) * await confirmCommand({comparison: 'my-app', confirmation: 'my-app'}) * * // Custom messages * await confirmCommand({ * comparison: 'my-app', * warningMessage: 'This will delete your database', * abortedMessage: 'Database deletion cancelled.' * }) */ export declare function confirmCommand({ abortedMessage, comparison, confirmation, promptFunction, warningMessage, }: ConfirmCommandOptions): Promise; export {};