@foreach (json_decode($documents, true) as $key => $item)
@if(!empty($item))
{{ translate($key) }}
@php($item = is_string($item) ? json_decode($item, true) : $item)
@foreach ($item as $index => $file)
@php($file = is_string($file) ? ['file' => $file, 'storage' => 'public'] : $file)
@php($full_url = \App\CentralLogics\Helpers::get_full_url($prefix, $file['file'], $file['storage']))
@php($path_info = pathinfo($full_url))
@php($f_date = $path_info['extension'] ?? '')
@if (in_array($f_date, ['pdf', 'doc', 'docs', 'docx']))
@if ($f_date == 'pdf')
@else
@endif
@elseif (in_array($f_date, ['jpg', 'jpeg', 'png', 'webp']))
@push('script_2')
@endpush
@endif
@endforeach
@endif
@endforeach