import { IFlowData } from '@aws-amplify/amplify-cli-shared-interfaces'; import { Validator } from './validators'; export declare const prompter: Prompter; export declare const byValues: (selection: T[], equals?: EqualsFunction) => MultiFilterFunction; export declare const byValue: (selection: T, equals?: EqualsFunction) => SingleFilterFunction; type EqualsFunction = (a: T, b: T) => boolean; type Prompter = { confirmContinue: (message?: string) => Promise; yesOrNo: (message: string, initial?: boolean) => Promise; input: (message: string, ...options: MaybeOptionalInputOptions) => Promise>; pick: (message: string, choices: Choices, ...options: MaybeOptionalPickOptions) => Promise>; setFlowData: (flowData: IFlowData) => void; getTotalPromptElapsedTime: () => number; }; type MaybeAvailableHiddenInputOption = RS extends 'many' ? unknown : { hidden?: boolean; }; type InitialSelectionOption = { initial?: RS extends 'one' ? number | SingleFilterFunction : number[] | MultiFilterFunction; }; type SingleFilterFunction = (arr: T[]) => number | undefined; type MultiFilterFunction = (arr: T[]) => number[]; type InitialValueOption = { initial?: T; }; type MultiSelectMinimum = RS extends 'one' ? unknown : { pickAtLeast?: number; }; type MultiSelectMaximum = RS extends 'one' ? unknown : { pickAtMost?: number; }; type ValidateValueOption = { validate?: Validator; }; type TransformOption = { transform: (value: string) => T | Promise; }; type MaybeOptionalTransformOption = T extends string ? Partial> : TransformOption; type ReturnSizeOption = RS extends 'many' ? { returnSize: 'many'; } : { returnSize?: 'one'; }; type Choices = T extends string ? GenericChoice[] | string[] : GenericChoice[]; type GenericChoice = { name: string; value: T; hint?: string; disabled?: boolean; }; type ReturnSize = 'many' | 'one'; type MaybeOptionalInputOptions = RS extends 'many' ? [InputOptions] : T extends string ? [InputOptions?] : [InputOptions]; type MaybeOptionalPickOptions = RS extends 'many' ? [PickOptions] : [PickOptions?]; type PromptReturn = RS extends 'many' ? T[] : T; type PickOptions = ReturnSizeOption & InitialSelectionOption & MultiSelectMaximum & MultiSelectMinimum; type InputOptions = ReturnSizeOption & ValidateValueOption & InitialValueOption & MaybeOptionalTransformOption & MaybeAvailableHiddenInputOption; export {}; //# sourceMappingURL=prompter.d.ts.map