import{a as o,t as c}from"./dav-D-0Zsvk_.chunk.mjs";import{L as i}from"./video-B2Zidy_E.chunk.mjs";import{N as r}from"./NcEmptyContent-DEGDbAVb.chunk.mjs";import{N as l}from"./NcLoadingIcon-Ctb4dpAr.chunk.mjs";import{l as u,n as a,g as m}from"./icons-D6kGtfXC.chunk.mjs";import{F as n,a as d,b as f}from"./FaceCover-DcHUIt6C.chunk.mjs";import"./index-CxUc7fso.chunk.mjs";import"./index-VDTWCae_.chunk.mjs";import"./he-e5ANWCY1.chunk.mjs";import"./AbortControllerMixin-C4cpCLeS.chunk.mjs";const p={name:"UnassignedFacesCover",components:{AccountOffOutlineIcon:u},mixins:[n,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:o}};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=[],_=a(p,h,g,!1,null,"80561ccf");const F=_.exports,v={name:"FacesView",components:{UnassignedFacesCover:F,FaceCover:f,NcEmptyContent:r,NcLoadingIcon:l,RouterLink:i,AccountBoxMultipleOutline:m},mixins:[n],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:c}};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:{"data-test":"face","data-test-face-name":t.basename,to:`/faces/${encodeURIComponent(t.basename)}`}},[s("FaceCover",{attrs:{"base-name":t.basename}})],1)}),s("RouterLink",{key:"unassigned",attrs:{"data-test":"unassigned-faces",to:"/faces/unassigned"}},[s("UnassignedFacesCover")],1)],2)],1)},b=[],y=a(v,C,b,!1,null,"8ead7f9f");const R=y.exports;export{R as default};
//# sourceMappingURL=FacesView-Bn00UnLH.chunk.mjs.map
