import{M as h,b as S,y as v}from"./app-core.3e3b5f4b.js";import{B as w}from"./Img.046f0989.js";import{C as y}from"./Button.60477c93.js";import{S as C}from"./Book.bdb87e81.js";import{S as b}from"./Profile.3973c047.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.65fbb3e9.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"},M={class:"twitter-content"},R={class:"twitter-site-description"},U={class:"site-domain"},j={class:"site-title"},Q={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",M,[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",Q,s(o.truncate(t.description,105)),1)])])],2)])])}const Z=P(q,[["render",Y],["__scopeId","data-v-3ab503eb"]]);export{Z as C};
