@props([ 'documents', 'containerId' => 'sortable-documents', 'canDelete' => false, 'showDownload' => true, 'canEditType' => false, 'canEditName' => false, 'documentTypeEnum' => null, ])
@foreach($documents->sortBy('order') as $document)
{{ $document->order ?? 0 }}
@if($canEditType && $documentTypeEnum)
@else @if($document->type_enum)
{{ $document->type_enum->label() }}
@endif @endif @if($canEditName)
@else @if($document->name)
{{ $document->name }}
@endif @endif
{{ number_format($document->file_size / 1024, 2) }} KB
@if($showDownload) @endif @if($canDelete)
@endif
@endforeach