import{t as o}from"./preload-helper-DadE4qT2.chunk.mjs";import{j as l,B as a,A as i}from"./index-CP7j5eJN.chunk.mjs";import{N as s}from"./NcEmptyContent--pYG7aSD.chunk.mjs";import{d as n,P as c,n as r}from"./icons-CFZwNZD8.chunk.mjs";import{C as p}from"./CollectionContent-uIeEiRiC.chunk.mjs";import{H as m}from"./HeaderNavigation-Cu2amRo_.chunk.mjs";import{F as h}from"./FetchCollectionContentMixin-DSU7ZVUJ.chunk.mjs";import"./index-BCevi9E9.chunk.mjs";import"./createElementId-DhjFt1I9-B2HCdIOx.chunk.mjs";import"./FileComponent-CeO_wawf.chunk.mjs";import"./NcCheckboxRadioSwitch-DAPHFb0L-BhQ4Gz0m.chunk.mjs";import"./useModelMigration-EhAWvqDD-Zhby4giX.chunk.mjs";import"./FilesSelectionMixin-DCdPp1le.chunk.mjs";import"./fileFetcher-Dgdh_mFl.chunk.mjs";import"./collectionFetcher-DqB9azet.chunk.mjs";import"./AbortControllerMixin-Bb5X6Yae.chunk.mjs";const d={name:"PlaceContent",components:{Plus:c,ImagePlusOutline:n,NcEmptyContent:s,NcButton:l,CollectionContent:p,HeaderNavigation:m},mixins:[h],props:{placeName:{type:String,default:"/"}},setup(){return{isMobile:i()}},data(){return{showAddPhotosModal:!1,loadingCollection:!1,errorFetchingCollection:null,loadingCount:0,loadingAddFilesToPlace:!1}},computed:{place(){return this.$store.getters.getPlace(this.placeName)},placeFileName(){return`${a}/${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 u=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",variant:"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)},f=[],g=r(d,u,f,!1,null,"30000657");const E=g.exports;export{E as default};
//# sourceMappingURL=PlaceContent-D5BxJAve.chunk.mjs.map
