import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { TrendingUp, TrendingDown, Users, ShoppingCart, DollarSign, CreditCard, LucideIcon } from "lucide-react" import type { MetricCard as MetricCardType } from "@/types/dashboard" const iconMap: Record = { Users, ShoppingCart, DollarSign, CreditCard, } export function MetricCard({ title, value, change, changeLabel, icon }: MetricCardType) { const isPositive = change >= 0 const Icon = iconMap[icon] return ( {Icon && } {title}
{value}
{isPositive ? ( ) : ( )} {isPositive ? "+" : ""} {change}% {changeLabel}
) }