import Link from "next/link"; import { cn } from "@/lib/utils"; import type { LucideIcon } from "lucide-react"; interface StatCardProps { label: string; value: string | number; icon: LucideIcon; color?: "blue" | "green" | "orange" | "red"; href?: string; } const COLOR_MAP = { blue: { bg: "bg-primary-50", icon: "text-primary-600", iconBg: "bg-primary-100", }, green: { bg: "bg-success-50", icon: "text-success", iconBg: "bg-success-100", }, orange: { bg: "bg-warning-50", icon: "text-warning", iconBg: "bg-warning-100", }, red: { bg: "bg-danger-50", icon: "text-danger", iconBg: "bg-danger-100", }, }; export function StatCard({ label, value, icon: Icon, color = "blue", href }: StatCardProps) { const colors = COLOR_MAP[color]; const card = (

{value}

{label}

); if (href) { return {card}; } return card; }