import{a as g}from"./vuex.esm-bundler.8589b2dd.js";import{t as f}from"./html.14f2a8b9.js";import{B as h}from"./Img.abc640e1.js";import{C as v}from"./Caret.42a820e0.js";import{S as w}from"./Book.c168f1ae.js";import{S}from"./Profile.499a6108.js";import{_ as y,c as C,f as e,d as c,t as s,n as I,p as k,h as d,a as l,q as b,v as B,x,r as n,o as i,e as N,Y as A,Z as P}from"./_plugin-vue_export-helper.2d9794a3.js";const T={components:{BaseImg:h,CoreLoader:v,SvgBook:w,SvgDannieProfile:S},props:{card:String,description:{type:String,required:!0},image:String,loading:{type:Boolean,default:!1},title:{type:String,required:!0}},data(){return{canShowImage:!1}},computed:{...g(["options"]),appName(){return"All in One SEO"},getCard(){return this.card==="default"?this.options.social.twitter.general.defaultCardType:this.card}},methods:{maybeCanShow(t){this.canShowImage=t},truncate:f}},V=t=>(A("data-v-178fc7d5"),t=t(),P(),t),q={class:"aioseo-twitter-preview"},D={class:"twitter-post"},L={class:"twitter-header"},z={class:"profile-photo"},E={class:"poster"},O={class:"poster-name"},R=V(()=>e("div",{class:"poster-username"}," @aioseopack ",-1)),U={class:"twitter-content"},Y={class:"twitter-site-description"},Z={class:"site-domain"},j={class:"site-title"},F={class:"site-description"};function G(t,H,o,J,r,a){const _=n("svg-dannie-profile"),m=n("svg-book"),u=n("core-loader"),p=n("base-img");return i(),C("div",q,[e("div",D,[e("div",L,[e("div",z,[c(_)]),e("div",E,[e("div",O,s(a.appName),1),R])]),e("div",{class:I(["twitter-container",o.image?a.getCard:"summary"])},[e("div",U,[e("div",{class:"twitter-image-preview",style:k({backgroundImage:a.getCard==="summary"&&r.canShowImage?`url('${o.image}')`:""})},[!o.loading&&(!o.image||!r.canShowImage)?(i(),d(m,{key:0})):l("",!0),o.loading?(i(),d(u,{key:1})):l("",!0),b(c(p,{src:o.image,debounce:!1,onCanShow:a.maybeCanShow},null,8,["src","onCanShow"]),[[B,a.getCard==="summary_large_image"&&r.canShowImage]])],4),e("div",Y,[e("div",Z,[x(t.$slots,"site-url",{},()=>[N(s(t.$aioseo.urls.domain),1)],!0)]),e("div",j,s(a.truncate(o.title,70)),1),e("div",F,s(a.truncate(o.description,105)),1)])])],2)])])}const te=y(T,[["render",G],["__scopeId","data-v-178fc7d5"]]);export{te as C};
