/**
 * @file User prompt utilities for interactive scripts. Provides inquirer.js
 *   integration with spinner support, context handling, and theming.
 */
import checkboxRaw from '../external/@inquirer/checkbox';
import confirmRaw from '../external/@inquirer/confirm';
import inputRaw from '../external/@inquirer/input';
import passwordRaw from '../external/@inquirer/password';
import type { ColorValue } from '../colors/types';
import { type ThemeName } from '../themes/themes';
import type { Theme } from '../themes/types';
declare const searchRaw: any;
declare const selectRaw: any;
declare const ActualSeparator: any;
/**
 * Choice option for select and search prompts.
 *
 * @template Value - Type of the choice value.
 */
export interface Choice<Value = unknown> {
    /**
     * The value returned when this choice is selected.
     */
    value: Value;
    /**
     * Display name for the choice (defaults to value.toString())
     */
    name?: string | undefined;
    /**
     * Additional description text shown below the choice.
     */
    description?: string | undefined;
    /**
     * Short text shown after selection (defaults to name)
     */
    short?: string | undefined;
    /**
     * Whether this choice is disabled, or a reason string.
     */
    disabled?: boolean | string | undefined;
}
/**
 * Context for inquirer prompts. Minimal context interface used by Inquirer
 * prompts. Duplicated from `@inquirer/type` - InquirerContext.
 */
interface InquirerContext {
    /**
     * Abort signal for cancelling the prompt.
     */
    signal?: AbortSignal | undefined;
    /**
     * Input stream (defaults to process.stdin)
     */
    input?: NodeJS.ReadableStream | undefined;
    /**
     * Output stream (defaults to process.stdout)
     */
    output?: NodeJS.WritableStream | undefined;
    /**
     * Clear the prompt from terminal when done.
     */
    clearPromptOnDone?: boolean | undefined;
}
/**
 * Extended context with spinner support. Allows passing a spinner instance to
 * be managed during prompts.
 */
export type Context = import('../objects/types').Remap<InquirerContext & {
    /**
     * Optional spinner to stop/start during prompt display.
     */
    spinner?: import('../spinner/types').SpinnerInstance | undefined;
}>;
/**
 * Separator for visual grouping in select/checkbox prompts. Creates a
 * non-selectable visual separator line. Duplicated from `@inquirer/select` -
 * Separator. This type definition ensures the Separator type is available in
 * published packages.
 *
 * @example
 *   import { Separator } from './prompts'
 *
 *   const choices = [
 *     { name: 'Option 1', value: 1 },
 *     new Separator(),
 *     { name: 'Option 2', value: 2 },
 *   ]
 */
declare class SeparatorType {
    readonly separator: string;
    readonly type: 'separator';
    constructor(separator?: string);
}
export type Separator = SeparatorType;
/**
 * Apply a color to text using yoctocolors. Handles both named colors and RGB
 * tuples.
 *
 * @private
 */
export declare function applyColor(text: string, color: ColorValue): string;
/**
 * Convert Socket theme to @inquirer theme format. Maps our theme colors to
 * inquirer's style functions. Handles theme names, Theme objects, and passes
 * through @inquirer themes.
 *
 * @example
 *   ;```ts
 *   // Socket theme name
 *   createInquirerTheme('sunset')
 *
 *   // Socket Theme object
 *   createInquirerTheme(SUNSET_THEME)
 *
 *   // @inquirer theme (passes through)
 *   createInquirerTheme({ style: {...}, icon: {...} })
 *   ```
 *
 * @param theme - Socket theme name, Theme object, or @inquirer theme.
 *
 * @returns @inquirer theme object
 */
export declare function createInquirerTheme(theme: Theme | ThemeName | unknown): Record<string, unknown>;
/**
 * Create a separator for select prompts. Creates a visual separator line in
 * choice lists.
 *
 * @example
 *   import { select, createSeparator } from '@socketsecurity/lib/stdio/prompts'
 *
 *   const choice = await select({
 *     message: 'Choose an option:',
 *     choices: [
 *       { name: 'Option 1', value: 1 },
 *       createSeparator(),
 *       { name: 'Option 2', value: 2 },
 *     ],
 *   })
 *
 * @param text - Optional separator text (defaults to '───────')
 *
 * @returns Separator instance
 */
export declare function createSeparator(text?: string): InstanceType<typeof ActualSeparator>;
/**
 * Check if value is a Socket Theme object.
 *
 * @param value - Value to check.
 *
 * @returns True if value is a Socket Theme
 */
export declare function isSocketTheme(value: unknown): value is Theme;
/**
 * Resolve theme name or object to Theme.
 *
 * @param theme - Theme name or object.
 *
 * @returns Resolved Theme
 */
export declare function resolveTheme(theme: Theme | ThemeName): Theme;
/**
 * Wrap an inquirer prompt with spinner handling, theme injection, and signal
 * injection. Automatically stops/starts spinners during prompt display, injects
 * the current theme, and injects abort signals. Trims string results and
 * handles cancellation gracefully.
 *
 * @example
 *   const myPrompt = wrapPrompt(rawInquirerPrompt)
 *   const result = await myPrompt({ message: 'Enter name:' })
 *
 * @template T - Type of the prompt result.
 *
 * @param inquirerPrompt - The inquirer prompt function to wrap.
 *
 * @returns Wrapped prompt function with spinner, theme, and signal handling
 */
export declare function wrapPrompt<T = unknown>(inquirerPrompt: (...args: unknown[]) => Promise<T>): (...args: unknown[]) => Promise<T | undefined>;
/**
 * Prompt to select multiple items from a list of choices. Wrapped with spinner
 * handling and abort signal support.
 *
 * @example
 *   const choices = await checkbox({
 *     message: 'Select options:',
 *     choices: [
 *       { name: 'Option 1', value: 'opt1' },
 *       { name: 'Option 2', value: 'opt2' },
 *       { name: 'Option 3', value: 'opt3' },
 *     ],
 *   })
 */
export declare const checkbox: typeof checkboxRaw;
/**
 * Prompt for a yes/no confirmation. Wrapped with spinner handling and abort
 * signal support.
 *
 * @example
 *   const answer = await confirm({ message: 'Continue?' })
 *   if (answer) { // user confirmed }
 */
export declare const confirm: typeof confirmRaw;
/**
 * Prompt for text input. Wrapped with spinner handling and abort signal
 * support. Result is automatically trimmed.
 *
 * @example
 *   const name = await input({ message: 'Enter your name:' })
 */
export declare const input: typeof inputRaw;
/**
 * Prompt for password input (hidden characters). Wrapped with spinner handling
 * and abort signal support.
 *
 * @example
 *   const token = await password({ message: 'Enter API token:' })
 */
export declare const password: typeof passwordRaw;
/**
 * Prompt with searchable/filterable choices. Wrapped with spinner handling and
 * abort signal support.
 *
 * @example
 *   const result = await search({
 *     message: 'Select a package:',
 *     source: async input => fetchPackages(input),
 *   })
 */
export declare const search: typeof searchRaw;
/**
 * Prompt to select from a list of choices. Wrapped with spinner handling and
 * abort signal support.
 *
 * @example
 *   const choice = await select({
 *     message: 'Choose an option:',
 *     choices: [
 *       { name: 'Option 1', value: 'opt1' },
 *       { name: 'Option 2', value: 'opt2' },
 *     ],
 *   })
 */
export declare const select: typeof selectRaw;
export { ActualSeparator as Separator };
