{#if customLabel || label}
{@render customLabel?.()}
{/if}
{#snippet target()}
{ e.preventDefault() }} onkeypress={e => { e.preventDefault() open = !open }} {onchange} {oncontextmenu} {placeholder} > {#if placeholder}
{placeholder}
{/if} {@render children?.()}
{/snippet} {#each context.options as option (option)} {#if customOption}{@render customOption({ option, selected: option.value == value, })}{:else}
{ value = option.value await tick() element?.dispatchEvent(new Event('change', { bubbles: true })) }} size="custom" disabled={option.disabled} class={[ 'min-h-0! py-[5px]!', option.value == value && 'bg-slate-100! dark:bg-zinc-800! text-primary-900 dark:text-primary-100 font-medium!', ]} > {#if option.value == value}
{:else if option.icon}
{/if} {@html option.label}
{/if} {/each}