import { useService } from '@cloudbeaver/core-di' ; import type { IDatabaseDataModel } from './DatabaseDataModel/IDatabaseDataModel' ; import { TableViewerStorageService } from './TableViewer/TableViewerStorageService' ; export function useDataModel < T extends IDatabaseDataModel < any , any > > ( modelId ) { const dataViewerTableService = useService ( TableViewerStorageService ) ; return dataViewerTableService . get ( modelId ) ; }