@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