import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Server, Activity, AlertTriangle, Power } from "lucide-react"; import { ServerStats } from "@/types/server.types"; import { useTheme } from "@/contexts/ThemeContext"; interface ServerStatsCardsProps { stats: ServerStats; } export const ServerStatsCards = ({ stats }: ServerStatsCardsProps) => { const { theme } = useTheme(); const cards = [ { title: "TOTAL SERVERS", value: stats.total, icon: Server, gradient: theme === 'dark' ? "linear-gradient(135deg, rgba(65, 59, 55, 0.8) 0%, rgba(160, 82, 45, 0.6) 100%)" : "linear-gradient(135deg, rgba(65, 59, 55, 0.8) 0%, #a0522d 100%)" }, { title: "ONLINE SERVERS", value: stats.online, icon: Activity, gradient: theme === 'dark' ? "linear-gradient(135deg, rgba(65, 59, 55, 0.8) 0%, rgba(102, 187, 106, 0.6) 100%)" : "linear-gradient(135deg, rgba(65, 59, 55, 0.8) 0%, #66bb6a 100%)" }, { title: "OFFLINE SERVERS", value: stats.offline, icon: Power, gradient: theme === 'dark' ? "linear-gradient(135deg, rgba(65, 59, 55, 0.8) 0%, rgba(239, 83, 80, 0.6) 100%)" : "linear-gradient(135deg, rgba(65, 59, 55, 0.8) 0%, #ef5350 100%)" }, { title: "WARNING SERVERS", value: stats.warning, icon: AlertTriangle, gradient: theme === 'dark' ? "linear-gradient(135deg, rgba(65, 59, 55, 0.8) 0%, rgba(255, 183, 77, 0.6) 100%)" : "linear-gradient(135deg, rgba(65, 59, 55, 0.8) 0%, #ffb74d 100%)" } ]; return (
{cards.map((card, index) => ( {/* Grid Pattern Overlay */}
{card.title} {card.value}
))}
); };