Flag Quiz
(showAchievements = true)} />
(showAchievements = false)} on:achievementsUnlocked={handleAchievementsUnlocked} /> {#if quizSubpage === "welcome"} (showSettings = true)} on:closeResults={() => (showSessionResults = false)} /> 0} on:action={handleActionButtonClick} /> {:else if quizSubpage === "quiz"} {#if gameState === "loading"}
Loading flags...
{:else if currentQuestion}
Question {currentSessionQuestions + 1} from {sessionLength}
{currentQuestion.type === "flag-to-country" ? "Which country does this flag belong to?" : "Which flag belongs to this country?"}
{#if showResult}
{#if selectedAnswer === correctAnswer}
Correct!
{:else}
Wrong! {#if currentQuestion.type === "flag-to-country"} The correct answer is: {getCountryName( currentQuestion.correct, )}. {#if showResultCountryInfo} {/if} {:else} You selected the {getCountryName( currentQuestion.options[selectedAnswer], )} flag. {/if}
{/if}
{/if}
{#if currentQuestion.type === "flag-to-country"}
Flag
{#each currentQuestion.options as option, index} {/each}
{:else}

{getCountryName(currentQuestion.correct)} {#if currentQuestion.correct?.meta?.description} {#if showCountryInfo} {/if} {/if}

{#each currentQuestion.options as option, index} {/each}
{/if} {#if gameState === "question"} {:else if (!autoAdvance && gameState === "answered") || (autoAdvance && gameState === "answered" && sessionRestoredFromReload)} {/if} {#if autoAdvance && gameState === "answered" && timerProgress > 0 && !sessionRestoredFromReload}
Next question in {Math.ceil( (timerDuration - (timerProgress / 100) * timerDuration) / 1000, )}s
{/if}
{/if} {/if}