import React, { useState } from 'react'; import { InvestigationCase } from '../../types/forensics'; import { ShieldAlert, User, Globe, CreditCard, FileText, AlertTriangle, CheckCircle2, Clock, Send, Download, Scale, Zap, Lock, Flame, ArrowRight } from 'lucide-react'; interface OverviewTabProps { currentCase: InvestigationCase; onUpdateStatus: (caseId: string, newStatus: any, actionNote: string) => void; onNavigateToTab: (tabKey: string) => void; } export const OverviewTab: React.FC = ({ currentCase, onUpdateStatus, onNavigateToTab, }) => { const [actionSuccess, setActionSuccess] = useState(null); const handleQuickAction = (actionType: string) => { let newStatus = currentCase.status; let note = ''; if (actionType === 'FREEZE') { newStatus = 'ASSETS_FROZEN'; note = 'Emergency Asset Freeze executed on all linked crypto addresses and merchant gateways.'; } else if (actionType === 'TCO_TAKEDOWN') { newStatus = 'TCO_DISPATCHED'; note = 'EU TCO Regulation (EU) 2021/784 1-Hour mandatory takedown order broadcast to edge CDN.'; } else if (actionType === 'SAR_FILE') { newStatus = 'FLAGGED_SAR'; note = 'Formal FinCEN Suspicious Activity Report (SAR) narrative dispatched to FIU queue.'; } else if (actionType === 'RESOLVE') { newStatus = 'RESOLVED'; note = 'Investigation concluded and disposition recorded in chain-of-custody.'; } onUpdateStatus(currentCase.id, newStatus, note); setActionSuccess(`Action "${actionType}" successfully applied to ${currentCase.id}`); setTimeout(() => setActionSuccess(null), 4000); }; return (
{/* Toast Notification */} {actionSuccess && (
{actionSuccess}
)} {/* Top Banner: Threat Category & Composite Trust Score */}
{/* Executive Summary Card */}
{currentCase.id} {currentCase.category.replace('_', ' ')} {currentCase.threatLevel} THREAT
Status: {currentCase.status}

{currentCase.title}

{currentCase.executiveSummary}

Lead: {currentCase.assignedAnalyst} Created: {currentCase.createdDate} Updated: {currentCase.updatedDate}
{/* Composite Trust Score Gauge */}
Composite Trust Score
{currentCase.compositeTrustScore}/100
Critical Risk Anomaly
BGP Anycast Physics: {currentCase.networkTelemetry.bgpAnycast.speedOfLightViolation ? 'Speed-of-Light Violation' : 'Nominal'}
TLS / Engine Anomaly: {currentCase.networkTelemetry.tlsFingerprint.isKnownEvasionStack ? 'Known Evasion Stack' : 'Clean'}
BSA Structuring: {currentCase.financialLedger.detectedStructuring ? 'Smurfing Detected' : 'None'}
{/* Target Entity Dossier & Key Attributes */}
{/* Entity Card */}
Target Profile & Identity
PRIMARY ALIAS / HANDLE {currentCase.entityTarget.primaryAlias}
{currentCase.entityTarget.legalName && (
LEGAL / SUSPECT PROFILE {currentCase.entityTarget.legalName}
)}
ENTITY TYPE {currentCase.entityTarget.entityType}
{currentCase.entityTarget.associatedEmails.length > 0 && (
ASSOCIATED EMAILS {currentCase.entityTarget.associatedEmails.join(', ')}
)}
{/* Network & Physical Egress Card */}
Network & Geolocation
CLAIMED IP & GEO {currentCase.networkTelemetry.claimedGeo.ip} {currentCase.networkTelemetry.claimedGeo.city}, {currentCase.networkTelemetry.claimedGeo.country}
ASN & INFRASTRUCTURE {currentCase.networkTelemetry.claimedGeo.asn} ({currentCase.networkTelemetry.claimedGeo.isp})
TRUE PHYSICAL TRIANGULATION {currentCase.networkTelemetry.bgpAnycast.physicalOriginInference}
{/* Financial Flow Card */}
Financial & Laundering Rails
TOTAL INTERCEPTED VOLUME ${currentCase.financialLedger.totalVolumeUsd.toLocaleString()} USD
{currentCase.entityTarget.walletAddress && (
PRIMARY WALLET {currentCase.entityTarget.walletAddress}
)}
SANCTIONS & WATCHLISTS 0 ? 'text-rose-400 font-bold' : 'text-slate-400'}> {currentCase.financialLedger.sanctionsHits.join(', ') || 'Clean on initial OFAC query'}
{/* Rapid Action Disposition Bar */}
OPERATIONAL ENFORCEMENT & DISPOSITION WORKFLOW
Chain of Custody ID: {currentCase.id}-CUSTODY
{/* Incident Timeline & Evidence Locker */}
{/* Timeline */}
Forensic Incident Timeline
{currentCase.timeline.length} Events
{currentCase.timeline.map((item, idx) => (
{item.timestamp} {item.actor}

{item.event}

))}
{/* Evidence Locker */}
Evidence Locker & Hashes
{currentCase.evidenceFiles.length} Artifacts
{currentCase.evidenceFiles.map((file) => (
{file.name} {file.fileSize} • {file.fileType}
SHA-256: {file.sha256Hash}
{file.summary} {file.gifctMatch && ( GIFCT MATCH )}
))}
); };