import type { ITab } from '@cloudbeaver/core-ui' ; import { Entity , isConstructor , ITypedConstructor , MixinProvider } from '@cloudbeaver/core-di' ; import { TabToken } from './TabToken' ; import { TabViewModel } from './TabViewModel' ; export class TabEntity extends Entity { constructor ( tab , providers = [ ] ) { super ( providers , isConstructor ( tab ) ? undefined : tab . tabId ) ; this . addMixin ( TabToken , tab ) ; this . addMixin ( TabViewModel ) ; } getViewModel ( ) { return this . getMixin ( TabViewModel ) ; } getTabModel ( ) { return this . getMixin ( TabToken ) ; } }