import { ServiceBusManagementClient } from '@azure/arm-servicebus' ; import { AzureWizardPromptStep } from 'vscode-azureextensionui' ; import { localize } from '../../../../localize' ; import { promptForResource } from '../../../../utils/azure' ; import { createServiceBusClient } from '../../../../utils/azureClients' ; import { IServiceBusWizardContext } from './IServiceBusWizardContext' ; export class ServiceBusListStep extends AzureWizardPromptStep < IServiceBusWizardContext > { public async prompt ( context ) { const placeHolder = localize ( 'placeHolder' , 'Select a service bus namespace' ) ; const client = await createServiceBusClient ( context ) ; context . sbNamespace = await promptForResource ( context , placeHolder , client . namespaces . list ( ) ) ; } public shouldPrompt ( context ) { return ! context . sbNamespace ; } }