import{f as s,t as a,k as l}from"./preload-helper-DadE4qT2.chunk.mjs";import{N as i}from"./NcEmptyContent-nvOtdNB6.chunk.mjs";import{I as r,n}from"./icons-CFZwNZD8.chunk.mjs";import{C as c,a as p}from"./CollectionsList-CiLe-XYk.chunk.mjs";import{H as m}from"./HeaderNavigation-DJYxed00.chunk.mjs";import{F as f}from"./FetchCollectionsMixin-Cpz_5SEM.chunk.mjs";import{B as h}from"./index-CTabiXQG.chunk.mjs";import"./createElementId-DhjFt1I9-B2HCdIOx.chunk.mjs";import"./video-BSG4kMCj.chunk.mjs";import"./index-BCevi9E9.chunk.mjs";import"./collectionFetcher-umd8irlb.chunk.mjs";import"./AbortControllerMixin-Bb5X6Yae.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:[f],computed:{places(){return this.$store.getters.places}},async beforeMount(){this.fetchPlaces()},methods:{fetchPlaces(){this.fetchCollections(h)},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-JmvRdLwN.chunk.mjs.map
