@php $points = $waitHistory['points'] ?? collect(); $maxWait = max(1, (int) ($waitHistory['maximum'] ?? 0)); $historyTrend = $waitHistory['trend'] ?? 'unknown'; $historyTrendDelta = $waitHistory['trend_delta_minutes'] ?? null; $historyAvailable = $points->count() >= 2; @endphp @if($historyAvailable)
{{ __('ui.live_history_kicker') }}

{{ __('ui.live_history_title', ['hours' => $waitHistory['hours'] ?? 8]) }}

{{ __('ui.live_history_text') }} @if(($waitHistory['sample_count'] ?? 0) > 0){{ __('ui.live_history_samples', ['count' => $waitHistory['sample_count']]) }}@endif

@if($points->isNotEmpty())
{{ __('ui.live_history_min') }}{{ $waitHistory['minimum'] }} min {{ __('ui.live_history_avg') }}{{ $waitHistory['average'] }} min {{ __('ui.live_history_max') }}{{ $waitHistory['maximum'] }} min {{ __('ui.live_history_trend') }}@if($historyTrend === 'up') โ†— @elseif($historyTrend === 'down') โ†˜ @elseif($historyTrend === 'stable') โ†’ @endif {{ __('ui.live_trend_'.$historyTrend) }}@if($historyTrendDelta !== null && $historyTrend !== 'stable'){{ $historyTrendDelta > 0 ? '+' : '' }}{{ $historyTrendDelta }} min@endif
@endif
@endif