{#if expandedPhoto} {@const photo = expandedPhoto} {/if}

{hunt?.title ?? 'Photo Review'}

{#if error}
{error}
{/if} {#if loading} {:else}

{#if selectedItem} Filtering by item — tap again to see all unreviewed {:else} Unreviewed ({activeUnreviewed.length}) {/if}

{#each items as item} {/each}
{#if selectedItem} {#if photosLoading} {:else if activePhotos.length === 0}

No photos submitted for this item

{:else}
{#each activePhotos as photo (photo.id)}

{photo.hunterName} · {photo.teamName}

{parseUTC(photo.photoUploadDateTime).toLocaleString()}

{#if photo.photoStatus === 'SUBMITTED'}
{:else if photo.photoStatus === 'APPROVED'}
{:else if photo.photoStatus === 'REJECTED'}
{/if}
{/each}
{/if} {:else} {#if activeUnreviewed.length === 0}

All caught up — no unreviewed photos!

{:else}
{#each activeUnreviewed as photo (photo.id)}

{photo.itemName}

{photo.hunterName} · {photo.teamName}

{parseUTC(photo.photoUploadDateTime).toLocaleString()}

{/each}
{/if} {/if} {/if}