build: switch to NodeNext module resolution
[e-mobility-charging-stations-simulator.git] / src / charging-station / ui-server / ui-services / UIServiceFactory.ts
CommitLineData
a6ef1ece
JB
1import type { AbstractUIService } from './AbstractUIService.js';
2import { UIService001 } from './UIService001.js';
3import { ProtocolVersion } from '../../../types/index.js';
4import type { AbstractUIServer } from '../AbstractUIServer.js';
4198ad5c 5
268a74bb 6export class UIServiceFactory {
4198ad5c
JB
7 private constructor() {
8 // This is intentional
9 }
10
e7aeea18
JB
11 public static getUIServiceImplementation(
12 version: ProtocolVersion,
5edd8ba0 13 uiServer: AbstractUIServer,
551e477c 14 ): AbstractUIService {
4198ad5c
JB
15 switch (version) {
16 case ProtocolVersion['0.0.1']:
675fa8e3 17 return new UIService001(uiServer);
4198ad5c
JB
18 }
19 }
20}