dispatch('changeContent')}>
{#if sourceFunc !== undefined}
{ keyDown(event, 0) }} on:mouseover={() => { elements[0]?.focus() }} label={sourceFunc.label} props={{ availableFunctions: reduceFuncs, onSelect: onSourceFunctionSelect }} options={{ component: plugin.component.FunctionSelector }} withHover />
{/if} {#if availableFunctions.length > 0 || functionsLength > 0} {#each funcs as f, i} {#if reduceFuncs.includes(f._id)}
{ keyDown(event, i + (sourceFunc !== undefined ? 1 : 0)) }} on:mouseover={() => { elements[i + (sourceFunc !== undefined ? 1 : 0)]?.focus() }} label={f.label} props={{ availableFunctions: reduceFuncs, onSelect: getFunctionChange(i) }} options={{ component: plugin.component.FunctionSelector }} withHover /> {:else}
{ keyDown(event, i + (sourceFunc !== undefined ? 1 : 0)) }} on:mouseover={() => { elements[i + (sourceFunc !== undefined ? 1 : 0)]?.focus() }} >
{#if f.editor}
{ onConfigure(e, f, i) }} /> {/if}
{ onFunctionRemove(i) }} />
{/if} {/each} {#if availableFunctions.length > 0}
{ keyDown(event, functionButtonIndex) }} on:mouseover={() => { elements[functionButtonIndex]?.focus() }} label={plugin.string.Functions} props={{ availableFunctions, onSelect: onFunctionSelect }} options={{ component: plugin.component.FunctionSelector }} withHover /> {/if} {/if}
{ keyDown(event, functionButtonIndex + 1) }} on:mouseover={() => { elements[functionButtonIndex + 1]?.focus() }} on:click={onFallbackChange} class="menu-item flex-gap-2 fallback" >
{#if contextValue.fallbackValue !== undefined}
{ keyDown(event, functionButtonIndex + 2) }} on:mouseover={() => { elements[functionButtonIndex + 2]?.focus() }} on:click={onFallback} class="menu-item" >
{/if}