'use strict';

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

var utils = require('../../../../../components/my-reports/utils.js');

class RecentlyViewedReportsListController {
    layoutPath;
    services;
    constructor(layoutPath, services) {
        this.layoutPath = layoutPath;
        this.services = services;
    }
    GET = async (req, res) => {
        const myReportsData = await utils.initMyReports(req, res, this.services);
        const list = myReportsData ? myReportsData.viewed : {};
        res.render(`dpr/routes/journeys/my-reports/view`, {
            title: 'Recently viewed reports',
            id: 'recently-viewed-reports-list',
            layoutPath: this.layoutPath,
            list,
        });
    };
}

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