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