{#if currentAccount} {#if accounts.viewingAs !== accounts.currentUser?.id}
{:else}
{/if}
{getAccountDisplayName(currentAccount)}
{:else if accounts.currentUser}
{getAccountDisplayName(accounts.currentUser)}
{/if}
{#if showDropdown}
{#if accounts.currentUser}
{m.account_my_account()}
switchToAccount(accounts.currentUser.id)} class="group relative flex w-full items-center gap-3 rounded-md px-3 py-2 text-left transition-colors hover:bg-theme-surface-hover" >
{getAccountDisplayName(accounts.currentUser)}
@{accounts.currentUser.username}
{#if accounts.viewingAs === accounts.currentUser.id}
{/if}
{/if} {#if accounts.sharedAccounts && accounts.sharedAccounts.length > 0}
{m.account_team_accounts()}
{#each accounts.sharedAccounts as shared} {#if shared.expand?.owner}
switchToAccount(shared.owner)} class="group relative flex w-full items-center gap-3 rounded-md px-3 py-2 text-left transition-colors hover:bg-theme-surface-hover" >
{getAccountDisplayName(shared.expand.owner)}
@{shared.expand.owner.username}
{m.account_team_member()}
{#if accounts.viewingAs === shared.owner}
{/if}
{/if} {/each}
{:else}
{m.account_no_team_accounts()}
{m.account_team_invite_info()}
{/if}
{m.account_add_account()}
{/if}