@props([ 'type' => 'violation', 'details' => '', 'timestamp' => null, 'screenshotUrl' => null, 'aiVerdict' => null, ]) @php $icoClass = 'amber'; $faIcon = 'fa-solid fa-window-restore'; $isFlag = false; if ($type === 'focus_lost') { $icoClass = 'amber'; $faIcon = 'fa-solid fa-window-restore'; } elseif (in_array($type, ['gaze_anomaly', 'gaze_fixed_staring'])) { $icoClass = 'amber'; $faIcon = 'fa-solid fa-eye'; } elseif (in_array($type, ['gaze_lower_device', 'reading_external_device'])) { $icoClass = 'red'; $faIcon = 'fa-solid fa-mobile-screen'; $isFlag = true; } elseif (in_array($type, ['question_repeat_lower', 'question_repetition'])) { $icoClass = 'red'; $faIcon = 'fa-solid fa-comments'; $isFlag = true; } elseif ($type === 'talking_on_phone') { $icoClass = 'red'; $faIcon = 'fa-solid fa-phone'; $isFlag = true; } elseif ($type === 'external_ai_detected') { $icoClass = 'red'; $faIcon = 'fa-solid fa-robot'; $isFlag = true; } elseif ($type === 'tab_switch') { $icoClass = 'amber'; $faIcon = 'fa-solid fa-window-restore'; } $titleCap = ucfirst(str_replace('_', ' ', $type)); $timeStr = $timestamp ? \Carbon\Carbon::parse($timestamp)->format('H:i:s') : now()->format('H:i:s'); @endphp
merge(['class' => 'log-item flex gap-2.5 p-3 border-b border-[#1b2233] last:border-b-0 ' . ($isFlag ? 'bg-[rgba(239,74,95,0.1)] flag' : '')]) }}>
{{ $titleCap }} — {{ $details }} @if($screenshotUrl) [ Screenshot] @endif @if($aiVerdict) @php $confPct = round(($aiVerdict['confidence'] ?? 0.85) * 100); $engineName = $aiVerdict['engine'] ?? 'AI Engine'; $toolName = !empty($aiVerdict['ai_tool_detected']) ? ' • Detected: ' . e($aiVerdict['ai_tool_detected']) . '' : ''; @endphp
AI inspector · {{ $confPct }}% cheating confidence ({!! $engineName . $toolName !!})
@endif
{{ $timeStr }}