"use strict";(self.webpackChunktainacan=self.webpackChunktainacan||[]).push([[691],{88857(t,o,e){e.d(o,{A:()=>r});var n=e(40834);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function c(t,o){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);o&&(n=n.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),e.push.apply(e,n)}return e}function l(t){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?c(Object(e),!0).forEach((function(o){a(t,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):c(Object(e)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))}))}return t}function a(t,o,e){return(o=function(t){var o=function(t,o){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,o||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(t,"string");return"symbol"==i(o)?o:o+""}(o))in t?Object.defineProperty(t,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[o]=e,t}const r={name:"CollectionPage",data:function(){return{collectionId:[String,Number],isLoadingCollectionBasics:Boolean}},computed:l({},(0,n.L8)("collection",{collection:"getCollection"})),watch:{$route:{handler:function(t,o){var e=this;this.isRepositoryLevel||null==o||null==o.path||t.path==o.path||(this.collectionId!=this.$route.params.collectionId?(this.isLoadingCollectionBasics=!0,this.collectionId=Number(this.$route.params.collectionId),this.fetchCollectionBasics({collectionId:this.collectionId,isContextEdit:!0}).then((function(){wp.hooks.doAction("tainacan_navigation_path_updated",{currentRoute:t,adminOptions:e.$adminOptions,collection:e.collection,parentEntity:{rootLink:"collections",name:e.collection.name,defaultLink:"collections/".concat(e.collectionId,"/items"),label:e.$i18n.get("collections")}}),e.isLoadingCollectionBasics=!1,e.$routerHelper.appendToPageTitle(e.collection.name)})).catch((function(t){e.$console.error(t),e.isLoadingCollectionBasics=!1}))):(this.$routerHelper.appendToPageTitle(this.collection.name),wp.hooks.doAction("tainacan_navigation_path_updated",{currentRoute:t,adminOptions:this.$adminOptions,collection:this.collection,parentEntity:{rootLink:"collections",name:this.collection.name,defaultLink:"collections/".concat(this.collectionId,"/items"),label:this.$i18n.get("collections")}})))},deep:!0}},created:function(){var t=this;this.collectionId=Number(this.$route.params.collectionId),this.$eventBusSearch.setCollectionId(this.collectionId),this.fetchCollectionBasics({collectionId:this.collectionId,isContextEdit:!0}).then((function(){wp.hooks.doAction("tainacan_navigation_path_updated",{currentRoute:t.$route,adminOptions:t.$adminOptions,collection:t.collection,parentEntity:{rootLink:"collections",name:t.collection?t.collection.name:"",defaultLink:"collections/".concat(t.collectionId,"/items"),label:t.$i18n.get("collections")}}),t.isLoadingCollectionBasics=!1,t.$routerHelper.appendToPageTitle(t.collection.name)})).catch((function(o){t.$console.error(o),t.isLoadingCollectionBasics=!1}))},methods:l({},(0,n.i0)("collection",["fetchCollectionBasics"]))}},6895(t,o,e){e.d(o,{X:()=>i});var n=e(6934);function i(t,o,e,i,c,l){var a=(0,n.g2)("router-view");return(0,n.uX)(),(0,n.Wv)(a,{id:"collection-page-container",key:t.$route.query.authorid,"collection-id":c.collectionId,class:(0,n.C4)(["page-container is-secondary-content",{"is-loading-collection-basics":c.isLoadingCollectionBasics,"tainacan-admin-collection-item-edition-mode":t.$adminOptions.itemEditionMode,"tainacan-admin-collection-mobile-app-mode":t.$adminOptions.mobileAppMode}])},null,8,["collection-id","class"])}},13912(t,o,e){e.d(o,{A:()=>a});var n=e(31601),i=e.n(n),c=e(76314),l=e.n(c)()(i());l.push([t.id,"#collection-page-container.is-loading-collection-basics .section{display:none}",""]);const a=l},76671(t,o,e){var n=e(85072),i=e.n(n),c=e(97825),l=e.n(c),a=e(77659),r=e.n(a),s=e(55056),d=e.n(s),u=e(10540),p=e.n(u),m=e(63494),h=e.n(m),f=e(13912),b={};b.styleTagTransform=h(),b.setAttributes=d(),b.insert=r().bind(null,"head"),b.domAPI=l(),b.insertStyleElement=p();i()(f.A,b),f.A&&f.A.locals&&f.A.locals},80691(t,o,e){e.r(o),e.d(o,{default:()=>c});var n=e(51206),i=e(56708);e(36380);const c=(0,e(66262).A)(i.A,[["render",n.X]])},56708(t,o,e){e.d(o,{A:()=>n.A});var n=e(88857)},51206(t,o,e){e.d(o,{X:()=>n.X});var n=e(6895)},36380(t,o,e){e(76671)}}]);