{#if combinedData && combinedData.length > 0}
{#each boxNumbers as boxNumber}

Box {boxNumber}

{#each combinedData as { pokedexEntry, catchRecord }} {@const placement = showForms ? pokedexEntry.boxPlacementForms : pokedexEntry.boxPlacement} {#if placement.box === boxNumber} {/if} {/each}
{/each}
{:else if failedToLoad} {#if creatingRecords && totalRecordsCreated > 0}

Processed {totalRecordsCreated} Pokédex entries so far...

Please be patient, this may take some time.

{:else if creatingRecords}

Processing...

Please be patient, this may take some time.

{:else}

Failed to load

If you're seeing this, you probably haven't created your Pokédex data yet. Please do so by clicking this button.

{/if} {:else}

Loading Pokédex

{/if}