import{f as a,t as i}from"./preload-helper-DadE4qT2.chunk.mjs";import{L as c}from"./video-eu9Y2O-I.chunk.mjs";import{N as r}from"./NcEmptyContent-D03x2I6w.chunk.mjs";import{x as l}from"./index-Dgdobvu3.chunk.mjs";import{m as u,n,h as m}from"./icons-CFZwNZD8.chunk.mjs";import{F as o,a as d,b as f}from"./FaceCover-y62LmE3b.chunk.mjs";import"./index-BCevi9E9.chunk.mjs";import"./createElementId-DhjFt1I9-B2HCdIOx.chunk.mjs";import"./AbortControllerMixin-Bb5X6Yae.chunk.mjs";const p={name:"UnassignedFacesCover",components:{AccountOffOutlineIcon:u},mixins:[o,d],props:{small:{type:Boolean,default:!1}},computed:{unassignedFilesCount(){return this.$store.state.faces.unassignedFilesCount},colorMainBackground(){return getComputedStyle(document.documentElement).getPropertyValue("--color-main-background")}},async mounted(){await this.fetchUnassignedFacesCount()},methods:{n:a}};var h=function(){var e=this,s=e._self._c;return s("div",{staticClass:"face-cover",class:[e.small&&"face-cover--small"],on:{click:function(t){return e.$emit("click")}}},[s("div",{staticClass:"face-cover__crop-container"},[s("AccountOffOutlineIcon",{attrs:{size:128,"fill-color":e.colorMainBackground}})],1),s("div",{staticClass:"face-cover__details"},[e.small?e._e():s("div",{staticClass:"face-cover__details__second-line"},[e._v(" "+e._s(e.n("photos","%n unassigned photo","%n unassigned photos",e.unassignedFilesCount))+" ")])])])},g=[],_=n(p,h,g,!1,null,"80561ccf");const F=_.exports,v={name:"FacesView",components:{UnassignedFacesCover:F,FaceCover:f,NcEmptyContent:r,NcLoadingIcon:l,RouterLink:c,AccountBoxMultipleOutline:m},mixins:[o],computed:{facesFiles(){return this.$store.state.faces.facesFiles},unassignedFilesCount(){return this.$store.state.faces.unassignedFilesCount},noFaces(){return Object.keys(this.faces).length===0},orderedFaces(){return Object.values(this.faces).sort((e,s)=>e.attributes.nbItems&&s.attributes.nbItems?s.attributes.nbItems-e.attributes.nbItems:!this.facesFiles[s.basename]||!this.facesFiles[e.basename]?0:this.facesFiles[s.basename].length-this.facesFiles[e.basename].length)}},methods:{t:i}};var C=function(){var e=this,s=e._self._c;return e.errorFetchingFaces?s("NcEmptyContent",[e._v(" "+e._s(e.t("photos","An error occurred"))+" ")]):s("div",{staticClass:"faces"},[e.loadingFaces?s("NcLoadingIcon"):e._e(),e.noFaces&&!e.loadingFaces?s("div",{staticClass:"faces__empty"},[s("NcEmptyContent",{staticClass:"empty-content-with-illustration",scopedSlots:e._u([{key:"icon",fn:function(){return[s("AccountBoxMultipleOutline")]},proxy:!0},{key:"desc",fn:function(){return[e._v(" "+e._s(e.t("photos","This might take some time depending on the size of your photo library."))+" ")]},proxy:!0}],null,!1,149048332)},[e._v(" "+e._s(e.t("photos","Recognized people will show up here"))+" ")])],1):e.noFaces?e._e():s("div",{staticClass:"faces__list"},[e._l(e.orderedFaces,function(t){return s("RouterLink",{key:t.basename,attrs:{to:`/faces/${encodeURIComponent(t.basename)}`}},[s("FaceCover",{attrs:{"base-name":t.basename}})],1)}),s("RouterLink",{key:"unassigned",attrs:{to:"/faces/unassigned"}},[s("UnassignedFacesCover")],1)],2)],1)},b=[],y=n(v,C,b,!1,null,"d27b108f");const B=y.exports;export{B as default}; //# sourceMappingURL=FacesView-5rYPf97C.chunk.mjs.map