import ServiceLocator, { Services } from './ServiceLocator';
import { getConf } from './configuration';

import StoreService from '../Framework/Services/StoreService';
import UIService from './Services/UIService';
import AsyncService from '../Framework/Services/AsyncService';
import ConfiguratorService from './Services/ConfiguratorService';
import InteractionService from './Services/InteractionService';
import AdminareaCommunicationService from './Services/AdminareaCommunicationService';
import VisualizationService from './Services/VisualizationService';
import DesignDataService from './Services/DesignDataService';
import AnalyticsService from './Services/AnalyticsService';
import DesignerService from './Services/DesignerService';

export const initServices = () => {
    const services = {
        StoreService,
        UIService,
        AsyncService,
        ConfiguratorService,
        InteractionService,
        AdminareaCommunicationService,
        VisualizationService,
        DesignDataService,
        AnalyticsService,
        DesignerService,
        ...getConf('services'),
    };
    ServiceLocator.useServiceMap(services);
    return Services;
};

export default initServices;
