import type { ComponentType, SVGProps } from "react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; interface AdminStatsCardProps { title: string; value: string | number; change?: string; changeType?: "positive" | "negative" | "neutral" | "warning"; icon: ComponentType>; description?: string; badge?: string; } export function AdminStatsCard({ title, value, change, changeType = "neutral", icon: Icon, description, badge, }: AdminStatsCardProps) { const changeColor = { positive: "text-green-600", negative: "text-red-600", neutral: "text-muted-foreground", warning: "text-yellow-600", }[changeType]; return ( {title}
{badge && ( {badge} )}
{value}
{change && (

{changeType === "positive" && "↗"} {changeType === "negative" && "↘"} {change}

)} {description && (

{description}

)}
); }