import { CosmosDBManagementClient } from '@azure/arm-cosmosdb' ; import { AzureWizardPromptStep } from 'vscode-azureextensionui' ; import { localize } from '../../../../localize' ; import { promptForResource } from '../../../../utils/azure' ; import { createCosmosDBClient } from '../../../../utils/azureClients' ; import { ICosmosDBWizardContext } from './ICosmosDBWizardContext' ; export class CosmosDBListStep extends AzureWizardPromptStep < ICosmosDBWizardContext > { public async prompt ( context ) { const placeHolder = localize ( 'placeHolder' , 'Select a database account' ) ; const client = await createCosmosDBClient ( context ) ; context . databaseAccount = await promptForResource ( context , placeHolder , client . databaseAccounts . list ( ) ) ; } public shouldPrompt ( context ) { return ! context . databaseAccount ; } }