'use client'; import { TrendingUp, Shield, Layers, Wallet } from 'lucide-react'; import { formatNumber, formatPercent } from '@/utils/security'; interface StatsProps { totalTvl: number; avgApy: number; avgSecurity: number; poolCount: number; protocolCount: number; } export function Stats({ totalTvl, avgApy, avgSecurity, poolCount, protocolCount }: StatsProps) { const stats = [ { label: 'TVL Total', value: formatNumber(totalTvl), icon: Wallet, color: 'text-blue-400', bgColor: 'bg-blue-500/10', }, { label: 'APY Moyen', value: formatPercent(avgApy), icon: TrendingUp, color: 'text-safe-400', bgColor: 'bg-safe-500/10', }, { label: 'Score Sécurité Moy.', value: Math.round(avgSecurity).toString(), icon: Shield, color: 'text-purple-400', bgColor: 'bg-purple-500/10', }, { label: 'Pools Analysés', value: `${poolCount} / ${protocolCount} protocoles`, icon: Layers, color: 'text-amber-400', bgColor: 'bg-amber-500/10', }, ]; return (
{stats.map((stat) => (
{stat.label}
{stat.value}
))}
); }