'use strict' ; import * as vscode from 'vscode' ; import * as path from 'path' ; import { FabricEnvironmentRegistryEntry , FabricEnvironmentRegistry , EnvironmentType } from 'ibm-blockchain-platform-common' ; export class ExplorerUtil { public static async getGroupIcon ( environmentName ) { let iconName ; const environmentEntry = await FabricEnvironmentRegistry . instance ( ) . get ( environmentName ) ; if ( environmentEntry . environmentType === EnvironmentType . LOCAL_MICROFAB_ENVIRONMENT ) { iconName = 'laptop.svg' ; } else if ( environmentEntry . environmentType === EnvironmentType . OPS_TOOLS_ENVIRONMENT || environmentEntry . environmentType === EnvironmentType . SAAS_OPS_TOOLS_ENVIRONMENT ) { iconName = 'ibm-cloud.svg' ; } else { iconName = 'network--3.svg' ; } return { light : path . join ( __filename , '..' , '..' , '..' , '..' , 'resources' , 'light' , `${ iconName }` ) , dark : path . join ( __filename , '..' , '..' , '..' , '..' , 'resources' , 'dark' , `${ iconName }` ) } ; } }