{#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} color="none" class={[ 'min-h-0! py-[5px]! hover:bg-slate-100 dark:hover:bg-zinc-800', option.value == value && 'bg-slate-100 dark:bg-zinc-800 text-primary-900 dark:text-primary-100 font-medium', option.disabled && 'pointer-events-none text-slate-600 dark:text-zinc-400', option.isLabel && 'text-xs mt-2', ]} > {#if option.value == value}
{:else if option.icon}
{/if} {@html option.label}
{/if} {/each}