import{Q as h,b as S,a as v}from"./app-core.a6d808ce.js";import{B as w}from"./Img.a459db31.js";import{C as y}from"./Button.a549093d.js";import{S as C}from"./Book.d930f5e6.js";import{S as b}from"./Profile.d553eeca.js";import{aq as a,f as i,i as k,j as e,a0 as l,U as s,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.de3ab35f.js";import{_ as P}from"./_plugin-vue_export-helper.eefbdd86.js";const q={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}},D={class:"aioseo-twitter-preview"},L={class:"twitter-post"},O={class:"twitter-header"},T={class:"profile-photo"},z={class:"poster"},E={class:"poster-name"},Q={class:"twitter-content"},R={class:"twitter-site-description"},U={class:"site-domain"},j={class:"site-title"},M={class:"site-description"};function Y(r,c,t,u,n,o){const _=a("svg-dannie-profile"),p=a("svg-book"),g=a("core-loader"),f=a("base-img");return i(),k("div",D,[e("div",L,[e("div",O,[e("div",T,[l(_)]),e("div",z,[e("div",E,s(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",Q,[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",R,[e("div",U,[V(r.$slots,"site-url",{},()=>[A(s(u.rootStore.aioseo.urls.domain),1)],!0)]),e("div",j,s(o.truncate(t.title,70)),1),e("div",M,s(o.truncate(t.description,105)),1)])])],2)])])}const Z=P(q,[["render",Y],["__scopeId","data-v-3ab503eb"]]);export{Z as C};
