import { LeagueWalletViewData } from '@/lib/view-data/leagues/LeagueWalletViewData'; import { Card } from '@/ui/Card'; import { Section } from '@/ui/Section'; import { Wallet, TrendingUp, TrendingDown, DollarSign, Calendar, ArrowUpRight, ArrowDownRight } from 'lucide-react'; interface LeagueWalletTemplateProps { viewData: LeagueWalletViewData; } export function LeagueWalletTemplate({ viewData }: LeagueWalletTemplateProps) { const formatCurrency = (amount: number) => { return new Intl.NumberFormat('en-US', { style: 'currency', currency: viewData.currency, }).format(Math.abs(amount)); }; const getTransactionIcon = (type: string) => { switch (type) { case 'deposit': return ; case 'withdrawal': return ; case 'sponsorship': return ; case 'prize': return ; default: return ; } }; const getTransactionColor = (type: string) => { switch (type) { case 'deposit': return 'text-performance-green'; case 'withdrawal': return 'text-red-400'; case 'sponsorship': return 'text-primary-blue'; case 'prize': return 'text-warning-amber'; default: return 'text-gray-400'; } }; return (

League Wallet

Financial overview and transaction history

{/* Balance Card */}

Current Balance

{formatCurrency(viewData.balance)}

{/* Transaction History */}

Transaction History

Recent financial activity

{viewData.transactions.length === 0 ? (

No transactions yet

) : (
{viewData.transactions.map((transaction) => (
{getTransactionIcon(transaction.type)}

{transaction.description}

{new Date(transaction.createdAt).toLocaleDateString()} {transaction.type} {transaction.status}

= 0 ? 'text-performance-green' : 'text-red-400' }`}> {transaction.amount >= 0 ? '+' : '-'}{formatCurrency(transaction.amount)}

))}
)}
{/* Note about features */}

Wallet Management

Interactive withdrawal and export features will be implemented in future updates.

); }