import { AzureWizardPromptStep , IAzureQuickPickItem } from 'vscode-azureextensionui' ; import { localize } from '../localize' ; import { getWebsiteOSDisplayName , WebsiteOS } from './AppKind' ; import { IAppServiceWizardContext } from './IAppServiceWizardContext' ; import { setLocationsTask } from './setLocationsTask' ; export class SiteOSStep extends AzureWizardPromptStep < IAppServiceWizardContext > { public async prompt ( context ) { const picks = Object . keys ( WebsiteOS ) . map ( ( key ) => { const os = < WebsiteOS > WebsiteOS [ key ] ; return { label : getWebsiteOSDisplayName ( os ) , description : '' , data : os } ; } ) ; context . newSiteOS = ( await context . ui . showQuickPick ( picks , { placeHolder : localize ( 'selectOS' , 'Select an OS.' ) } ) ) . data ; await setLocationsTask ( context ) ; } public shouldPrompt ( context ) { return context . newSiteOS === undefined ; } }