{$t('edit_faces')}

{#if !isShowLoadingDone} {:else} {/if}
{#if isShowLoadingPeople}
{:else} {#each peopleWithFaces as face, index (face.id)} {@const personName = face.person ? face.person?.name : $t('face_unassigned')}
($boundingBoxesArray = [peopleWithFaces[index]])} onmouseover={() => ($boundingBoxesArray = [peopleWithFaces[index]])} onmouseleave={() => ($boundingBoxesArray = [])} >
{#if selectedPersonToCreate[face.id]} {:else if selectedPersonToReassign[face.id]}
{#if !selectedPersonToCreate[face.id]}

{#if selectedPersonToReassign[face.id]?.id} {selectedPersonToReassign[face.id]?.name} {:else} {personName} {/if}

{/if}
{#if selectedPersonToCreate[face.id] || selectedPersonToReassign[face.id]} handleReset(face.id)} /> {:else} handleFacePicker(face)} /> {/if}
{#if !selectedPersonToCreate[face.id] && !selectedPersonToReassign[face.id] && !face.person}
{/if}
{#if face.person != null}
deleteAssetFace(face)} />
{/if}
{/each} {/if}
{#if showSelectedFaces && editedFace} (showSelectedFaces = false)} onCreatePerson={handleCreatePerson} onReassign={handleReassignFace} /> {/if}