'use strict';

var service = require('../routes/journeys/download-report/request-download/service.js');
var service$1 = require('../routes/journeys/my-reports/bookmarks/service.js');
var service$3 = require('../routes/journeys/my-reports/requested-reports/service.js');
var service$2 = require('../routes/journeys/my-reports/recently-viewed/service.js');
var defaultFilterValuesService = require('../services/defaultFilterValuesService.js');
var reportingService = require('../services/reportingService.js');
var dashboardService = require('../services/dashboardService.js');
var logger = require('./logger.js');
var missingReportService = require('../services/missingReport/missingReportService.js');
var productCollectionStoreService = require('../services/productCollection/productCollectionStoreService.js');
var productCollectionService = require('../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.default.info('Initialising DPR services...');
    const { reportingClient, dashboardClient, reportDataStore, missingReportClient, productCollectionClient } = clients;
    const services = {
        reportingService: new reportingService.ReportingService(reportingClient),
        dashboardService: new dashboardService.DashboardService(dashboardClient),
        requestedReportService: new service$3.RequestedReportService(reportDataStore),
        recentlyViewedService: new service$2.RecentlyViewedStoreService(reportDataStore),
        bookmarkService: new service$1.BookmarkService(reportDataStore, serviceFeatureConfig),
        defaultFilterValuesService: new defaultFilterValuesService.DefaultFilterValuesService(reportDataStore, serviceFeatureConfig),
        productCollectionStoreService: new productCollectionStoreService.ProductCollectionStoreService(reportDataStore, serviceFeatureConfig),
        downloadPermissionService: new service.DownloadPermissionService(reportDataStore, serviceFeatureConfig),
        missingReportService: new missingReportService.MissingReportService(missingReportClient, serviceFeatureConfig),
        productCollectionService: new productCollectionService.ProductCollectionService(productCollectionClient, serviceFeatureConfig),
        featureFlagService: clients.featureFlagService,
    };
    return services;
};

exports.createDprServices = createDprServices;
//# sourceMappingURL=CreateDprServices.js.map
