import { getRouteLocals } from '../../../../utils/localsHelper.js';
import { setNestedPath } from '../../../../utils/urlHelper.js';

class MissingReportSubmittedController {
    layoutPath;
    constructor(layoutPath) {
        this.layoutPath = layoutPath;
    }
    GET = async (req, res, next) => {
        const { nestedBaseUrl } = getRouteLocals(res);
        const cataloguePath = setNestedPath('/', nestedBaseUrl);
        const { reportId, variantId, reportName, name } = req.query;
        try {
            res.render(`dpr/routes/journeys/request-missing-report/submitted/view`, {
                title: 'Request submitted',
                report: {
                    reportId,
                    variantId,
                    reportName,
                    name,
                },
                cataloguePath,
                layoutPath: this.layoutPath,
            });
        }
        catch (error) {
            next(error);
        }
    };
}

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