"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRecentDownloadExecutor = void 0;
exports.getRecentDownloadExecutor = {
    needsFind: () => false,
    getStepType: () => 'get-recent-download',
    execute: (_payload, _stateProvider, eventHandler, logger) => {
        const recentDownload = eventHandler.getRecentDownload?.();
        if (!recentDownload) {
            logger.info('get_recent_download: No download detected');
            return Promise.resolve({
                success: true,
                message: 'No download has been detected yet.',
            });
        }
        logger.info(`get_recent_download: ${recentDownload.file_name} (${recentDownload.file_mime_type}, ${recentDownload.file_size_bytes} bytes)`);
        return Promise.resolve({
            success: true,
            successDetail: {
                file_name: recentDownload.file_name,
                file_mime_type: recentDownload.file_mime_type,
                file_size_bytes: recentDownload.file_size_bytes,
            },
        });
    },
};
