{#if auth.user}
(dashHover = true)} onmouseleave={() => (dashHover = false)} >
{#each nav as item} {@const Icon = item.icon} {#if item.submenu}
{:else}
item.href === '/dashboard' && (dashHover = true)} onmouseleave={() => item.href === '/dashboard' && (dashHover = false)} >
{item.label}
{/if} {/each}
{auth.user.name || auth.user.email}
connection.check()} tooltip={connection.online ? 'Verbindung steht' : 'Keine Verbindung zum Server — hier klicken, um erneut zu versuchen'} > {#if connection.online}
{:else}
{/if}
{#if mode.current === 'dark'}
{:else}
{/if}
(isMobileMenuOpen = !isMobileMenuOpen)} tooltip="Menü" > {#if isMobileMenuOpen}
{:else}
{/if}
{#if isMobileMenuOpen}
{#each nav as item} {@const Icon = item.icon}
(isMobileMenuOpen = false)} class="w-full {navClass(item.href)}" >
{item.label}
{#if item.submenu}
{#each teams.records as t (t.id)}
{ teams.setActive(t.id) isMobileMenuOpen = false }} class="flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors hover:bg-accent {t.id === teams.activeId ? 'font-medium text-foreground' : 'text-muted-foreground'}" >
{t.name}
{#if t.id === teams.activeId}
aktiv
{/if}
{/each}
{ isMobileMenuOpen = false createTeamDialog = true }} class="flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm text-muted-foreground transition-colors hover:bg-accent" >
Team erstellen
{/if} {/each}
{auth.user.name || auth.user.email}
{#if mode.current === 'dark'}
{:else}
{/if}
{/if}
{@render children?.()}
{/if}