{#if commandPalleteOpen}
commandPalleteOpen = false} onkeydown={(e) => e.key === 'Escape' && (commandPalleteOpen = false)} role="button" tabindex="0">
{ e.stopPropagation(); }} onkeydown={(e) => { if (e.key === 'Escape') { commandPalleteOpen = false; } }} role="button" tabindex="0">
{'\ueca5'}
updateCalculatorState(e.detail)} /> {#if combinedResults.length > 0}
{#each combinedResults as result, i (result.id)} {@const isSelected = selectedIndex === (calculatorResult ? i + 1 : i)} {@const item = result.item}
{#if result.type === 'command'} {@const staticItem = item as StaticCommandItem}
{ staticItem.action(); commandPalleteOpen = false; }} >
{staticItem.icon}
{@html highlightMatch(staticItem.text, searchTerm, result.matches)}
{#if staticItem.keybindLabel}
{staticItem.keybindLabel}
{/if}
{:else if result.type === 'dynamic'} {@const dynamicItem = item as DynamicContentItem}
{ dynamicItem.action(); commandPalleteOpen = false; }} >
{dynamicItem.icon}
{@html highlightMatch(dynamicItem.text, searchTerm, result.matches)}
{dynamicItem.category}
{#if dynamicItem.content}
{@html highlightSnippet(dynamicItem.content, searchTerm, result.matches)}
{/if}
{/if}
{/each}
{:else if !calculatorResult}
{#if isLoading}
Searching...
{:else}
No matches found. Try something else.
{/if}
{/if}
{/if}