@props([ 'file' => null, 'actions' => [], ]) @php if (is_array($actions)) { $actions = array_filter( $actions, fn ($action): bool => $action->isVisible(), ); } @endphp @if ($file)
@if (str($file['type'])->contains('image')) {{ $file['alt'] ?? '' }} @elseif (str($file['type'])->contains('video')) @else @endif
@foreach ($actions as $action) {{ ($action)(['item' => $file]) }} @endforeach
@endif