import { window } from 'vscode' ; import { ParsedSite } from 'vscode-azureappservice' ; import { IActionContext } from 'vscode-azureextensionui' ; import { viewOutput } from '../../constants' ; import { ext } from '../../extensionVariables' ; import { localize } from '../../localize' ; export interface ISiteCreatedOptions extends IActionContext { showCreatedNotification ? : boolean ; } export function showSiteCreated ( site , context ) { const message = site . isSlot ? localize ( 'createdNewSlot' , 'Successfully created slot "{0}": {1}' , site . slotName , site . defaultHostUrl ) : localize ( 'createdNewApp' , 'Successfully created function app "{0}": {1}' , site . fullName , site . defaultHostUrl ) ; ext . outputChannel . appendLog ( message ) ; if ( context . showCreatedNotification ) { void window . showInformationMessage ( message , viewOutput ) . then ( result => { if ( result === viewOutput ) { ext . outputChannel . show ( ) ; } } ) ; } }