{#if loading}
{:else if error && !hunt}
{error}
{:else if hunt}

{hunt.title}

{#if myTeam} {#if items.length > 0}
{approved}/{items.length}
{/if} {/if}
{#if error}
{error}
{/if} {#if !myTeam}
{ e.preventDefault(); createTeam() }} class="flex gap-2">
{#if teams.length > 0}

Or join an existing team

{#each teams as team} {/each}
{/if}
{:else}
{#each statusFilters as f} {/each}
{#each filteredItems as item} {@const status = itemStatuses[item.id]} {:else}

No items match your filters

{/each}
{/if} {/if}
{#if teamMembersOpen && myTeam} {@const team = myTeam} {/if} {#if expandedPhoto} {@const photo = expandedPhoto} {/if} {#if selectedItem}

{selectedItem.name}

{selectedItem.points} points

{#if submitting} {:else}
{/if} {#if photosLoading} {:else if itemPhotos.filter(p => p.photoStatus !== 'REMOVED').length > 0}
{#each itemPhotos.filter(p => p.photoStatus !== 'REMOVED') as photo (photo.id)}

{photo.hunterName}

{#if photo.photoStatus === 'SUBMITTED' || photo.photoStatus === 'REJECTED'} {/if}
{/each}
{:else}

No photos submitted yet

{/if}
{/if}