'use strict';

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

var utils$1 = require('../../../../../components/user-reports/requested/utils.js');
var utils = require('../../../../../components/user-reports/utils.js');
var localsHelper = require('../../../../../utils/localsHelper.js');

class RequestedReportsListController {
    layoutPath;
    services;
    constructor(layoutPath, services) {
        this.layoutPath = layoutPath;
        this.services = services;
    }
    GET = async (_req, res) => {
        const { requestedReports } = localsHelper.default.getValues(res);
        const listParams = await utils.default.renderList({
            reportsData: requestedReports,
            filterFunction: utils$1.default.filterReports,
            res,
            type: 'requested',
        });
        res.render(`dpr/routes/journeys/my-reports/view`, {
            title: 'Requested reports',
            id: 'requested-reports-list',
            layoutPath: this.layoutPath,
            ...listParams,
        });
    };
}

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