'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var express = require('express');
var controller = require('./controller.js');
var controller$1 = require('../controller.js');

/* eslint-disable no-param-reassign */
function routes({ layoutPath, services }) {
    const router = express.Router({ mergeParams: true });
    const asyncReportController = new controller.ViewAyncReportController(layoutPath, services);
    const viewReportController = new controller$1.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;
}

exports.default = routes;
exports.routes = routes;
//# sourceMappingURL=routes.js.map
