@props([ 'document' => null, // App\Models\Document\Document 'page' => null, 'height' => '420px', ]) @php $rawUrl = $document ? route('documents.raw', $document) : null; $viewUrl = $document ? route('documents.view', $document) : null; $isPdf = $document && str_contains(strtolower($document->file_type ?? ''), 'pdf'); @endphp
merge(['class' => 'witness-doc-preview border rounded bg-body-tertiary']) }}> @if(! $document)

Select an exhibit or evidence item to preview its source.

@else
{{ $document->display_name }}@if($page) — page {{ $page }}@endif Open
@if($isPdf && $rawUrl) @else

Preview not available inline. Use “Open”.

@endif @endif