import{a as s,t as a,s as l}from"./dav-D-0Zsvk_.chunk.mjs";import{N as i}from"./NcEmptyContent-DEGDbAVb.chunk.mjs";import{I as r,n}from"./icons-D6kGtfXC.chunk.mjs";import{C as c,a as p}from"./CollectionsList-B_QnF7pj.chunk.mjs";import{H as m}from"./HeaderNavigation-BTqHkD3d.chunk.mjs";import{F as h}from"./FetchCollectionsMixin-4Ojl9P_h.chunk.mjs";import{w as f}from"./index-VDTWCae_.chunk.mjs";import"./NcLoadingIcon-Ctb4dpAr.chunk.mjs";import"./video-B2Zidy_E.chunk.mjs";import"./index-CxUc7fso.chunk.mjs";import"./collectionFetcher-BH3RSWlN.chunk.mjs";import"./AbortControllerMixin-C4cpCLeS.chunk.mjs";const u={name:"PlacesView",components:{ImageMultipleOutline:r,NcEmptyContent:i,CollectionsList:p,CollectionCover:c,HeaderNavigation:m},filters:{coverUrl(t){return t===-1?"":l(`/apps/photos/api/v1/preview/${t}?x=512&y=512`)}},mixins:[h],computed:{places(){return this.$store.getters.places}},async beforeMount(){this.fetchPlaces()},methods:{fetchPlaces(){this.fetchCollections(f)},t:a,n:s}};var d=function(){var t=this,e=t._self._c;return e("div",[e("CollectionsList",{staticClass:"places-list",attrs:{collections:t.places,loading:t.loadingCollections,error:t.errorFetchingCollections},scopedSlots:t._u([{key:"default",fn:function({collection:o}){return e("CollectionCover",{key:o.basename,attrs:{"parent-route":"/places","collection-name":o.basename,"alt-img":t.t("photos","Cover photo for place {placeName}",{placeName:o.basename}),"cover-url":t._f("coverUrl")(o.attributes["last-photo"])}},[e("span",{staticClass:"place__name"},[t._v(" "+t._s(o.basename)+" ")]),e("div",{staticClass:"place__details",attrs:{slot:"subtitle"},slot:"subtitle"},[t._v(" "+t._s(t.n("photos","%n item","%n photos and videos",o.attributes.nbItems))+" ")])])}}])},[e("HeaderNavigation",{key:"navigation",attrs:{slot:"header",loading:t.loadingCollections,title:t.t("photos","Places"),"root-title":t.t("photos","Places")},on:{refresh:t.fetchPlaces},slot:"header"}),e("NcEmptyContent",{attrs:{slot:"empty-collections-list",name:t.t("photos","There is no place yet!")},slot:"empty-collections-list"},[e("ImageMultipleOutline",{attrs:{slot:"icon"},slot:"icon"})],1)],1)],1)},v=[],C=n(u,d,v,!1,null,"6fbdde2a");const E=C.exports;export{E as default};
//# sourceMappingURL=PlacesView-BgUtYNjk.chunk.mjs.map
