{#if selectedItems.length > 0}
{#each selectedItems as item}
{#if item.icon}
{/if}
{item.label}
removeItem(item.value)}>×
{/each}
{/if}
{(values || []).length === 0 ? placeholder : `${(values || []).length} selected`}
{#if open}
{(values || []).length}/{items.length}
ESC
{#if filtered.length === 0}
No matches
{:else} {#each filtered as item, i} {@const checked = (values || []).includes(item.value)}
toggleItem(item)} onmouseenter={() => highlightIdx = i} type="button" >
{#if item.icon}
{/if}
{item.label}
{#if item.desc}
{item.desc}
{/if}
{/each} {/if}
{/if}