import type { LucideIcon } from 'lucide-react'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { cn } from '@/lib/utils'; type StatItem = { label: string; value: string | number; }; type StatCardProps = { title: string; icon: LucideIcon; mainLabel?: string; mainValue: string | number; subLabel?: string; description?: string; items?: StatItem[]; cols?: 2 | 3 | 4; }; export function StatCard({ title, icon: Icon, mainLabel, mainValue, subLabel, description, items = [], cols = 3 }: StatCardProps) { return ( {title} {mainLabel &&

{mainLabel}

}

{mainValue}

{subLabel &&

{subLabel}

} {description &&

{description}

} {items.length > 0 && (
{items.map((item, index) => (

{item.label}

{item.value}

))}
)}
); }