{#snippet child({ props })} {@render logo()} {/snippet} {#if navigation?.anchors?.length} {#each navigation.anchors as anchor (anchor.title + anchor.href)} {@const isExternal = !anchor.href.startsWith("/")} {#snippet child({ props })} {anchor.title} {/snippet} {/each} {/if} {#if navigation?.sections} {#each navigation.sections as section, i (section.title)} {#if section.title} {@render GroupSection({ section, isLast: i === navigation.sections.length - 1, })} {:else} {@render SectionMenu({ section })} {/if} {/each} {/if} {#snippet SectionMenu({ section }: { section: SidebarNavSection })} {#each section.items as subItem (subItem.title)} {@const isActive = subItem.href === $page.url.pathname} {#snippet child({ props })} {subItem.title} {/snippet} {/each} {/snippet} {#snippet GroupSection({ section, isLast = true, }: { section: SidebarNavSection; isLast?: boolean; })} {section.title} {@render SectionMenu({ section })} {#if !isLast} {/if} {/snippet}