{#each blocks as block, index}
{block.type}
{#if activeLocale !== 'en'} {/if}
{#if getBlockIssues(index).length > 0}
    {#each getBlockIssues(index) as issue}
  • {issue.type === 'error' ? 'ERROR' : 'A11Y'}: {issue.message}
  • {/each}
{/if} {#if block.type === 'paragraph'}
{:else if block.type === 'heading'}
{:else if block.type === 'media'} {#if block.data.media_id && block.data.filename}
setFocalPoint(index, e)} onkeydown={(e) => e.key === 'Enter' && setFocalPoint(index, e)} role="button" tabindex="0" aria-label="Set focal point for image"> {block.data.filename}
Click to set Focal Point: {Number(block.data['fp-x'] || 0.5).toFixed(2)}, {Number(block.data['fp-y'] || 0.5).toFixed(2)}
{block.data.filename}
{#if block.data.showAdvanced}
{/if}
{:else}
onOpenMediaPicker(index)} onkeydown={(e) => e.key === 'Enter' && onOpenMediaPicker(index)} role="button" tabindex="0" style="cursor: pointer;">
No media selected. Click to select.
{/if} {:else if block.type === 'columns'}
Columns Layout
{#each block.data.columns || [] as column, colIndex}
Col {colIndex + 1} removeSlot(block, 'columns', colIndex)} onkeydown={(e) => e.key === 'Enter' && removeSlot(block, 'columns', colIndex)} role="button" tabindex="0" aria-label="Remove Column">
removeSubBlock(block, 'columns', colIndex, i)} onMoveBlock={(i, dir) => { /* TODO */ }} {onOpenMediaPicker} {onUpdateBlockText} {setFocalPoint} />
{/each}
{:else if block.type === 'grid'}
Grid Layout
{#each block.data.items || [] as item, itemIndex}
Item {itemIndex + 1} removeSlot(block, 'grid', itemIndex)} onkeydown={(e) => e.key === 'Enter' && removeSlot(block, 'grid', itemIndex)} role="button" tabindex="0" aria-label="Remove Grid Item">
removeSubBlock(block, 'grid', itemIndex, i)} onMoveBlock={(i, dir) => { /* TODO */ }} {onOpenMediaPicker} {onUpdateBlockText} {setFocalPoint} />
{/each}
{/if}
{/each}