import { ConnectionsManagerService } from '@cloudbeaver/core-connections' ; import { Bootstrap , injectable } from '@cloudbeaver/core-di' ; import { EMainMenu , MainMenuService } from '../../TopNavBar/MainMenu/MainMenuService' ; @ injectable ( ) export class ConnectionDialogsService extends Bootstrap { constructor ( private readonly mainMenuService , private readonly connectionsManagerService ) { super ( ) ; } register ( ) { this . mainMenuService . registerMenuItem ( EMainMenu . mainMenuConnectionsPanel , { id : 'mainMenuDisconnect' , order : 3 , title : 'app_shared_connectionMenu_disconnect' , onClick : ( ) => this . connectionsManagerService . closeAllConnections ( ) , isDisabled : ( ) => ! this . connectionsManagerService . hasAnyConnection ( true ) , } ) ; } load ( ) { } }