import { Router } from 'express';
import { RequestDownloadController } from './controller.js';
import routes$1 from './submitted/routes.js';
import { schema } from './validation.js';
import { validate } from '../../../../../validation/validate.js';

/* eslint-disable no-param-reassign */
function routes({ layoutPath, services }) {
    const router = Router({ mergeParams: true });
    const controller = new RequestDownloadController(layoutPath, services);
    router.get('/', controller.GET);
    router.post('/', validate(schema), controller.POST);
    router.use('/submitted', routes$1({ layoutPath, services }));
    return router;
}

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