{{-- ── Toolbar ──────────────────────────────────────────────────────────── --}}
{{-- LEFT: state + category filters --}}
{{-- RIGHT: draw box | zoom | evidence scan nav --}}
{{-- Draw box --}} {{-- Zoom --}}
{{-- Evidence quick-scan (lives on same side as the sidebar) --}}
{{-- ── Main area: PDF + sidebar ─────────────────────────────────────────── --}}
{{-- PDF viewer — wire:ignore keeps Livewire's morphdom away from this subtree. The canvas, text layer, and highlight overlay are managed entirely by Alpine/PDF.js. Alpine's $wire.itemsData binding still updates highlights reactively because that's driven by Alpine watching Livewire state, not by DOM morphing. --}}
{{-- Floating page nav — centred above the canvas --}}
Page /
{{-- Canvas centred inside the scrollable area --}}
{{-- Text layer — invisible, non-interactive; used only for computeTextHighlights() positioning --}}
{{-- Highlight overlay --}}
{{-- Draw ghost — all styles come from ghostStyle() because Alpine's :style string binding sets cssText and would wipe a static style attr --}}
{{-- Draw capture layer --}}
{{-- /centering wrapper --}}
{{-- ── Sidebar ────────────────────────────────────────────────────── --}}
{{-- Summary stats --}} @php $totalCount = $items->count(); $confirmedCount = $items->filter->isConfirmed()->count(); $unreviewedCount= $items->filter->isUnreviewed()->count(); $dismissedCount = $items->filter->isDismissed()->count(); @endphp @if($totalCount > 0)
{{ $totalCount }}
Total
{{ $confirmedCount }}
Confirmed
{{ $unreviewedCount }}
Pending
{{ $dismissedCount }}
Dismissed
@endif {{-- Add Evidence form --}} @if($showAddForm)
Synapse Add Evidence @if($addPage) p.{{ $addPage }} @endif
@if($addQuote)
"{{ $addQuote }}"
@endif
@endif {{-- Accordion list grouped by page --}}
@forelse($itemsByPage as $pageNum => $pageItems) @php $pgConfirmed = $pageItems->filter->isConfirmed()->count(); $pgUnreviewed = $pageItems->filter->isUnreviewed()->count(); $pgDismissed = $pageItems->filter->isDismissed()->count(); $pageKey = $pageNum ?: 0; @endphp
{{-- Accordion header --}} {{-- Items --}}
@foreach($pageItems as $item) @php $colour = \App\Models\Dsar\DsarEvidenceItem::categoryColour($item->category); $label = \App\Models\Dsar\DsarEvidenceItem::categoryLabel($item->category); $stateClass = $item->isConfirmed() ? 'confirmed' : ($item->isDismissed() ? 'dismissed' : 'unreviewed'); @endphp
{{-- Badges row --}}
{{ $label }} {{ ucfirst($item->severity) }} @if($item->source === 'human') Human @else Synapse @endif @if($item->isConfirmed()) @endif
{{-- Quote --}} @if($item->quote)
{{ $item->quote }}
@endif {{-- Comment --}} @if($item->comment)

{{ $item->comment }}

@endif @if($item->human_notes)

{{ $item->human_notes }}

@endif {{-- Actions --}}
@if(!$item->isConfirmed()) @endif @if(!$item->isDismissed()) @endif @if($item->isConfirmed() || $item->isDismissed()) @endif @if($item->source === 'human') @endif
@endforeach
@empty

No evidence items match the current filter.

@endforelse
{{-- /sidebar --}}
{{-- /main area --}}
@push('scripts') @endpush