import { initMyReports } from '../../../../../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 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,
        });
    };
}

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