import{M as h,b as S,y as v}from"./app-core.b862f9c8.js";import{B as w}from"./Img.2d9fe1ad.js";import{C as y}from"./Button.6c09d515.js";import{S as C}from"./Book.b431c2a9.js";import{S as b}from"./Profile.f6f3e630.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.f00a1236.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};
