import { Box, Group, RingProgress, Stack, Text } from "@mantine/core"; import { ArrowRight, CircleDot, Flag, Navigation } from "lucide-react"; import type { LucideIcon } from "lucide-react"; import { statusMeta } from "@/components/trainScheduling/scheduleVisuals"; import { Chip } from "./trackPrimitives"; import { track } from "./trackTheme"; export interface TrackStatValue { icon: LucideIcon; label: string; value: string; } /** * Left-rail identity card: gradient cap (train number, progress ring, status, * current station) over the route strip and the stat list. */ export function TrackStatusCard({ trainNumber, direction, status, progressPct, reached, totalStations, currentStation, stateLine, origin, destination, stats, }: { trainNumber?: string | null; direction?: string | null; status: string; progressPct: number; reached: number; totalStations: number; currentStation: string; stateLine: string; origin: string | null; destination: string | null; stats: TrackStatValue[]; }) { return ( {trainNumber ?? "Train tracking"} Train tracking {direction ? ( {direction} ) : null} {Math.round(progressPct)}% {reached}/{totalStations} stops } /> {status} {stateLine} {currentStation} {origin ?? "—"} {destination ?? "—"} {stats.map((s, i) => { const Icon = s.icon; return ( {s.label} {s.value} ); })} ); }