import Link from "next/link" import { CalendarDays, ChevronRight, Flag, MapPin, Users } from "lucide-react" import { cn } from "@/lib/utils" export type RoundStatus = "active" | "completed" export type Round = { id: string courseName: string status: RoundStatus teeName: string holes: 9 | 18 date: string playerCount: number } const STATUS_CONFIG: Record = { active: { label: "Pågår", dot: "bg-primary", badge: "bg-primary/15 text-foreground", }, completed: { label: "Fullført", dot: "bg-brand-orange", badge: "bg-brand-orange/12 text-foreground", }, } const dateFormatter = new Intl.DateTimeFormat("no-NO", { day: "numeric", month: "short", year: "numeric", }) function formatDate(value: string) { const parsed = new Date(value) if (Number.isNaN(parsed.getTime())) return value return dateFormatter.format(parsed) } function RoundStatusBadge({ status }: { status: RoundStatus }) { const config = STATUS_CONFIG[status] return ( ) } export function RoundCard({ round }: { round: Round }) { const playerLabel = round.playerCount === 1 ? "spiller" : "spillere" return (