@php $formatDuration = static function (int $seconds): string { if ($seconds < 60) return $seconds.' sec'; if ($seconds < 3600) return intdiv($seconds, 60).' min'; $hours = intdiv($seconds, 3600); $minutes = intdiv($seconds % 3600, 60); return $hours.' hr'.($minutes > 0 ? ' '.$minutes.' min' : ''); }; $isLate = $queue === 'late'; @endphp @forelse($items as $item)
@if($isLate) @else {{ collect(explode(' ', $item['customer']))->take(2)->map(fn ($part) => mb_substr($part, 0, 1))->implode('') }} @endif
{{ $item['customer'] }} {{ $formatDuration($item['wait_seconds']) }}
{{ $item['slug'] }}@unless($isLate) · {{ $item['topic'] }}@endunless · {{ $item['assignee'] ?? 'Unassigned' }}
{{ $item['preview'] }}
@empty @if($showEmpty ?? true)

{{ $isLate ? 'No late replies' : 'No customers waiting' }}

{{ $isLate ? 'No customer has crossed the '.$lateReplyMinutes.'-minute threshold.' : 'Every active customer message has a reply.' }}

@endif @endforelse