import { Router } from 'express';
import { ViewAyncReportController } from './controller.js';
import { AsyncController } from '../controller.js';

/* eslint-disable no-param-reassign */
function routes({ layoutPath, services }) {
    const router = Router({ mergeParams: true });
    const asyncReportController = new ViewAyncReportController(layoutPath, services);
    const viewReportController = new AsyncController(layoutPath, services);
    router.get([`/`, `/download-disabled`], asyncReportController.GET);
    router.post('/apply-filters', asyncReportController.applyFilters);
    router.post('/apply-columns', asyncReportController.applyColumns);
    // User defined defaults
    router.post('/save-defaults', viewReportController.saveDefaultFilterValues);
    router.post('/remove-defaults', viewReportController.removeDefaultFilterValues);
    return router;
}

export { routes as default, routes };
//# sourceMappingURL=routes.js.map
