{#if items && position}
{#each items as item, index} {#if item.separator}
{:else}
selected = index} on:mouseleave={() => selected = -1} on:click={() => click(item.fn)} > {item.label}
{/if} {/each}
{/if}