"use client"; import { Card, CardContent } from "@/components/ui/card"; import { cn } from "@/lib/utils"; import { Clock, AlertCircle, CheckCircle2, XCircle, TrendingUp, } from "lucide-react"; import type { DashboardStats } from "@/types"; interface StatsCardsProps { stats: DashboardStats; } export function StatsCards({ stats }: StatsCardsProps) { const cards = [ { label: "Awaiting Review", value: stats.awaitingReview, icon: Clock, color: "text-amber-400", bg: "bg-amber-500/10", ring: "ring-amber-500/20", }, { label: "Needs Revisions", value: stats.needsRevisions, icon: AlertCircle, color: "text-orange-400", bg: "bg-orange-500/10", ring: "ring-orange-500/20", }, { label: "Approved", value: stats.approved, icon: CheckCircle2, color: "text-emerald-400", bg: "bg-emerald-500/10", ring: "ring-emerald-500/20", }, { label: "Overdue Tasks", value: stats.tasksOverdue ?? stats.overdue, icon: XCircle, color: "text-red-400", bg: "bg-red-500/10", ring: "ring-red-500/20", }, { label: "Active Projects", value: stats.activeProjects, icon: TrendingUp, color: "text-blue-400", bg: "bg-blue-500/10", ring: "ring-blue-500/20", }, ]; return (
{cards.map((card) => { const Icon = card.icon; return (

{card.value}

{card.label}

); })}
); }