import { DialogValues, InputAction, InputBase, InputBaseOptions } from ".."; import * as vscode from "vscode"; /** * Namespace for any input box. */ export declare namespace InputBox { /** * Base Type for the options. This removes {@link vscode.InputBoxOptions.title | title}, * because it will be set by the multi-step-input and should be the same. */ type BaseInputBoxOptions = Omit; /** * Type that requires the {@link vscode.InputBoxOptions.placeHolder | placeHolder} from the {@link vscode.InputBoxOptions}, * in order to require a placeHolder input for every input box. */ type RequiredInputBoxOptions = BaseInputBoxOptions & { placeHolder: NonNullable; }; /** * The options for the input box. */ export interface InputBoxOptions extends InputBaseOptions { /** * Any vscode options for the input box. */ readonly inputBoxOptions: RequiredInputBoxOptions; /** * Any custom button that should be added. */ readonly customButton?: CustomButton; } /** * The custom button that should be added. */ interface CustomButton { /** * The button as it should appear in the input. */ readonly button: vscode.QuickInputButton; /** * The action that should be triggered when the button was pressed. */ readonly action: () => void; } export {}; } /** * Input for any free text. */ export declare class InputBox extends InputBase { /** * @override */ showDialog(currentResults: DialogValues, title: string, showBackButton: boolean): Promise; /** * Validates the input and sets the validation message. * * @param options - the options of the input box * @param text - the currently given text * @param inputBox - the input box */ private validateInput; }