@php $searchTrim = trim($search); @endphp @if ($searchTrim !== '')

{{ trans_choice('budgets.transactions_page.stats_filtered_scope', count($filtered), ['shown' => count($filtered), 'month' => $statsPeriod]) }}

@endif

{{ __('budgets.transactions_page.stat_row_caption', ['month' => $statsPeriod]) }}

@php $netTone = $net > 0.005 ? 'text-income' : ($net < -0.005 ? 'text-expense' : 'text-foreground'); @endphp

{{ __('budgets.transactions_page.stat_card_income_label') }}

{{ \App\Support\Money::formatEur($income) }}

@if ($statsIncomeCount === 0) {{ __('budgets.transactions_page.stat_card_income_empty', ['month' => $statsPeriod]) }} @else {{ trans_choice('budgets.transactions_page.stat_card_income_sub', $statsIncomeCount, ['count' => $statsIncomeCount, 'month' => $statsPeriod]) }} @endif

{{ __('budgets.transactions_page.stat_card_expense_label') }}

{{ \App\Support\Money::formatEur($expenses) }}

@if ($statsExpenseCount === 0) {{ __('budgets.transactions_page.stat_card_expense_empty', ['month' => $statsPeriod]) }} @else {{ trans_choice('budgets.transactions_page.stat_card_expense_sub', $statsExpenseCount, ['count' => $statsExpenseCount, 'month' => $statsPeriod]) }} @endif

{{ __('budgets.transactions_page.stat_card_net_label') }}

{{ \App\Support\Money::formatEur($net) }}

{{ $statsNetHint }}

@if ($statsNetHintExtra)

{{ $statsNetHintExtra }}

@endif
@if (count($filtered) === 0)

{{ __('budgets.transactions_page.empty_title') }}

{{ $searchTrim !== '' ? __('budgets.transactions_page.empty_filtered') : __('budgets.transactions_page.empty_hint') }}

@endif @if (($upcomingTxnCount ?? 0) > 0)

{{ __('budgets.transactions_page.upcoming_section_title') }}

{{ trans_choice('budgets.transactions_page.upcoming_section_subtitle', $upcomingTxnCount, ['count' => $upcomingTxnCount]) }}

{{-- Single inset grouped list (iOS-style): section header rows + same row chrome as Activity --}}
@foreach (($upcomingGrouped ?? []) as $ugI => $section) @php $dateLabel = $section['label']; $txns = $section['items']; $rowSum = collect($txns)->sum(fn ($t) => (float) ($t['amount'] ?? 0)); @endphp
@if ($ugI === 0) {{ __('budgets.transactions_page.upcoming_next_badge') }} @endif

{{ $dateLabel }}

{{ $rowSum > 0 ? '+' : '' }}{{ \App\Support\Money::formatEur(abs($rowSum)) }}
@foreach ($txns as $t) @include('livewire.partials.transactions-list-row', ['t' => $t, 'tone' => 'upcoming']) @endforeach @endforeach
@endif @if (($upcomingTxnCount ?? 0) > 0 && count($grouped) > 0) @endif @foreach ($grouped as $gi => $section) @php $dateLabel = $section['label']; $txns = $section['items']; $rowSum = collect($txns)->sum(fn ($t) => (float) ($t['amount'] ?? 0)); @endphp

{{ $dateLabel }}

{{ $rowSum > 0 ? '+' : '' }}{{ \App\Support\Money::formatEur(abs($rowSum)) }}
@foreach ($txns as $t) @include('livewire.partials.transactions-list-row', ['t' => $t, 'tone' => 'default']) @endforeach
@endforeach
@if ($mobileSearchOpen)

@if ($searchTrim !== '') {{ __('budgets.transactions_page.mobile_results', ['count' => count($filtered)]) }} @else {{ __('budgets.transactions_page.mobile_search_hint') }} @endif

@endif @if ($showAdd)

{{ __('budgets.transactions_page.add_transaction_title') }}

@foreach (['expense', 'income'] as $tp) @endforeach
@if (count($addSmartSuggestions) > 0)

{{ __('budgets.transactions_page.smart_actions') }}

@foreach (array_slice($addSmartSuggestions, 0, 3) as $s) @php $tone = $s['tone'] ?? 'default'; @endphp

{{ $s['label'] }}

@if (! empty($s['detail']))

{{ $s['detail'] }}

@endif
@endforeach
@endif
@foreach ($categories as $cid => $c) @endforeach
{{ __('budgets.transactions_page.recurring') }}
@if ($addIsRecurring) @php $addRecurringKey = 'budgets.transactions_page.recurring_frequency_' . $addRecurringFrequency; @endphp @endif
@endif @if ($showImport) @php $importStats = $this->importStats(); @endphp

