{#if descriptionHtml}
{@html descriptionHtml}
{/if} {#if withUrl.length === 0}
{t(T.image_gallery_empty)}
{:else if block.variant === "grid"}
{#each withUrl as item, i} {@const label = imageLabel(item.img)}
openModal(i)} aria-label={label || `Bild ${i + 1}`} >
{#if label}
{label}
{/if}
{/each}
{#if modalOpen} {@const cur = withUrl[modalIndex]} {@const curLabel = imageLabel(cur.img)}
e.stopPropagation()} role="presentation" >
{#if curLabel}
{curLabel}
{/if} {#if withUrl.length > 1}
{modalIndex + 1} / {withUrl.length}
{/if}
Download
{#if withUrl.length > 1}
{/if}
{/if} {:else if withUrl.length === 1}
{#if withUrl[0].img.description}
{withUrl[0].img.description}
{/if}
{:else}
{#key currentIndex} {@const current = withUrl[currentIndex]}
{#if current.img.description}
{current.img.description}
{/if}
{/key}
{#each withUrl as _, i}
(currentIndex = i)} >
{/each}
{/if}