@if (!empty($moduleFiles[$moduleData->id]))
@php
$filePath = 'module_files/' . $moduleData->id . '/';
$file = $moduleFiles[$moduleData->id];
$allowed_types = ['application/pdf', 'image/jpeg', 'image/png'];
$fileInfo = finfo_open(FILEINFO_MIME_TYPE);
$detected_type = pathinfo(asset('images/module/' . $file['name']));
@endphp
@if (in_array(strtolower($detected_type['extension']), ['jpg', 'jpeg', 'gif', 'png']))
 }})
@elseif(strtolower($detected_type['extension']) == 'pdf')
@push('custom-scripts')
@endpush
@elseif(strtolower($detected_type['extension']) == 'mp4')
@else
No Preview Available
@endif
@else
No Preview
@endif