Commit | Line | Data |
---|---|---|
66a7748d JB |
1 | import { ProtocolVersion } from '../../../types/index.js' |
2 | import type { AbstractUIServer } from '../AbstractUIServer.js' | |
4c3f6c20 JB |
3 | import type { AbstractUIService } from './AbstractUIService.js' |
4 | import { UIService001 } from './UIService001.js' | |
4198ad5c | 5 | |
66a7748d | 6 | // eslint-disable-next-line @typescript-eslint/no-extraneous-class |
268a74bb | 7 | export class UIServiceFactory { |
66a7748d | 8 | private constructor () { |
4198ad5c JB |
9 | // This is intentional |
10 | } | |
11 | ||
66a7748d | 12 | public static getUIServiceImplementation ( |
e7aeea18 | 13 | version: ProtocolVersion, |
66a7748d | 14 | uiServer: AbstractUIServer |
551e477c | 15 | ): AbstractUIService { |
4198ad5c JB |
16 | switch (version) { |
17 | case ProtocolVersion['0.0.1']: | |
66a7748d | 18 | return new UIService001(uiServer) |
4198ad5c JB |
19 | } |
20 | } | |
21 | } |