import { useService } from '@cloudbeaver/core-di' ; import { NavigationTabsService } from '../../NavigationTabsService' ; export function useTabHandler ( handlerId ) { const navigationTabs = useService ( NavigationTabsService ) ; const handler = navigationTabs . getTabHandler ( handlerId ) ; if ( ! handler ) { throw new Error ( `Tab Handler ${ handlerId } not found` ) ; } return handler ; }