'use strict' ; import { BlockchainTreeItem } from './BlockchainTreeItem' ; import { BlockchainExplorerProvider } from '../BlockchainExplorerProvider' ; import * as vscode from 'vscode' ; import * as path from 'path' ; export class ChannelTreeItem extends BlockchainTreeItem { contextValue : string = 'blockchain-channel-item' ; iconPath : { light : string ; dark : string ; } = { light : path . join ( __filename , '..' , '..' , '..' , '..' , '..' , 'resources' , 'light' , 'channel.svg' ) , dark : path . join ( __filename , '..' , '..' , '..' , '..' , '..' , 'resources' , 'dark' , 'channel.svg' ) } ; constructor ( provider , channelName , public readonly peers , public readonly chaincodes , public readonly capability , public readonly collapsibleState ) { super ( provider , channelName , collapsibleState ) ; this . tooltip = `Associated peers:` ; for ( let i = 0 ; i < peers . length ; i ++ ) { if ( i === peers . length - 1 ) { this . tooltip += ` ${ peers [ i ] }` ; } else { this . tooltip += ` ${ peers [ i ] },` ; } } this . tooltip += `\nChannel capabilities: ${ capability }` ; } }