import{F as h,b as S,x as v}from"./app-core.61d75c0b.js";import{B as w}from"./Img.af9830ae.js";import{C as y}from"./Button.7fa2ada4.js";import{S as C}from"./Book.b8e27bdf.js";import{S as b}from"./Profile.cc99b995.js";import{as as s,f as i,i as k,j as e,a0 as l,U as a,P as B,V as I,Q as d,M as m,Y as x,a5 as N,B as V,ae as A}from"./vendor-vue-ui.d70c869f.js";import{_ as P}from"./_plugin-vue_export-helper.eefbdd86.js";const D={setup(){return{optionsStore:v(),rootStore:S()}},components:{BaseImg:w,CoreLoader:y,SvgBook:C,SvgDannieProfile:b},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(r){this.canShowImage=r},truncate:h}},L={class:"aioseo-twitter-preview"},O={class:"twitter-post"},T={class:"twitter-header"},q={class:"profile-photo"},z={class:"poster"},E={class:"poster-name"},R={class:"twitter-content"},U={class:"twitter-site-description"},j={class:"site-domain"},F={class:"site-title"},M={class:"site-description"};function Q(r,c,t,u,n,o){const _=s("svg-dannie-profile"),p=s("svg-book"),g=s("core-loader"),f=s("base-img");return i(),k("div",L,[e("div",O,[e("div",T,[e("div",q,[l(_)]),e("div",z,[e("div",E,a(o.appName),1),c[0]||(c[0]=e("div",{class:"poster-username"}," @aioseopack ",-1))])]),e("div",{class:B(["twitter-container",t.image?o.getCard:"summary"])},[e("div",R,[e("div",{class:"twitter-image-preview",style:I({backgroundImage:o.getCard==="summary"&&n.canShowImage?`url('${t.image}')`:""})},[!t.loading&&(!t.image||!n.canShowImage)?(i(),d(p,{key:0})):m("",!0),t.loading?(i(),d(g,{key:1})):m("",!0),x(l(f,{src:t.image,debounce:!1,onCanShow:o.maybeCanShow},null,8,["src","onCanShow"]),[[N,o.getCard==="summary_large_image"&&n.canShowImage]])],4),e("div",U,[e("div",j,[V(r.$slots,"site-url",{},()=>[A(a(u.rootStore.aioseo.urls.domain),1)],!0)]),e("div",F,a(o.truncate(t.title,70)),1),e("div",M,a(o.truncate(t.description,105)),1)])])],2)])])}const Z=P(D,[["render",Q],["__scopeId","data-v-3ab503eb"]]);export{Z as C};
