'use strict';

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

var express = require('express');
var controller = require('./controller.js');
var validateFilters = require('../../../../../validation/validateFilters.js');
var loadReportDefinition = require('../../../../../middleware/loadReportDefinition.js');

/* eslint-disable no-param-reassign */
function routes({ layoutPath, services }) {
    const router = express.Router({ mergeParams: true });
    const controller$1 = new controller.ViewAsyncDashboardController(layoutPath, services);
    router.get(`/`, controller$1.GET);
    router.post('/apply-filters', loadReportDefinition.loadReportDefinition(services), validateFilters.validateFilters({ interactive: true }), controller$1.applyFilters);
    router.post('/reset-filters', controller$1.resetFilters);
    return router;
}

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