(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{224:function(t,e,s){"use strict";s.r(e);var n=s(32),o=s(0),i=s(221),a=s(3).a.extend({components:{dashboardPage:i.g},data:()=>({loading:!0,sending:!1}),metaInfo(){return{title:this.postTypeLabel}},computed:{postIndex(){return Object(o.C)(this.postType)||[]},getPostTypeConfig(){return Object(o.k)(this.postType)},templateLoader(){const{listTemplate:t}=this.getPostTypeConfig;return t||(()=>s.e(55).then(s.bind(null,754)))},postType(){return this.$route.params.postType||""},postTypeLabel(){return this.getPostTypeConfig.namePlural},postsMeta(){return this.postIndex&&this.postIndex.meta?this.postIndex.meta:{}},posts(){return this.postIndex&&this.postIndex.posts?this.postIndex.posts:[]},filters(){const t=this.postType,{page:e=1,status:s,category:n,tag:o,role:i}=this.$route.query;return{postType:t,page:e,status:s,category:n,tag:o,role:i}}},watch:{$route:function(){this.setPosts()}},mounted(){this.setPosts(),Object(o.r)("refresh-table",()=>{this.setPosts()})},methods:{async runPostAction({action:t,selected:e}){this.sending=!0,e.length>0&&("delete"==t?confirm("Are you sure? This will permanently delete the selected posts.")&&await Object(n.d)({_ids:e,postType:this.postType}):await Object(n.i)({_ids:e,data:{status:t},postType:this.postType}),this.setPosts()),this.sending=!1},async setPosts(){this.loading=!0,await Object(n.e)(this.filters),this.loading=!1}}}),r=(s(672),s(531)),p=Object(r.a)(a,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("dashboard-page",{key:t.postType,staticClass:"posts-dashboard"},[s(t.templateLoader,{tag:"component",attrs:{list:t.posts,meta:t.postsMeta,loading:t.loading,sending:t.sending,title:t.postTypeLabel,"post-type":t.postType},on:{action:function(e){return t.runPostAction(e)}}})],1)}),[],!1,null,null,null);e.default=p.exports},531:function(t,e,s){"use strict";function n(t,e,s,n,o,i,a,r){var p,d="function"==typeof t?t.options:t;if(e&&(d.render=e,d.staticRenderFns=s,d._compiled=!0),n&&(d.functional=!0),i&&(d._scopeId="data-v-"+i),a?(p=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},d._ssrRegister=p):o&&(p=r?function(){o.call(this,this.$root.$options.shadowRoot)}:o),p)if(d.functional){d._injectStyles=p;var c=d.render;d.render=function(t,e){return p.call(e),c(t,e)}}else{var l=d.beforeCreate;d.beforeCreate=l?[].concat(l,p):[p]}return{exports:t,options:d}}s.d(e,"a",(function(){return n}))},550:function(t,e,s){},672:function(t,e,s){"use strict";var n=s(550);s.n(n).a}}]);