import { BindingSettingValue } from "../../../funcConfig/function" ; import { localize } from "../../../localize" ; import { IBindingWizardContext } from "../IBindingWizardContext" ; import { BindingSettingStepBase } from "./BindingSettingStepBase" ; export class StringPromptStep extends BindingSettingStepBase { public async promptCore ( context ) { return await context . ui . showInputBox ( { placeHolder : this . _setting . label , prompt : this . _setting . description || localize ( 'stringSettingPrompt' , 'Provide a \'{0}\'' , this . _setting . label ) , validateInput : async ( s ) : Promise < string | undefined > => await this . validateInput ( context , s ) , value : await this . getDefaultValue ( context ) } ) ; } public async getDefaultValue ( _wizardContext ) { return this . _setting === undefined ? undefined : String ( this . _setting . defaultValue ) ; } public async validateInput ( _wizardContext , val ) { return this . _setting . validateSetting ( val ) ; } }