{{--

Soalan {{ $currentStep + 1 }} daripada {{ count($questions) }}

--}}

Soalan {{ $currentStep + 1 }}/{{ count($questions) }}

@if (isset($questions[$currentStep])) @php $question = $questions[$currentStep]; $hasAnswered = isset($answers[$currentStep]); @endphp

{{ $question->text }}

@foreach ($question->answerOptions as $option) @php $selected = $hasAnswered && $answers[$currentStep] == $option->id; $highlight = $selected ? ($option->score == 0 ? 'bg-green-100 border-green-500' : ($option->score >= 4 ? 'bg-red-100 border-red-500' : 'bg-yellow-100 border-yellow-500')) : 'bg-white border-gray-300'; @endphp @endforeach
@if ($hasAnswered)
Tips:

{{ $question->tips ?? 'Fikir dahulu sebelum ambil tindakan. Pastikan anda semak sumber sebelum percaya.' }}

@endif
@if ($currentStep < count($questions) - 1) @else @endif
@endif