import type { ReactNode } from 'react'; import { ArrowUp, ArrowDown, Minus } from 'lucide-react'; interface MetricCardProps { key?: string | number; label: string; value: string | number; subtext?: string; icon?: ReactNode; trend?: 'up' | 'down' | 'neutral'; } const trendConfig = { up: { icon: ArrowUp, color: 'text-emerald-500' }, down: { icon: ArrowDown, color: 'text-red-500' }, neutral: { icon: Minus, color: 'text-slate-400' }, }; export function MetricCard({ label, value, subtext, icon, trend }: MetricCardProps) { return (
{icon && (
{icon}
)}

{label}

{value} {trend && ( {(() => { const TrendIcon = trendConfig[trend].icon; return ; })()} )}
{subtext && (

{subtext}

)}
); }