{#if isShowDeleteConfirmation} (isShowDeleteConfirmation = false)} onConfirm={() => handlePromiseError(trashOrDelete(true))} /> {/if} {#if showShortcuts} (showShortcuts = !showShortcuts)} /> {/if} {#if assets.length > 0} {#await geometry then geometry} {#each assets as asset, i} {@const top = geometry.getTop(i)} {@const left = geometry.getLeft(i)} {@const width = geometry.getWidth(i)} {@const height = geometry.getHeight(i)} { if (assetInteraction.selectionActive) { handleSelectAssets(asset); return; } void viewAssetHandler(asset); }} onSelect={(asset) => handleSelectAssets(asset)} onMouseEvent={() => assetMouseEventHandler(asset)} onIntersected={() => (i === Math.max(1, assets.length - 7) ? onIntersected?.() : void 0)} {showArchiveIcon} {asset} selected={assetInteraction.selectedAssets.has(asset)} selectionCandidate={assetInteraction.assetSelectionCandidates.has(asset)} thumbnailWidth={width} thumbnailHeight={height} /> {#if showAssetName} {asset.originalFileName} {/if} {/each} {/await} {/if} {#if $isViewerOpen} { assetViewingStore.showAssetViewer(false); handlePromiseError(navigate({ targetRoute: 'current', assetId: null })); }} /> {/if}