"use client"; import { Users, Activity, Workflow, Server } from "lucide-react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { AdminStats } from "@/types/admin"; import { Skeleton } from "@/components/ui/skeleton"; interface StatsOverviewProps { stats: AdminStats | null; loading: boolean; } export function StatsOverview({ stats, loading }: StatsOverviewProps) { if (loading || !stats) { return (
{Array.from({ length: 4 }).map((_, i) => ( ))}
); } const healthColor = { healthy: "text-green-500", degraded: "text-amber-500", down: "text-red-500", }[stats.systemHealth]; return (
Total Users
{stats.totalUsers}

{stats.userGrowth > 0 ? "+" : ""} {stats.userGrowth}% from last month

Active Users
{stats.activeUsers}

in the last 7 days

Total Workflows
{stats.totalWorkflows}

Active across the platform

System Health
{stats.systemHealth}

All services operational

); }