import { useService } from '@cloudbeaver/core-di' ; import type { IView } from './IView' ; import { ViewService } from './ViewService' ; export function useActiveView < T > ( view ) { const activeViewService = useService ( ViewService ) ; function focusView ( ) { activeViewService . setView ( view ) ; } function blurView ( ) { activeViewService . blur ( view ) ; } return [ focusView , blurView ] ; }