{{-- @param SpeakingNoteAttachment $attachment @param string $downloadRoute — named route for download @param array $downloadParams — route params @param bool $canDelete — show delete button? @param string|null $deleteRoute — named route for delete (if $canDelete) @param array $deleteParams — route params for delete --}} @php $iconMeta = match($attachment->file_type) { 'pdf' => ['bg' => 'bg-red-100', 'text' => 'text-red-600', 'label' => 'PDF'], 'word' => ['bg' => 'bg-blue-100', 'text' => 'text-blue-600', 'label' => 'DOC'], 'excel' => ['bg' => 'bg-green-100', 'text' => 'text-green-600', 'label' => 'XLS'], 'image' => ['bg' => 'bg-purple-100', 'text' => 'text-purple-600', 'label' => 'IMG'], default => ['bg' => 'bg-gray-100', 'text' => 'text-gray-500', 'label' => strtoupper($attachment->extension)], }; @endphp
{{-- Icon --}}
{{ $iconMeta['label'] }}
{{-- Name + meta --}}

{{ $attachment->original_filename }}

{{ $attachment->formatted_size }} @if($attachment->uploadedBy ?? null) · {{ $attachment->uploadedBy->name }} @endif · {{ $attachment->created_at->format('d M Y') }}

{{-- Download --}} Download {{-- Delete (admin/supervisor only) --}} @if($canDelete ?? false)
@csrf @method('DELETE')
@endif