import * as inquirer from "inquirer";
import { IEntryValidator, ValidationResult } from "../ops/i-entry-validator";
export type EntryValue = string | number | boolean;
/** Input object for the available options in a CLI select list.
 * The `name` is what renders in the list,
 * and the `value` is what actually gets returned from the selection. */
export type SelectOption<T> = {
    value: T;
    name: string;
};
/** Return type for fuzzy-select validation callbacks. */
export type BooleanValidationResult = boolean | ValidationResult;
export type choice<T extends EntryValue> = T | {
    name: string;
    value?: T;
};
/** User interaction parameters for capturing a reference to a physical folder. */
export declare class FolderSelectionOptions {
    /** The path under which the user is allowed to navigate (optional: Defaults to the current path).
     * This path is also acts as the parent folder from which any relative path gets derived. */
    root?: string;
    /** The folder to begin the search within (optional: defaults to the current path) */
    startingPath?: string;
    /** Causes the selection to be returned as a path relative to "root" (optional: defaults to false).  */
    asRelative?: boolean;
}
/** User interaction parameters for capturing a reference to a physical file. */
export declare class FileSelectionOptions extends FolderSelectionOptions {
    /** List of file extensions (without the period '.') on which to filter the available files. */
    extensions?: string[];
}
/** Provides direct interaction with the user. */
export interface IUserInputProvider {
    /** Writes a user-facing informational message to the console (stderr), keeping it visible even
     *  when stdout is redirected or piped. Use for prompts, status, warnings — not data output. */
    userMessage(message: string): void;
    /** Writes the final data payload (JSON, YAML, structured text) to stdout so it flows cleanly
     *  through pipes and redirects without user-interaction content mixed in. */
    dataOutput(message: string): void;
    /** @param id Identifies the prompt for internal use, esp in mocking.  This value never renders to the user. */
    prompt<T extends EntryValue>(id: string, prompt: string, required?: boolean, defaultValue?: T, validator?: IEntryValidator<T>): Promise<T | undefined>;
    /** @param id Identifies the prompt for internal use, esp in mocking.  This value never renders to the user. */
    promptPassword(id: string, prompt: string, defaultValue?: string, validator?: IEntryValidator<string>): Promise<string>;
    /**
     * @param id Identifies the prompt for internal use, esp in mocking.  This value never renders to the user.
     * @param loop (optional, defaults to true) Setting to false will disable continuous circular scrolling through the available select choices.
    */
    promptSelect<T extends EntryValue>(id: string, prompt: string, choices: choice<T>[], multiSelect?: boolean, loop?: boolean | undefined): Promise<T | undefined>;
    promptSelect<T extends EntryValue>(id: string, prompt: string, choices: choice<T>[], multiSelect?: boolean, loop?: boolean | undefined, validator?: (input: T, answers?: inquirer.Answers | undefined) => boolean | string): Promise<T | undefined>;
    /**
     * @param id Identifies the prompt for internal use, esp in mocking.  This value never renders to the user.
     * @param loop (optional, defaults to true) Setting to false will disable continuous circular scrolling through the available select choices.
    */
    promptSelectMulti<T extends EntryValue>(id: string, prompt: string, choices: choice<T>[], loop?: boolean | undefined): 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>;
    /**
     * Prompts for a value using fuzzy (autocomplete) search over the available choices.
     * @param id Identifies the prompt for internal use, esp in mocking. This value never renders to the user.
     * @param fetchChoices Async function that returns the list of choices, optionally filtered by the user's search string (for remote search). For client-side filtering pass the full list regardless of the input.
     * @param suggestOnly When true the user may type a free-form value not present in the list (optional, defaults to false).
     * @param defaultValue Pre-selected value shown at the top of the list (optional).
     * @param searchOnRemote When true, `fetchChoices` is called on every keystroke; when false the list is fetched once and filtered client-side (optional, defaults to false).
     * @param validate Optional callback to validate the selected value; return `true` / `false` or a `ValidationResult`.
     */
    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>;
    /** Enables the user to retrieves a reference to a single existing file on the local machine.
     * @param id Identifies the prompt for internal use, esp in mocking.  This value never renders to the user. */
    promptSelectFile(id: string, prompt: string, fileOptions: FileSelectionOptions): Promise<string>;
    /** Enables the user to retrieves a reference to a single existing folder on the local machine.
     * @param id Identifies the prompt for internal use, esp in mocking.  This value never renders to the user. */
    promptSelectFolder(id: string, prompt: string, folderOptions: FolderSelectionOptions): Promise<string>;
    /**
     * @param id Identifies the prompt for internal use, esp in mocking.  This value never renders to the user.
     * @param prompt The message to print for the user.
     * @param defaultValue defaults to TRUE.  */
    promptConfirm(id: string, prompt: string, defaultValue?: boolean): Promise<boolean>;
    /** Opens the given url in a new default browser window.
     * @param url fully-qualified web address to open (including protocol, eg: "http://somewhere.com").
    */
    openUrl(url: string): Promise<void>;
    /** Renders a graphic in the console indicating that an action is processing or waiting.  */
    startSpinner(userMessage: string): void;
    /** Removes the pending indicator in the console.  */
    stopSpinner(userMessage: string): void;
}
