'use strict' ; import { BlockchainTreeItem } from './BlockchainTreeItem' ; import * as vscode from 'vscode' ; import { BlockchainExplorerProvider } from '../BlockchainExplorerProvider' ; import * as path from 'path' ; import { FabricRuntimeUtil , FabricGatewayRegistryEntry } from 'ibm-blockchain-platform-common' ; export class ConnectedTreeItem extends BlockchainTreeItem { contextValue : string = 'blockchain-connected-item' ; iconPath : { light : string ; dark : string ; } = { light : path . join ( __filename , '..' , '..' , '..' , '..' , '..' , 'resources' , 'light' , 'channel.svg' ) , dark : path . join ( __filename , '..' , '..' , '..' , '..' , '..' , 'resources' , 'dark' , 'channel.svg' ) } ; constructor ( provider , public readonly label , public readonly connection , public readonly collapsibleState ) { super ( provider , label , collapsibleState ) ; if ( connection . name && connection . name . includes ( `${ FabricRuntimeUtil . LOCAL_FABRIC } - ` ) ) { this . contextValue = 'blockchain-connected-runtime-item' ; } if ( label . includes ( 'Connected via gateway' ) || label . includes ( 'Using ID' ) ) { this . iconPath = null ; } } }