{#if screen === "code"}
{:else}
{brandTitle}
{#key passwordModeActive}
{#if passwordModeActive}
{#if loginEmailFieldError}
{/if} {#if loginEmailFieldError}
{loginEmailFieldError}
{/if}
{ if (event.key !== "Enter") return; event.preventDefault(); loginWithEmailPassword(); }} />
{t("wa_login_password_submit")}
{#if passwordLoginFallback}
{t("wa_login_use_email_code")}
{:else}
setPasswordLoginMode(false)} disabled={authBusy} > {t("wa_login_use_email_code")}
{/if}
{#if authStatus}
{authStatus}
{/if} {:else} {#if emailAuthEnabled}
{#if loginEmailFieldError}
{/if} {#if loginEmailFieldError}
{loginEmailFieldError}
{/if}
{t("wa_send_code_email")}
{t("wa_or")}
{/if}
{#if telegramLoginChecking}
{:else}
{/if} {telegramLoginLabel}
{#if emailAuthEnabled}
setPasswordLoginMode(true)} disabled={authBusy} >
{t("wa_login_use_password")}
{/if} {#if !telegramLoginChecking && (authStatus || telegramLoginUnavailableMessage)}
{authStatus || telegramLoginUnavailableMessage}
{/if} {/if}
{/key}
{#if userAgreementUrl || privacyPolicyUrl || showLanguageSelect}
{#if userAgreementUrl || privacyPolicyUrl}
{t("wa_auth_legal_intro")}
{#if privacyPolicyUrl}
{ e.preventDefault(); openExternalLink(privacyPolicyUrl); }} > {t("wa_auth_legal_privacy")}
{/if} {#if privacyPolicyUrl && userAgreementUrl}
{t("wa_auth_legal_and")}
{/if} {#if userAgreementUrl}
{ e.preventDefault(); openExternalLink(userAgreementUrl); }} > {t("wa_auth_legal_agreement")}
{/if}
{/if} {#if showLanguageSelect} {#if languageMenuOpen || languageClickGuard}
{/if}
{currentLanguageOption?.flag || "🏳️"}
{currentLanguageOption?.label || currentLang}
{#each languageOptions as option (option.value)}
{option.flag}
{option.label}
{/each}
{/if}
{/if}
{/if}