import{N as h,b as S,z as v}from"./app-core.52885c02.js";import{B as w}from"./Img.db2cc72c.js";import{C as y}from"./Button.7e4e5aaa.js";import{S as C}from"./Book.1c148583.js";import{S as b}from"./Profile.317b72ad.js";import{an 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 N,a5 as x,B as V,ae as A}from"./vendor-vue-ui.c21c50b5.js";import{_ as P}from"./_plugin-vue_export-helper.eefbdd86.js";const z={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"},q={class:"poster"},E={class:"poster-name"},R={class:"twitter-content"},U={class:"twitter-site-description"},j={class:"site-domain"},M={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",q,[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",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),N(l(f,{src:t.image,debounce:!1,onCanShow:o.maybeCanShow},null,8,["src","onCanShow"]),[[x,o.getCard==="summary_large_image"&&n.canShowImage]])],4),e("div",U,[e("div",j,[V(r.$slots,"site-url",{},()=>[A(s(u.rootStore.aioseo.urls.domain),1)],!0)]),e("div",M,s(o.truncate(t.title,70)),1),e("div",Q,s(o.truncate(t.description,105)),1)])])],2)])])}const Z=P(z,[["render",Y],["__scopeId","data-v-3ab503eb"]]);export{Z as C};
