import{h as a,t as i}from"./preload-helper-BKveOr2o.chunk.mjs";import{L as c}from"./video-CODLAaTx.chunk.mjs";import{N as r}from"./NcEmptyContent-Bix1E0zN.chunk.mjs";import{z as l}from"./index-B1ja0bGP.chunk.mjs";import{l as u,n,g as m}from"./icons-DBfG8RnV.chunk.mjs";import{F as o,a as d,b as f}from"./FaceCover-BNaRNaUe.chunk.mjs";import"./index-BT3E1rl9.chunk.mjs";import"./createElementId-DhjFt1I9-B2HCdIOx.chunk.mjs";import"./AbortControllerMixin-NVr2Cd4D.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-B682pxli.chunk.mjs.map
