{#each entries as entry} {@const address = entry.address} {@const expanded = toc.expandedMap.get(address) ?? false} {@const isLeaf = toc.leaves.has(address)} {#if isLeaf} onSectionFocused?.(address)} /> {:else} {@const childDepth = depth + 1} expanded, (open) => setEntryExpanded(address, open)} > {/if} {/each}