import { Router } from 'express';
import routes$1 from './report/routes.js';
import routes$2 from './dashboard/routes.js';
import reportAuthoriser from '../../../../middleware/reportAuthoriser.js';
import { AsyncController } from './controller.js';

/* eslint-disable no-param-reassign */
function routes({ layoutPath, services }) {
    const router = Router({ mergeParams: true });
    const controller = new AsyncController(layoutPath, services);
    // Expired check
    router.post(['/report', '/dashboard'], controller.POST);
    router.use('/report', reportAuthoriser(services, layoutPath), routes$1({ layoutPath, services }));
    router.use('/dashboard', reportAuthoriser(services, layoutPath), routes$2({ layoutPath, services }));
    return router;
}

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