{#each categories as category, idx}
onCategoryChosen(category, idx)} class:active={idx === selectedIndex}> {#if category.icon}{/if} {category.name} {#if category.isCategory}{/if}
{/each}
(selectedIndex = null)} bind:this={popover} {anchor} align="left"> onComponentChosen(e.detail)} />