import { useState } from 'react'; import { motion } from 'framer-motion'; import { ArrowLeft, Download, RotateCcw, Loader2, CheckCircle2 } from 'lucide-react'; import MediaPanel from './MediaPanel'; import VerdictCard from './VerdictCard'; import TemporalTimeline from './TemporalTimeline'; import TechnicalMetadata from './TechnicalMetadata'; import AssessmentPanels from './AssessmentPanels'; import { downloadReport } from '../utils/generateReport'; import styles from './ForensicDashboard.module.css'; export default function ForensicDashboard({ result, previewUrl, onReset }) { const isVideo = result.type === 'video'; const [exportState, setExportState] = useState('idle'); // idle | loading | done const handleExport = async () => { if (exportState !== 'idle') return; setExportState('loading'); // Brief tick to let the UI update before the sync blob work await new Promise(r => setTimeout(r, 80)); try { downloadReport(result, previewUrl); } catch (e) { console.error('Export failed:', e); } setExportState('done'); setTimeout(() => setExportState('idle'), 2800); }; return ( {/* Top bar */}
Dashboard / {result.filename}
{/* Main split layout */}
{/* Left: Media + timeline + metadata */}
{isVideo && result.timeline && ( )} {(result.neurosymbolic || result.ethical) && ( )}
{/* Right: Verdict */}
); }