import{e as h,a as f,C as S}from"./index.4b887428.js";import{B as v}from"./Img.85371eb9.js";import{C as w}from"./Button.9a301412.js";import{S as y}from"./Book.f0bec69d.js";import{S as C}from"./Profile.1de11420.js";import{v as b}from"./runtime-dom.esm-bundler.dc49ee3e.js";import{_ as I}from"./_plugin-vue_export-helper.eefbdd86.js";import{a6 as s,o as i,c as k,_ as e,l as c,$ as r,ae as B,a0 as x,a1 as l,a4 as d,aj as N,a3 as A,a7 as V,ah as D,ai as L}from"./runtime-core.esm-bundler.ce5add0b.js";const O={setup(){return{optionsStore:h(),rootStore:f()}},components:{BaseImg:v,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}},P=o=>(D("data-v-3ab503eb"),o=o(),L(),o),T={class:"aioseo-twitter-preview"},q={class:"twitter-post"},z={class:"twitter-header"},E={class:"profile-photo"},R={class:"poster"},j={class:"poster-name"},U=P(()=>e("div",{class:"poster-username"}," @aioseopack ",-1)),F={class:"twitter-content"},G={class:"twitter-site-description"},H={class:"site-domain"},J={class:"site-title"},K={class:"site-description"};function M(o,Q,t,m,n,a){const _=s("svg-dannie-profile"),u=s("svg-book"),p=s("core-loader"),g=s("base-img");return i(),k("div",T,[e("div",q,[e("div",z,[e("div",E,[c(_)]),e("div",R,[e("div",j,r(a.appName),1),U])]),e("div",{class:B(["twitter-container",t.image?a.getCard:"summary"])},[e("div",F,[e("div",{class:"twitter-image-preview",style:x({backgroundImage:a.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),N(c(g,{src:t.image,debounce:!1,onCanShow:a.maybeCanShow},null,8,["src","onCanShow"]),[[b,a.getCard==="summary_large_image"&&n.canShowImage]])],4),e("div",G,[e("div",H,[A(o.$slots,"site-url",{},()=>[V(r(m.rootStore.aioseo.urls.domain),1)],!0)]),e("div",J,r(a.truncate(t.title,70)),1),e("div",K,r(a.truncate(t.description,105)),1)])])],2)])])}const ae=I(O,[["render",M],["__scopeId","data-v-3ab503eb"]]);export{ae as C};
