{#if show_label} {/if} {#if value === null || _value === null || _value.length === 0} {:else} {#if selected_index !== null && allow_preview} {#if show_download_button} {/if} (selected_index = null)} /> {#if _value[selected_index].image.mime_type === "video/mp4"} {:else} handle_preview_click(event)} style="height: calc(100% - {_value[selected_index].caption ? '80px' : '60px'})" aria-label="detailed view of selected image" > {/if} {#if _value[selected_index]?.caption} {_value[selected_index].caption} {/if} {#each _value as media, i} (selected_index = i)} class="thumbnail-item thumbnail-small" class:selected={selected_index === i} aria-label={"Thumbnail " + (i + 1) + " of " + _value.length} > {#if media.image.mime_type === "video/mp4"} {/if} {/each} {/if}