@if (loading()) {

Loading quiz...

} @else if (error() && !quiz()) {
⚠️

{{ error() }}

← Back to Dashboard
} @else if (submitted()) {
🎉

Quiz Submitted Successfully!

Redirecting to dashboard...

} @else {

{{ quiz()?.title }}

Question {{ currentIndex() + 1 }} of {{ questions().length }}
@if (error()) {
⚠️ {{ error() }}
}
⏱️ {{ formattedTime() }}
@if (currentQuestion()) {
Q{{ currentIndex() + 1 }} {{ currentQuestion().type === 'mcq' ? 'Multiple Correct' : 'Single Answer' }}

{{ currentQuestion().question }}

@for (opt of currentQuestion().options; track opt; let i = $index) { }
}
@for (q of questions(); track q._id; let i = $index) { }
@if (currentIndex() === questions().length - 1) { } @else { }
}