'use strict' ; import * as vscode from 'vscode' ; import * as path from 'path' ; import { BlockchainTreeItem } from './BlockchainTreeItem' ; import { BlockchainExplorerProvider } from '../BlockchainExplorerProvider' ; import { ChannelTreeItem } from './ChannelTreeItem' ; export abstract class InstantiatedTreeItem extends BlockchainTreeItem { iconPath : { light : string ; dark : string ; } = { light : path . join ( __filename , '..' , '..' , '..' , '..' , '..' , 'resources' , 'light' , 'smart-contract.svg' ) , dark : path . join ( __filename , '..' , '..' , '..' , '..' , '..' , 'resources' , 'dark' , 'smart-contract.svg' ) } ; instantiatedChaincode : { name : string ; version : string ; } ; constructor ( provider , public readonly name , public readonly channels , public readonly version , public readonly collapsibleState , public readonly contracts ? , public readonly showIcon ? ) { super ( provider , `${ name }@${ version }` , collapsibleState ) ; this . tooltip = `Instantiated on:` ; for ( let i = 0 ; i < channels . length ; i ++ ) { if ( i === channels . length - 1 ) { this . tooltip += ` ${ channels [ i ] . label }` ; } else { this . tooltip += ` ${ channels [ i ] . label },` ; } } if ( ! showIcon ) { this . iconPath = null ; } } }