{#each items as tab, i (tab.id)} {@const isSelected = selected === tab.id} {@const Glyph = tab.icon} {#if Glyph} {/if} {tab.label} {#if !vertical} {tab.label} {/if} {#if tab.count !== undefined} {#if typeof tab.count === "object" && tab.count !== null && "then" in tab.count} {#snippet skeleton()} {/snippet} {@const count = await tab.count} {#if count} {formatCount(count)} {/if} {:else if tab.count} {formatCount(tab.count)} {/if} {/if} {/each}