{#if show_label} {/if} {#if value == null || resolved_value == null || resolved_value.length === 0} {:else} {#if selected_image && allow_preview} {#if show_download_button} { const image = selected_image?.image; if (image == null) { return; } const { url, orig_name } = image; if (url) { download(url, orig_name ?? "image"); } }} /> {/if} (selected_index = null)} /> handle_preview_click(event)} style="height: calc(100% - {selected_image.caption ? '80px' : '60px'})" aria-label="detailed view of selected image" > {#if selected_image?.caption} {selected_image.caption} {/if} {#each resolved_value as image, i} (selected_index = i)} class="thumbnail-item thumbnail-small" class:selected={selected_index === i} aria-label={"Thumbnail " + (i + 1) + " of " + resolved_value.length} > {/each} {/if}