import{c as h,a as f,z as S}from"./index.ed1fc0db.js";import{B as v}from"./Img.9d4d84e4.js";import{C as w}from"./Button.e237bb50.js";import{S as y}from"./Book.6b29a263.js";import{S as C}from"./Profile.c1a1cb74.js";import{v as b}from"./runtime-dom.esm-bundler.f6259c83.js";import{_ as I}from"./_plugin-vue_export-helper.eefbdd86.js";import{a6 as s,o as i,c as k,a as e,m 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 z,ai as D}from"./runtime-core.esm-bundler.4f558f23.js";const L={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}},O=o=>(z("data-v-3ab503eb"),o=o(),D(),o),P={class:"aioseo-twitter-preview"},T={class:"twitter-post"},q={class:"twitter-header"},E={class:"profile-photo"},R={class:"poster"},j={class:"poster-name"},U=O(()=>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",P,[e("div",T,[e("div",q,[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(L,[["render",M],["__scopeId","data-v-3ab503eb"]]);export{ae as C};
