import{t as o}from"./vue.runtime.esm-Ct3_M7aQ.chunk.mjs";import{u as l}from"./video-B-t_GSGv.chunk.mjs";import{N as a,af as i}from"./index-BMeBqg0T.chunk.mjs";import{N as s}from"./NcEmptyContent-C3BLUUdi.chunk.mjs";import{w as n,P as c,n as r}from"./icons-VGG7keIQ.chunk.mjs";import{C as p}from"./CollectionContent-CBmY9D-J.chunk.mjs";import{H as m}from"./HeaderNavigation-Drss-bOM.chunk.mjs";import{F as h}from"./FetchCollectionContentMixin-BXizDLoQ.chunk.mjs";import"./preload-helper-Dh9HmuEY.chunk.mjs";import"./index-XmYygNaN.chunk.mjs";import"./FileComponent-Z0cvFFM3.chunk.mjs";import"./NcCheckboxRadioSwitch-VeztTzpz-CXqdOpK4.chunk.mjs";import"./useModelMigration-EhAWvqDD-wVDp4GUR.chunk.mjs";import"./FilesSelectionMixin-JLsUiKnU.chunk.mjs";import"./fileFetcher-EOUUgMjG.chunk.mjs";import"./collectionFetcher-Bc_5r3B7.chunk.mjs";import"./AbortControllerMixin-KqbYNBDv.chunk.mjs";const d={name:"PlaceContent",components:{Plus:c,ImagePlusOutline:n,NcEmptyContent:s,NcButton:a,CollectionContent:p,HeaderNavigation:m},mixins:[h],props:{placeName:{type:String,default:"/"}},setup(){return{isMobile:l()}},data(){return{showAddPhotosModal:!1,loadingCollection:!1,errorFetchingCollection:null,loadingCount:0,loadingAddFilesToPlace:!1}},computed:{place(){return this.$store.getters.getPlace(this.placeName)},placeFileName(){return`${i}/${this.placeName}`},placeFileIds(){return this.$store.getters.getPlaceFiles(this.placeName)}},async beforeMount(){await this.fetchPlace(),await this.fetchPlaceFiles()},methods:{async fetchPlace(){this.fetchCollection(this.placeFileName)},async fetchPlaceFiles(){this.fetchCollectionFiles(this.placeFileName)},t:o}};var f=function(){var t=this,e=t._self._c;return e("div",[e("CollectionContent",{ref:"collectionContent",attrs:{collection:t.place,"collection-file-ids":t.placeFileIds,"allow-selection":!1,loading:t.loadingCollection||t.loadingCollectionFiles,error:t.errorFetchingCollection||t.errorFetchingCollectionFiles}},[t.place!==null?e("HeaderNavigation",{key:"navigation",attrs:{slot:"header",loading:t.loadingCollection||t.loadingCollectionFiles,params:{placeName:t.placeName},path:"/"+t.placeName,title:t.place.basename},on:{refresh:t.fetchPlaceFiles},slot:"header"}):t._e(),e("NcEmptyContent",{staticClass:"place__empty",attrs:{slot:"empty-content",name:t.t("photos","This place does not have any photos or videos yet!")},slot:"empty-content"},[e("ImagePlusOutline",{attrs:{slot:"icon"},slot:"icon"}),e("NcButton",{attrs:{slot:"action",type:"primary","aria-label":t.t("photos","Add photos to this place")},on:{click:function(C){t.showAddPhotosModal=!0}},slot:"action"},[e("Plus",{attrs:{slot:"icon"},slot:"icon"}),t._v(" "+t._s(t.t("photos","Add"))+" ")],1)],1)],1)],1)},u=[],g=r(d,f,u,!1,null,"1f6e89f3");const O=g.exports;export{O as default};
//# sourceMappingURL=PlaceContent-DakubhCU.chunk.mjs.map
