{#if app.profile?.isGuest}
{t('profile.guestLocked')}
{:else}
{t('friends.add')}
{t('friends.redeem')}
{#if code} {@const tg = shareLink(friendCodeParam(code.code))}
{code.code}
๐
{t('friends.codeHint')} ยท {t('friends.codeExpires', { time: codeTime(code.expiresAtUnix) })}
{#if tg}
shareInvite(tg)}>{t('friends.shareTelegram')}
{/if}
{:else}
{t('friends.getCode')}
{/if}
{#if incoming.length}
{t('friends.incoming')}
{#each incoming as r (r.accountId)}
{r.displayName}
respond(r.accountId, true)} disabled={!connection.online}>{t('friends.accept')}
respond(r.accountId, false)} disabled={!connection.online}>{t('friends.decline')}
{/each}
{/if}
{t('friends.yours')}
{#if friends.length} {#each friends as f (f.accountId)}
{f.displayName}
remove(f.accountId)} disabled={!connection.online}>{t('friends.unfriend')}
blockUser(f.accountId)} disabled={!connection.online}>{t('friends.block')}
{/each} {:else}
{t('friends.none')}
{/if}
{#if blocked.length || robotBlocks.length}
{t('friends.blockedList')}
{#each blocked as b (b.accountId)}
{b.displayName}
unblock(b.accountId)} disabled={!connection.online}>{t('friends.unblock')}
{/each} {#each robotBlocks as r (r.id)}
{r.displayName}
unblock(r.id)} disabled={!connection.online}>{t('friends.unblock')}
{/each}
{/if} {/if}