@props([ 'account', 'showBalance' => true, ]) @php $typeColors = [ 'cash' => 'bg-green-100 text-green-600 dark:bg-green-900/30 dark:text-green-400', 'bank' => 'bg-blue-100 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400', 'credit_card' => 'bg-red-100 text-red-600 dark:bg-red-900/30 dark:text-red-400', 'savings' => 'bg-indigo-100 text-indigo-600 dark:bg-indigo-900/30 dark:text-indigo-400', 'investment' => 'bg-purple-100 text-purple-600 dark:bg-purple-900/30 dark:text-purple-400', 'e_wallet' => 'bg-yellow-100 text-yellow-600 dark:bg-yellow-900/30 dark:text-yellow-400', 'loan' => 'bg-orange-100 text-orange-600 dark:bg-orange-900/30 dark:text-orange-400', 'other' => 'bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400', ]; $typeIcons = [ 'cash' => 'money-bill-wave', 'bank' => 'university', 'credit_card' => 'credit-card', 'savings' => 'piggy-bank', 'investment' => 'chart-line', 'e_wallet' => 'wallet', 'loan' => 'hand-holding-usd', 'other' => 'ellipsis-h', ]; @endphp
merge(['class' => 'bg-white dark:bg-gray-800 rounded-xl shadow-sm p-4 hover:shadow-md transition']) }}>
color) style="background-color: {{ $account->color }}20; color: {{ $account->color }};" @endif>

{{ $account->name }}

{{ $account->type_label }}

@if($showBalance)

{{ $account->currency?->symbol ?? 'Rp' }} {{ number_format(abs($account->current_balance), 2, ',', '.') }}

@if($account->type === 'credit_card' && $account->credit_limit)

Limit: {{ $account->currency?->symbol ?? 'Rp' }} {{ number_format($account->credit_limit, 0, ',', '.') }}

@endif
@endif