import { Card, CardContent } from "@/components/ui/card"; const accentColors: Record = { Containers: "#3b82f6", "Hosts Online": "#22c55e", GPU: "#a855f7", "Emails Today": "#f59e0b", Alerts: "#ef4444", "Total Spend": "#3b82f6", Transactions: "#22c55e", "Top Vendor": "#f59e0b", "Total Queries": "#3b82f6", Blocked: "#ef4444", "Avg Response": "#22c55e", }; interface StatCardProps { label: string; value: string | number; sub?: React.ReactNode; pct?: number; // Optional 0-100 for ring gauge } function GaugeRing({ pct, color, size = 72, stroke = 5 }: { pct: number; color: string; size?: number; stroke?: number }) { const radius = (size - stroke) / 2; const circumference = 2 * Math.PI * radius; const offset = circumference - (pct / 100) * circumference; return ( ); } export function StatCard({ label, value, sub, pct }: StatCardProps) { const color = accentColors[label] ?? "#3b82f6"; const hasPct = pct != null && pct >= 0; return ( {hasPct ? (
{value}
) : (

{value}

)}

{label}

{sub &&
{sub}
}
); }