'use client'; import { Button } from '@/ui/Button'; import { Icon } from '@/ui/Icon'; import { Stack } from '@/ui/primitives/Stack'; import { Surface } from '@/ui/primitives/Surface'; import { Text } from '@/ui/Text'; import { ArrowDownLeft, ArrowUpRight, History, Wallet } from 'lucide-react'; interface Transaction { id: string; type: 'credit' | 'debit'; amount: number; description: string; date: string; } interface WalletSummaryPanelProps { balance: number; currency: string; transactions: Transaction[]; onDeposit: () => void; onWithdraw: () => void; } export function WalletSummaryPanel({ balance, currency, transactions, onDeposit, onWithdraw }: WalletSummaryPanelProps) { return ( {/* Background Pattern */} AVAILABLE BALANCE {balance.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })} {currency} RECENT TRANSACTIONS {transactions.length === 0 ? ( No recent transactions. ) : ( transactions.map((tx) => ( {tx.description} {new Date(tx.date).toLocaleDateString()} {tx.type === 'credit' ? '+' : '-'}{tx.amount.toFixed(2)} )) )} ); }