{ dispatch('changeContent') }} on:keydown={keyDown} >
{#if actions.length === 0}
{/if} {#each actions as action, i} {#if i > 0 && actions[i - 1].group !== action.group}
{/if} {#if action.link}
{ if (btns[i] !== activeElement) focusTarget(action, btns[i]) }} on:click|preventDefault|stopPropagation={(evt) => { if (!action.inline) dispatch('close') action.action(ctx, evt) }} > {#if action.icon}
{/if}
{:else if action.component !== undefined && !action.isSubmenuRightClicking}
{ if (btns[i] !== activeElement) focusTarget(action, btns[i]) }} on:click={() => focusTarget(action, btns[i])} > {#if action.icon}
{/if}
{:else}
{ if (btns[i] !== activeElement) focusTarget(action, btns[i], action.isSubmenuRightClicking) }} on:click={(evt) => { if (!action.inline) dispatch('close') action.action(ctx, evt) }} on:contextmenu={(evt) => { if (action.component) { evt.preventDefault() showActionPopup(action, btns[i]) } }} > {#if action.icon}
{/if}
{/if} {/each}