import { cn } from "@/app/_utils/cn"; import { HTMLAttributes, forwardRef } from "react"; import { LucideIcon } from "lucide-react"; import { StatusBadge } from "./StatusBadge"; import { ProgressBar } from "./ProgressBar"; import { TruncatedText } from "./TruncatedText"; export interface MetricCardProps extends HTMLAttributes { icon: LucideIcon; label: string; value: string; detail?: string; status?: string; color?: string; variant?: "basic" | "performance"; showProgress?: boolean; progressValue?: number; progressMax?: number; } const MetricCard = forwardRef( ( { className, icon: Icon, label, value, detail, status, color = "text-blue-500", variant = "basic", showProgress = false, progressValue = 0, progressMax = 100, ...props }, ref ) => { return (

{label}

{status && variant === "performance" && ( )}
{detail && (

{detail}

)} {showProgress && (
)} {status && variant === "basic" && (
)}
); } ); MetricCard.displayName = "MetricCard"; export { MetricCard };