import * as inquirer from 'inquirer';
import { IUserInputProvider, EntryValue, choice, FileSelectionOptions, FolderSelectionOptions, IEntryValidator, SelectOption, BooleanValidationResult } from "../ops";
/** Uses cli-ux and inquirer libraries to retrieve values from the user.
 * Requires a TTY console.
 * @see https://www.npmjs.com/package/inquirer
 */
export declare class BuiltInCliUserInput implements IUserInputProvider {
    constructor();
    /** Inquirer prompt module configured to render its interactive UI on stderr, so it stays
     *  visible in the terminal even when stdout is redirected or piped to a file. */
    private get inquirerPrompt();
    private _inquirerPrompt;
    userMessage(message: string): void;
    /**
     * Writes data payload output to stdout using a synchronous kernel write.
     *
     * `process.stdout.write()` is asynchronous when stdout is a pipe (e.g. `cod ... | jq`):
     * Node queues the data internally and flushes it on the event loop. When the process
     * exits — NATS closes, stdin is destroyed, the event loop drains — any unflushed data
     * is discarded before it reaches the OS pipe buffer, so the consumer (jq, grep, etc.)
     * sees EOF with nothing in it.
     *
     * `fs.writeSync(fd)` bypasses Node's stream layer and calls the kernel `write` syscall
     * directly. The data is in the OS pipe buffer before the call returns, so it survives
     * process exit regardless of event-loop state.
     *
     * Note: `process.stdout.write()` is synchronous when stdout is a file redirect
     * (`> file`), which is why `> myfile.json` works fine without this fix while `| jq` did not.
     *
     * Output is normalized to exactly one trailing newline. Serializers (JSON, YAML) are
     * inconsistent about whether they append one, and omitting it causes the shell prompt
     * to appear on the same line as the last byte of output.
     *
     * EPIPE is caught and silently swallowed. `fs.writeSync` bypasses Node's stream layer,
     * which normally suppresses EPIPE automatically. A broken pipe on stdout just means the
     * consumer finished reading and exited (e.g. `| jq` after receiving the full document) —
     * that is normal, not an error.
     *
     * `setBlocking(true)` on the underlying libuv handle forces stdout into synchronous
     * mode, making `process.stdout.write` block until data is in the OS pipe buffer —
     * eliminating the async data-loss risk without using `fs.writeSync`. This also fixes
     * the MSYS2 (Git Bash) incompatibility, since `process.stdout.write` works correctly
     * through the MSYS2 fd translation layer while `fs.writeSync` does not.
     */
    dataOutput(message: string): void;
    prompt<T extends EntryValue>(id: string, prompt: string, required?: boolean, defaultValue?: T | undefined, validator?: IEntryValidator<T>): Promise<T | undefined>;
    promptPassword(id: string, prompt: string, defaultValue?: string, validator?: IEntryValidator<string>): Promise<string>;
    promptConfirm(id: string, prompt: string, defaultValue?: boolean): Promise<boolean>;
    promptSelect<T extends EntryValue>(id: string, prompt: string, choices: choice<T>[], multiSelect?: boolean | undefined, loop?: boolean | undefined, validator?: (input: T, answers?: inquirer.Answers | undefined) => boolean | string): Promise<T | undefined>;
    promptSelectFuzzy<T>(id: string, prompt: string, fetchChoices: (searchString?: string) => Promise<SelectOption<T>[]>, suggestOnly?: boolean, defaultValue?: T, searchOnRemote?: boolean, validate?: (candidate: T) => BooleanValidationResult): Promise<T | undefined>;
    promptSelectMulti<T extends EntryValue>(id: string, prompt: string, choices: choice<T>[], loop?: boolean | undefined, validator?: (input: T, answers?: inquirer.Answers | undefined) => boolean | string): Promise<T[] | undefined>;
    promptSelectFile(id: string, prompt: string, fileOptions: FileSelectionOptions): Promise<string>;
    promptSelectFolder(id: string, prompt: string, folderOptions: FolderSelectionOptions): Promise<string>;
    openUrl(url: string): Promise<void>;
    startSpinner(userMessage: string): void;
    stopSpinner(userMessage: string): void;
}
