import{c as r}from"./component-mixin.3a19186d.js";import{d as n}from"./data-mixin.fd972848.js";import{I as a,t as i,x as u,O as $,P as b,Q as l,L as f,N as v,q as y,ad as _,a1 as B}from"./vue.02ad7c87.js";import{_ as d,c0 as P,cj as w}from"./index.f2790301.js";import{u as p}from"./ucFirst.ab859326.js";import"./uniqBy.6d2267cf.js";import"./faComment.30e0d0ca.js";import"./blog.acc504fc.js";import"./sentry.13e8e62e.js";const I={name:"BlogDashboardPartial",mixins:[n,r],data(){return{meta:{}}},computed:{loaded(){return!!this.posts&&!!this.tagItems}},created(){(!this.total||this.posts.length<this.total)&&this.fetchPaginatedPosts().catch(()=>{})},methods:{ucFirst:p}},D={class:"blog-dashboard"},k=v("h1",{class:"pt-4"}," Our blog ",-1);function N(t,m,c,g,h,e){const o=a("blog-dashboard-layout"),s=a("tml-loader");return i(),u("div",D,[k,$(s,{loading:!e.loaded,height:"50vh",text:"Loading..."},{default:b(()=>[e.loaded?(i(),l(o,{key:0,tags:t.tagItems,divisions:t.divisions,"page-title":t.pageTitle(t.$route)?e.ucFirst(t.pageTitle(t.$route)):""},null,8,["tags","divisions","page-title"])):f("",!0)]),_:1},8,["loading"])])}const T=d(I,[["render",N]]),V={name:"BlogDashboard",components:{blogDashboardPartial:T},mixins:[n,r],data(){return{loading:null,meta:{indexPage:!0}}},computed:{firstPostImage(){return this.posts.length?this.posts[0].image.size("banner"):null}},created(){P(y(()=>{const t=`${location.protocol}//${location.hostname}`;return{title:"Blog",script:[{type:"application/ld+json",children:`
            {

              "@context": "http://schema.org/",
              "@type": "Article",
              "name": "${this.$store.state.subdomain.company.name}",
              "url": "${t}${this.$route.fullPath}",
              "logo": "${this.$store.state.subdomain.company.logo}",
              "image": "${this.firstPostImage||this.$store.state.subdomain.company.logo}",
              "description": "${this.posts.length?w(this.posts[0].title):""}",
              "brand": {
                "@type": "Brand",
                "name": "${this.$store.state.subdomain.company.name}"
              }
            }
          `}],meta:[{vmid:"og:title",property:"og:title",content:"Blog"},{vmid:"og:description",property:"og:description",content:this.posts.length?this.posts[0].title:""},{vmid:"og:image",property:"og:image",content:this.firstPostImage||this.$store.state.subdomain.company.logo},{vmid:"og:type",property:"og:type",content:"article"},{vmid:"twitter:title",property:"twitter:title",content:"Blog"},{vmid:"twitter:card",property:"twitter:card",content:"photo"},{vmid:"twitter:image",property:"twitter:image",content:this.firstPostImage||this.$store.state.subdomain.company.logo}]}})),this.$store.state.blog.posts.length||this.$store.commit("blog/setVariable",{key:"next",value:"/omnis/v3/blog/paginate/?page=1"})},methods:{ucFirst:p}};function C(t,m,c,g,h,e){const o=a("blog-dashboard-partial"),s=_("title");return B((i(),l(o,{divisions:t.divisions,"page-title":t.pageTitle(t.$route)?e.ucFirst(t.pageTitle(t.$route)):""},null,8,["divisions","page-title"])),[[s,`${t.pageTitle(t.$route)} | Blog`]])}const J=d(V,[["render",C]]);export{J as default};
//# sourceMappingURL=BlogDashboardPage.f0c07a9f.js.map
