@php $isArabic = app()->getLocale() === 'ar'; $docConfig = config('financing_documents'); $allDocs = $docConfig['documents']; $subProducts = $docConfig['sub_products']; $currentSubProductId = $currentSubProductId ?? null; @endphp
{{-- Placeholder when no sub-product selected --}} {{-- Generate a docs-block for each sub-product defined in config --}} @foreach($subProducts as $spId => $sp)

{{ ln('Required Documents', 'المستندات المطلوبة') }} {{ $isArabic ? $sp['name_ar'] : $sp['name_en'] }}

{{ ln('Please upload all required documents to complete your financing request', 'يرجى رفع جميع المستندات المطلوبة لإكمال طلب التمويل') }}
{{-- Guarantee type badge --}} @php $gKey = $sp['guarantee_type'] ?? null; $gLabels = $docConfig['guarantee_types'][$gKey] ?? null; @endphp @if($gLabels)
{{ ln('Guarantee Type', 'نوع الضمان') }}: {{ $isArabic ? $gLabels[1] : $gLabels[0] }}
@endif
{{-- Legend --}}
{{ ln('Required', 'مطلوب') }} {{ ln('Optional (if available)', 'اختياري (ان وجد)') }}
@php $docIndex = 0; @endphp @foreach($sp['documents'] as $field => $rule) @php $docIndex++; $previewId = 'sp' . $spId . '_doc' . $docIndex; $labels = $allDocs[$field] ?? [$field, $field]; $parts = explode('|', $rule, 2); $isRequired = ($parts[0] === 'required'); $note = $parts[1] ?? null; $accept = '.pdf,.jpg,.jpeg,.png'; if ($field === 'invoices_file') $accept .= ',.zip'; @endphp @endforeach
{{ ln('Document Name', 'اسم المستند') }} {{ ln('Requirement', 'الحالة') }} {{ ln('Attach', 'ارفاق') }} {{ ln('Preview', 'معاينة') }} {{ ln('Status', 'الحالة') }}
{{ $isArabic ? $labels[1] : $labels[0] }} @if($note) ({{ $note }}) @endif @if($isRequired) {{ ln('Required', 'مطلوب') }} @else {{ ln('Optional', 'اختياري') }} @endif
@endforeach {{-- Fallback for unknown sub-products --}}

{{ ln('General Required Documents', 'المستندات العامة المطلوبة') }}

{{ ln('Please upload the general documents required for this product', 'يرجى رفع المستندات العامة المطلوبة لهذا المنتج') }}

{{ ln('Documents for this sub-product are not configured yet. Please contact support.', 'لم يتم تهيئة المستندات لهذا المنتج الفرعي بعد. يرجى التواصل مع الدعم.') }}