@if ($canManage)
{{ __('Add account') }}
@endif
@if ($totals->isNotEmpty())
@foreach ($totals as $code => $sum)
{{ __('Total') }} {{ $code }}
{{ $code }} {{ number_format($sum, 2) }}
@endforeach
@endif
@if ($accounts->isEmpty())
@if ($canManage)
{{ __('Add your first account') }}
@endif
@else
@foreach ($accounts as $account)
@php
$typeLabels = ['bank' => __('Bank'), 'cash' => __('Cash'), 'mobile_wallet' => __('Mobile wallet'), 'other' => __('Other')];
@endphp
{{ $account->name }}
{{ $typeLabels[$account->type] ?? $account->type }} · {{ $account->currency_code }}
@if ($account->isShared())
{{ __('Shared') }}
@else
{{ $account->owner->name ?? __('Personal') }}
@endif
{{ __('Balance') }}
{{ $account->currency_code }} {{ number_format($account->balance, 2) }}
@if ($account->notes)
{{ $account->notes }}
@endif
@if ($canManage)
{{ __('Edit') }}
@endif
@endforeach
@endif