'use client'; import Link from 'next/link'; import { ConfidenceBadge, CountryChip, EventTypeBadge, ImportanceMeter } from '@/components/ui/badges'; import { LiveAgo } from '@/components/ui/live'; import { cn } from '@/lib/cn'; import { eventStyle } from '@/lib/event-styles'; import { fmtTime, truncate } from '@/lib/format'; import { routes } from '@/lib/site'; import type { Event } from '@/lib/types'; import { useEventDrawer } from './event-drawer-context'; /** * Dense feed row: hue bar · type chip · title (opens the evidence drawer) · company · importance · confidence · time. * `variant="feed"` is the live feed (fresh rows animate); `"table"` is the events list; `"timeline"` hides the company. */ export function EventRow({ event, fresh = false, selected = false, variant = 'feed', showCompany = true, className, id }: { event: Event; fresh?: boolean; selected?: boolean; variant?: 'feed' | 'table' | 'timeline'; showCompany?: boolean; className?: string; id?: string }) { const { open } = useEventDrawer(); const s = eventStyle(event.event_type); const retracted = event.status === 'retracted'; return (
{truncate(event.summary, 200)}
}{emptyLabel}
; return (