import{a as h,u as v,t as S}from"./links.bbde6535.js";import{B as f}from"./Img.ae6a5b51.js";import{C as w}from"./Caret.baea7fe0.js";import{S as y}from"./Book.e5451e3a.js";import{S as C}from"./Profile.7a6b8af7.js";import{x as a,o as i,c as b,a as e,z as c,t as r,E as k,j as I,k as l,b as d,L as x,M as B,m as N,A,J as L,K as P}from"./vue.runtime.esm-bundler.308f2021.js";import{_ as T}from"./_plugin-vue_export-helper.5bcc150c.js";const V={setup(){return{optionsStore:h(),rootStore:v()}},components:{BaseImg:f,CoreLoader:w,SvgBook:y,SvgDannieProfile:C},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:{appName(){return"All in One SEO"},getCard(){return this.card==="default"?this.optionsStore.options.social.twitter.general.defaultCardType:this.card}},methods:{maybeCanShow(o){this.canShowImage=o},truncate:S}},z=o=>(L("data-v-4b78a9ed"),o=o(),P(),o),D={class:"aioseo-twitter-preview"},E={class:"twitter-post"},O={class:"twitter-header"},q={class:"profile-photo"},R={class:"poster"},j={class:"poster-name"},J=z(()=>e("div",{class:"poster-username"}," @aioseopack ",-1)),K={class:"twitter-content"},M={class:"twitter-site-description"},U={class:"site-domain"},F={class:"site-title"},G={class:"site-description"};function H(o,Q,t,_,n,s){const m=a("svg-dannie-profile"),u=a("svg-book"),p=a("core-loader"),g=a("base-img");return i(),b("div",D,[e("div",E,[e("div",O,[e("div",q,[c(m)]),e("div",R,[e("div",j,r(s.appName),1),J])]),e("div",{class:k(["twitter-container",t.image?s.getCard:"summary"])},[e("div",K,[e("div",{class:"twitter-image-preview",style:I({backgroundImage:s.getCard==="summary"&&n.canShowImage?`url('${t.image}')`:""})},[!t.loading&&(!t.image||!n.canShowImage)?(i(),l(u,{key:0})):d("",!0),t.loading?(i(),l(p,{key:1})):d("",!0),x(c(g,{src:t.image,debounce:!1,onCanShow:s.maybeCanShow},null,8,["src","onCanShow"]),[[B,s.getCard==="summary_large_image"&&n.canShowImage]])],4),e("div",M,[e("div",U,[N(o.$slots,"site-url",{},()=>[A(r(_.rootStore.aioseo.urls.domain),1)],!0)]),e("div",F,r(s.truncate(t.title,70)),1),e("div",G,r(s.truncate(t.description,105)),1)])])],2)])])}const oe=T(V,[["render",H],["__scopeId","data-v-4b78a9ed"]]);export{oe as C};
