import { AlertTriangle, Newspaper, Building2, Users, TrendingUp, X } from 'lucide-react'; import { useGameStore } from '@/store'; import type { ActiveEvent, EventCategory } from '@ai-tycoon/shared'; const CATEGORY_ICONS: Record = { industry: Newspaper, regulatory: Building2, pr: Users, internal: AlertTriangle, market: TrendingUp, }; const CATEGORY_COLORS: Record = { industry: 'border-blue-500/50 bg-blue-500/5', regulatory: 'border-yellow-500/50 bg-yellow-500/5', pr: 'border-purple-500/50 bg-purple-500/5', internal: 'border-orange-500/50 bg-orange-500/5', market: 'border-green-500/50 bg-green-500/5', }; export function EventModal() { const activeEvents = useGameStore((s) => s.events.activeEvents); const resolveEvent = useGameStore((s) => s.resolveEvent); if (activeEvents.length === 0) return null; const event = activeEvents[0]; const Icon = CATEGORY_ICONS[event.category]; return (

{event.title}

{event.category}

{event.description}

{event.choices.map((choice, idx) => ( ))}
); } function ConsequenceTag({ type, value }: { type: string; value: number }) { const isPositive = value > 0; const label = type === 'money' ? `$${Math.abs(value).toLocaleString()}` : type === 'reputation' ? `${Math.abs(value)} rep` : type === 'talent' ? `${Math.abs(value)} talent` : type === 'research_speed' ? `${Math.round(Math.abs(value) * 100)}% R&D` : `${type}: ${value}`; return ( {isPositive ? '+' : '-'}{label} ); }