import React from 'react'; import { InvestigationCase } from '../types/forensics'; import { ShieldAlert, DollarSign, Clock, Globe, FileCheck2, Zap, AlertTriangle } from 'lucide-react'; interface MetricsOverviewProps { cases: InvestigationCase[]; selectedCategory: string; onSelectCategory: (cat: string) => void; } export const MetricsOverview: React.FC = ({ cases, selectedCategory, onSelectCategory, }) => { const totalVolume = cases.reduce((acc, c) => acc + c.financialLedger.totalVolumeUsd, 0); const criticalCount = cases.filter(c => c.threatLevel === 'CRITICAL').length; const tcoCount = cases.filter(c => c.statutoryMatrix.euTcoReg2021_784).length; const bgpAnomalies = cases.filter(c => c.networkTelemetry.bgpAnycast.speedOfLightViolation).length; const gifctCount = cases.filter(c => c.statutoryMatrix.gifctTier !== 'NONE').length; return (
{/* Metric 1: Active Dockets */}
onSelectCategory('ALL')} className={`p-2.5 rounded-lg border transition-all cursor-pointer ${ selectedCategory === 'ALL' ? 'bg-slate-800 border-cyan-500/60 shadow-sm shadow-cyan-500/10' : 'bg-slate-900/80 border-slate-800 hover:border-slate-700' }`} >
Active Dockets
{cases.length} ({criticalCount} Critical)
Counter-Terror & Fraud Queue
{/* Metric 2: Intercepted Illicit Flow */}
onSelectCategory('FINANCIAL_FRAUD')} className={`p-2.5 rounded-lg border transition-all cursor-pointer ${ selectedCategory === 'FINANCIAL_FRAUD' ? 'bg-slate-800 border-emerald-500/60 shadow-sm shadow-emerald-500/10' : 'bg-slate-900/80 border-slate-800 hover:border-slate-700' }`} >
Laundering / Smurfing
${(totalVolume / 1000000).toFixed(1)}M USD
BSA Structuring & Mixers
{/* Metric 3: TCO 1-Hour Removal Trigger */}
onSelectCategory('COUNTER_TERRORISM')} className={`p-2.5 rounded-lg border transition-all cursor-pointer ${ selectedCategory === 'COUNTER_TERRORISM' ? 'bg-slate-800 border-rose-500/60 shadow-sm shadow-rose-500/10' : 'bg-slate-900/80 border-slate-800 hover:border-slate-700' }`} >
EU TCO 1-Hr Mandate
{tcoCount} 1-Hr Active
Reg (EU) 2021/784 Orders
{/* Metric 4: BGP Speed-of-Light Anomalies */}
onSelectCategory('EVASION_NETWORK')} className={`p-2.5 rounded-lg border transition-all cursor-pointer ${ selectedCategory === 'EVASION_NETWORK' ? 'bg-slate-800 border-amber-500/60 shadow-sm shadow-amber-500/10' : 'bg-slate-900/80 border-slate-800 hover:border-slate-700' }`} >
BGP Anycast Overrides
{bgpAnomalies} Proxy Busted
t ≥ 2d/(c·⅔) Physics Check
{/* Metric 5: GIFCT Tier-1 Hashes */}
GIFCT Hash Locks
{gifctCount} Tier 1 & 2
Perceptual Media Sync
); };