e.preventDefault()}
+ ondrop={onDrop}
+ onclick={() => fileInput?.click()}
+ role="button"
+ tabindex="0"
+ onkeydown={(e) => {
+ if (e.key === 'Enter' || e.key === ' ') {
+ e.preventDefault();
+ fileInput?.click();
+ }
+ }}
+ >
+
{t('import.csv_dropzone')}
+
{t('import.csv_dropzone_hint')}
+
+
+ {t('import.preview_found')}
+ {fileName}:
+
+
+ -
+ {parsedCards.length === 1
+ ? t('import.preview_cards_one')
+ : t('import.preview_cards', { n: parsedCards.length })}
+ {#if parsedCards.length > 0}
+
+ {t('import.preview_breakdown', {
+ basic: typeBreakdown.basic,
+ basic_reverse: typeBreakdown.basicReverse,
+ cloze: typeBreakdown.cloze,
+ })}
+
+ {/if}
+
+ {#if skipped > 0}
+ - {t('import.preview_skipped', { n: skipped })}
+ {/if}
+
+
+ {#if warnings.length > 0}
+
+ {t('import.preview_warnings', { n: warnings.length })}
+
+ {#each warnings.slice(0, 10) as w (w)}- {w}
{/each}
+
+
+ {/if}
+
+
+
+
+
+
+
+
+ {t('import.stage_cards', { current: progress.current, total: progress.total })}
+
+
+
+ {t('import.csv_done_summary', { cards: result.cardsCreated, deck: deckName })}
+
+ {#if result.cardsSkippedDuplicate > 0}
+
+ {t('import.done_dupes', { n: result.cardsSkippedDuplicate })}
+
+ {/if}
+ {#if result.failed > 0}
+
+ {t('import.done_failures', { n: result.failed })}
+
+ {#each result.failures.slice(0, 20) as msg (msg)}- {msg}
{/each}
+
+
+ {/if}
+
+
+
{t('import.error_label', { msg: error ?? '?' })}
+
+