import { ParsedSite } from 'vscode-azureappservice' ; import { AzExtTreeItem , IActionContext } from 'vscode-azureextensionui' ; import { SlotsTreeItem } from './SlotsTreeItem' ; import { SlotTreeItem } from './SlotTreeItem' ; import { SlotTreeItemBase } from './SlotTreeItemBase' ; import { SubscriptionTreeItem } from './SubscriptionTreeItem' ; export class ProductionSlotTreeItem extends SlotTreeItemBase { public static contextValue : string = 'azFuncProductionSlot' ; public readonly contextValue : string = ProductionSlotTreeItem . contextValue ; private readonly _slotsTreeItem : SlotsTreeItem ; public constructor ( parent , site ) { super ( parent , site ) ; this . _slotsTreeItem = new SlotsTreeItem ( this ) ; } public get label ( ) : string { return this . site . fullName ; } public async loadMoreChildrenImpl ( clearCache , context ) { const children = await super . loadMoreChildrenImpl ( clearCache , context ) ; children . push ( this . _slotsTreeItem ) ; return children ; } public async pickTreeItemImpl ( expectedContextValues ) { for ( const expectedContextValue of expectedContextValues ) { switch ( expectedContextValue ) { case SlotsTreeItem . contextValue : case SlotTreeItem . contextValue : return this . _slotsTreeItem ; default : } } return super . pickTreeItemImpl ( expectedContextValues ) ; } }