{#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} {#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!' : ''}" > {#if option.icon}
{/if} {@html option.label} {#if option.value == value}
{/if}
{/if} {/each}