'use strict';

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

var localsHelper = require('../../../../utils/localsHelper.js');
var urlHelper = require('../../../../utils/urlHelper.js');

class MissingReportSubmittedController {
    layoutPath;
    constructor(layoutPath) {
        this.layoutPath = layoutPath;
    }
    GET = async (req, res, next) => {
        const { nestedBaseUrl } = localsHelper.getRouteLocals(res);
        const cataloguePath = urlHelper.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);
        }
    };
}

exports.MissingReportSubmittedController = MissingReportSubmittedController;
exports.default = MissingReportSubmittedController;
//# sourceMappingURL=controller.js.map
