{{-- Global search (CRM_PLAN.md 19.3). Rendered inside the header's right-hand cluster. The dialog is teleported to : the header has a backdrop filter, which would otherwise pin a fixed overlay inside the header bar. The root is display: contents, so it adds no gap to the header row when search is not live for the person. --}}
@if ($this->live) @php $minLength = \App\Services\Crm\GlobalSearch::MIN_LENGTH; $typing = mb_strlen(trim($term)) >= $minLength; $groups = $typing ? $this->groups : []; $recent = $typing ? ['label' => '', 'items' => []] : $this->recent; $index = 0; @endphp
@teleport('body') @endteleport
@endif