// Atlas ยท Step 6 โ Final delivery (real export files from /api/export) function StepDelivery({ state, reportId, files, user, goBack, goRestart, goHome }) { const formatId = state.format || "pdf"; const allFiles = (files && files.length > 0) ? files.map((f) => ({ ext: f.format, name: f.filename, size: f.size, primary: f.format === formatId, downloadUrl: f.downloadUrl, error: f.error, })).sort((a, b) => b.primary - a.primary) : [{ ext: formatId, name: `${reportId || "report"}.${formatId}`, size: "โ", primary: true }]; const today = new Date().toLocaleDateString("en-US", { year: "numeric", month: "short", day: "numeric" }); return (