import { DownloadPermissionService } from '../routes/journeys/download-report/request-download/service.js';
import { BookmarkService } from '../routes/journeys/my-reports/bookmarks/service.js';
import { RequestedReportService } from '../routes/journeys/my-reports/requested-reports/service.js';
import { RecentlyViewedStoreService } from '../routes/journeys/my-reports/recently-viewed/service.js';
import { DefaultFilterValuesService } from '../services/defaultFilterValuesService.js';
import { ReportingService } from '../services/reportingService.js';
import { DashboardService } from '../services/dashboardService.js';
import logger from './logger.js';
import { MissingReportService } from '../services/missingReport/missingReportService.js';
import { ProductCollectionStoreService } from '../services/productCollection/productCollectionStoreService.js';
import { ProductCollectionService } from '../services/productCollection/productCollectionService.js';

/* eslint-disable no-param-reassign */
const createDprServices = (clients, serviceFeatureConfig = {
    bookmarking: false,
    download: false,
    collections: false,
    missingReports: false,
    saveDefaults: false,
    feedbackOnDownload: false,
}) => {
    logger.info('Initialising DPR services...');
    const { reportingClient, dashboardClient, reportDataStore, missingReportClient, productCollectionClient } = clients;
    const services = {
        reportingService: new ReportingService(reportingClient),
        dashboardService: new DashboardService(dashboardClient),
        requestedReportService: new RequestedReportService(reportDataStore),
        recentlyViewedService: new RecentlyViewedStoreService(reportDataStore),
        bookmarkService: new BookmarkService(reportDataStore, serviceFeatureConfig),
        defaultFilterValuesService: new DefaultFilterValuesService(reportDataStore, serviceFeatureConfig),
        productCollectionStoreService: new ProductCollectionStoreService(reportDataStore, serviceFeatureConfig),
        downloadPermissionService: new DownloadPermissionService(reportDataStore, serviceFeatureConfig),
        missingReportService: new MissingReportService(missingReportClient, serviceFeatureConfig),
        productCollectionService: new ProductCollectionService(productCollectionClient, serviceFeatureConfig),
        featureFlagService: clients.featureFlagService,
    };
    return services;
};

export { createDprServices };
//# sourceMappingURL=CreateDprServices.js.map
