@php $applications = $investor->applications; $title = app()->getLocale() === 'ar' ? 'طلبات الاستثمار' : 'Investment Applications'; $currentLabel = app()->getLocale() === 'ar' ? 'الحالي' : 'Current'; $submittedLabel = app()->getLocale() === 'ar' ? 'وقت التقديم' : 'Submitted'; $statusName = static fn ($status) => app()->getLocale() === 'ar' ? ($status?->name_ar ?: $status?->name_en) : ($status?->name_en ?: $status?->name_ar); @endphp

{{ $title }} {{ $applications->count() }}

@forelse ($applications as $application)
#{{ $application->application_number }} @if ((int) $investor->current_investor_application_id === (int) $application->id){{ $currentLabel }}@endif
{{ $submittedLabel }}: {{ optional($application->submitted_at)->translatedFormat('j M Y, H:i') ?? '—' }}
@if ($application->group){{ $application->group->name }}@endif {{ $statusName($application->statusOption) ?: '—' }} {{ app()->getLocale() === 'ar' ? 'عرض التفاصيل' : 'View details' }}
@empty

{{ app()->getLocale() === 'ar' ? 'لا توجد طلبات محفوظة بعد. سيتم ترحيل السجل التاريخي عند تشغيل الترحيل المعتمد.' : 'No application history has been backfilled yet.' }}

@endforelse