{#if app.profile} {@const p = app.profile}
{p.displayName}
{#if p.isGuest}{t('profile.guest')}{/if} {#if p.isGuest}

{t('profile.guestLocked')}

{:else}
{ e.preventDefault(); void save(); }}>
{t('profile.awayWindow')}
{t('profile.from')} :
{t('profile.to')} :

{t('profile.awayHint')}

{t('profile.preferences')}

{t('profile.preferencesHint')}

{#each ALL_VARIANTS as v (v.id)} {/each}
{/if}

{t('profile.accountsTitle')}

{#if p.email}
✉️{p.email} {#if !changingEmail} {/if}
{#if changingEmail} {#if !emailSent}
0 && !emailOk} bind:value={emailInput} placeholder={t('profile.newEmailPlaceholder')} type="email" />
{:else}
{/if} {/if} {:else if !emailSent}
0 && !emailOk} bind:value={emailInput} placeholder={t('login.emailPlaceholder')} type="email" />
{:else}
{/if} {#if p.telegramLinked}
Telegram {#if canUnlink} {/if}
{:else if telegramLinkable} {/if} {#if p.vkLinked}
VK {#if canUnlink} {/if}
{/if}
{#if !p.isGuest} {/if} {/if}
{#if pendingMerge} (pendingMerge = null)}>

{t('profile.mergeBody', { name: pendingMerge.name, games: pendingMerge.games, friends: pendingMerge.friends })}

{t('profile.mergeIrreversible')}

{/if} {#if confirmUnlink} {@const cu = confirmUnlink} (confirmUnlink = null)}>

{t('profile.unlinkBody', { provider: cu.label })}

{/if} {#if deleting} {@const d = deleting} (deleting = null)}>

{t('profile.deleteWarn')}

{#if d.method === 'email'}

{t('profile.deleteEmailPrompt')}

{:else}

{t('profile.deletePhrasePrompt')}

{/if}
{/if}