import{t as o}from"./dav-D-0Zsvk_.chunk.mjs";import{N as l,w as a,v as i}from"./index-VDTWCae_.chunk.mjs";import{N as s}from"./NcEmptyContent-DEGDbAVb.chunk.mjs";import{d as n,P as c,n as r}from"./icons-D6kGtfXC.chunk.mjs";import{C as p}from"./CollectionContent-DKZl05u2.chunk.mjs";import{H as m}from"./HeaderNavigation-BTqHkD3d.chunk.mjs";import{F as h}from"./FetchCollectionContentMixin-DeRSEkiD.chunk.mjs";import"./NcLoadingIcon-Ctb4dpAr.chunk.mjs";import"./FileComponent-Cj4I5Fin.chunk.mjs";import"./NcCheckboxRadioSwitch-Ddl_QlRN-Cj43obgd.chunk.mjs";import"./NcIconToggleSwitch-DCTeQGv5-FeLJtWqi.chunk.mjs";import"./useModelMigration-EhAWvqDD-DCXJrerl.chunk.mjs";import"./GenRandomId-F5ebeBB_-DI-yuh7g.chunk.mjs";import"./FilesSelectionMixin-BmUiWId5.chunk.mjs";import"./fileFetcher-DkTW0h4J.chunk.mjs";import"./collectionFetcher-BH3RSWlN.chunk.mjs";import"./AbortControllerMixin-C4cpCLeS.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 O=g.exports;export{O as default};
//# sourceMappingURL=PlaceContent-DacZb4Rc.chunk.mjs.map
