import { useTranslation } from 'react-i18next'; import { Clock, Banknote, Receipt, Loader2 } from 'lucide-react'; interface ReportStatsProps { totalAmount: number; totalCount: number; byStatus?: Record; isLoading?: boolean; } export default function ReportStats({ totalAmount, totalCount, byStatus, isLoading, }: ReportStatsProps) { const { t } = useTranslation(); const deposited = byStatus?.deposited ?? 0; const pending = byStatus?.pending ?? 0; const total = totalCount || 1; const depositedPct = Math.round((deposited / total) * 100); const formattedAmount = totalAmount.toLocaleString('fr-CA', { style: 'currency', currency: 'CAD', minimumFractionDigits: 2, }); return (
{/* Volume Total */}

{t('reports.stats.totalVolume')}

{isLoading ? ( ) : (

{formattedAmount}

)}
{t('status.deposited', 'Déposé')}: {deposited} | {t('status.pending', 'En attente')}: {pending}
{t('status.deposited', 'Déposé')} {depositedPct}%
{/* Transactions Traitées */}

{t('reports.stats.transactionsProcessed')}

{isLoading ? ( ) : (

{totalCount.toLocaleString('fr-CA')}

)}
{t('reports.stats.lastUpdate')}: {new Date().toLocaleTimeString('fr-CA', { hour: '2-digit', minute: '2-digit' })}
{byStatus && Object.entries(byStatus).map(([key, val]) => ( {t(`status.${key}`, key)}: {val} ))}
); }