{{ __('budgets.import_page.title') }}

@if ($importStage === 'idle') @endif @if ($importStage === 'preview')
{{ __('budgets.import_page.file_rows_extracted', ['count' => count($importRows)]) }} · {{ __('budgets.import_page.rows_selected', ['selected' => $importStats['count'], 'total' => count($importRows)]) }}
@foreach ($importRows as $row)

{{ $row['name'] }}

{{ $row['date'] }}

@php $rowAmount = (float) ($row['amount'] ?? 0); $rowType = (string) ($row['type'] ?? ''); $rowIsIncome = $rowType !== '' ? $rowType === 'income' : $rowAmount > 0; @endphp

{{ $rowIsIncome ? '+' : '-' }}{{ \App\Support\Money::formatEur(abs($rowAmount)) }}

@endforeach
@endif
@endif @if ($addRecurringOpen)

{{ __('budgets.transactions_page.recurring') }}

{{ __('budgets.transactions_page.recurring') }}

@foreach (['daily', 'weekly', 'biweekly', 'monthly', 'quarterly', 'yearly'] as $freq) @endforeach
@endif @if ($selectedTxn) @php $txn = $selectedTxn; $cat = \App\Support\CategoryCatalog::get($txn['categoryId'] ?? 'other'); $amt = (float) ($txn['amount'] ?? 0); $__txnDateRaw = (string) ($txn['date'] ?? ''); $__txnDateLabel = '—'; if ($__txnDateRaw !== '') { try { $__txnDateLabel = \Carbon\Carbon::parse($__txnDateRaw)->locale($locale)->isoFormat('LL'); } catch (\Throwable) { $__txnDateLabel = $__txnDateRaw; } } $__txnType = (string) ($txn['type'] ?? 'expense'); $__txnTypeLabel = in_array($__txnType, ['expense', 'income', 'transfer'], true) ? (string) __('budgets.transactions_page.display_type_'.$__txnType) : (string) __('budgets.transactions_page.display_type_other'); @endphp

{{ __('budgets.transactions_page.transaction_details') }}

@if (! $detailEditing) @endif
@if ($detailEditing) @else @php $txnIsIncome = $__txnType === 'income' || ($__txnType === '' && $amt > 0); @endphp

{{ $txnIsIncome ? '+' : '-' }}{{ \App\Support\Money::formatEur(abs($amt)) }}

@endif @if ($detailEditing) @else

{{ $txn['name'] }}

@endif
@if ($detailEditing && count($dSmartSuggestions) > 0)

{{ __('budgets.transactions_page.smart_actions') }}

@foreach (array_slice($dSmartSuggestions, 0, 3) as $s) @php $tone = $s['tone'] ?? 'default'; @endphp

{{ $s['label'] }}

@if (! empty($s['detail']))

{{ $s['detail'] }}

@endif
@endforeach
@endif

{{ __('budgets.transactions_page.category') }}

@if ($detailEditing)
@foreach ($categories as $cid => $c) @endforeach
@else
{{ $cat['name'] }}
@endif

{{ __('budgets.transactions_page.date') }}

@if ($detailEditing) @else

{{ $__txnDateLabel }}

@endif

{{ __('budgets.transactions_page.type') }}

@if ($detailEditing)
@foreach (['expense', 'income'] as $tp) @endforeach
@else

{{ $__txnTypeLabel }}

@endif
{{ __('budgets.transactions_page.recurring') }}
@if ($detailEditing) @else @if (! empty($txn['isRecurring'])) @php $__fq = (string) ($txn['recurringConfig']['frequency'] ?? 'monthly'); @endphp {{ in_array($__fq, ['daily', 'weekly', 'biweekly', 'monthly', 'quarterly', 'yearly'], true) ? __('budgets.transactions_page.recurring_frequency_' . $__fq) : __('budgets.transactions_page.recurring_yes') }} @else {{ __('budgets.transactions_page.recurring_no') }} @endif @endif
@if ($detailEditing && $dIsRecurring) @endif

{{ __('budgets.transactions_page.notes') }}

@if ($detailEditing) @else

{{ $txn['notes'] ?? __('budgets.transactions_page.no_notes') }}

@endif
@if ($detailEditing)
@endif
@endif @if ($detailRecurringOpen)

{{ __('budgets.transactions_page.recurring') }}

{{ __('budgets.transactions_page.recurring') }}

@foreach (['daily', 'weekly', 'biweekly', 'monthly', 'quarterly', 'yearly'] as $freq) @endforeach
@endif