import { Sparkles } from "lucide-react"; import { Badge } from "@/components/ui/badge"; import { formatRelative } from "@/lib/format"; import type { PlaybookApplicationStat } from "@/lib/types"; export function LearningApplicationBadge({ stat, }: { stat: PlaybookApplicationStat | undefined; }) { if (!stat || stat.applied_count === 0) { return ( Never applied ); } const last = formatRelative(stat.last_applied_at); return ( Applied {stat.applied_count}×{stat.last_applied_at ? ` · ${last}` : ""} ); }