{#each filteredGroups as group, groupIndex}
{group.name}
{#each group.actions as action, actionIndex}
{@const globalIndex =
filteredGroups
.slice(0, groupIndex)
.reduce((sum, g) => sum + g.actions.length, 0) + actionIndex}
{
if (action.href) {
togglePalette()
return
}
e.stopPropagation()
handleSelect(action)
}}
/>
{/each}
{/each}
{#if search != ''}
{$t('nav.commands.search', { default: '' })}
{/if}