import{g as y}from"./index.jlplx4ex.js";import{C as k}from"./Tooltip.jx4casvt.js";import{a as b,S as p}from"./Caret.hnvbzqgq.js";import{a as B}from"./index.npoectbv.js";import{T}from"./Slide.dop8j51m.js";import{v as l,o,c as r,G as c,a as i,m as a,E as q,t as w,k as g,l as u,C as A,b as n}from"./runtime-dom.esm-bundler.h3clfjuw.js";import{_ as N}from"./_plugin-vue_export-helper.oebm7xum.js";const V={emits:["close-card","toggle-card"],setup(){return{settingsStore:y()}},components:{CoreTooltip:k,SvgCaret:b,SvgCircleQuestionMark:B,SvgClose:p,TransitionSlide:T},props:{slug:{type:String,required:!0},headerText:String,toggles:{type:Boolean,default(){return!0}},hideHeader:Boolean,noSlide:Boolean,closes:Boolean,saveToggleStatus:{type:Boolean,default(){return!0}},disabled:Boolean,cardClass:{type:Object,default(){return{}}}},watch:{toggles(t){const s=this.slug;t&&!this.settingsStore.settings.toggledCards[s]&&this.settingsStore.toggleCard({slug:s,shouldSave:!0})}},methods:{toggleCard(){this.settingsStore.toggleCard({slug:this.slug,shouldSave:this.saveToggleStatus}),this.$emit("toggle-card")}}},E={class:"text"},H={class:"header-icon"},L={class:"header-extra"},M={key:1,class:"content"},j={key:0,class:"content"},z={key:1,class:"content"};function D(t,s,e,d,G,m){const f=l("svg-circle-question-mark"),C=l("core-tooltip"),v=l("svg-caret"),S=l("svg-close"),h=l("transition-slide");return o(),r("div",{class:c(["aioseo-card",{disabled:e.disabled,...e.cardClass}])},[e.hideHeader?n("",!0):(o(),r("div",{key:0,class:c(["header",[{toggles:e.toggles}]]),onClick:s[2]||(s[2]=(..._)=>m.toggleCard&&m.toggleCard(..._))},[i("div",E,[i("div",H,[a(t.$slots,"header-icon")]),i("div",{class:"header-title",onClick:s[0]||(s[0]=q(()=>{},["stop"]))},[a(t.$slots,"header",{},()=>[i("span",null,w(e.headerText),1)])]),t.$slots.tooltip?(o(),g(C,{key:0},{tooltip:u(()=>[a(t.$slots,"tooltip")]),default:u(()=>[A(f)]),_:3})):n("",!0),i("div",L,[a(t.$slots,"header-extra")])]),!e.closes&&e.toggles&&d.settingsStore.settings.toggledCards&&!e.noSlide&&!e.disabled?(o(),g(v,{key:0,class:c({rotated:!d.settingsStore.settings.toggledCards[e.slug]})},null,8,["class"])):n("",!0),e.closes?(o(),g(S,{key:1,onClick:s[1]||(s[1]=_=>t.$emit("close-card",!0))})):n("",!0)],2)),t.$slots.disabled&&e.disabled?(o(),r("div",M,[a(t.$slots,"disabled")])):n("",!0),(d.settingsStore.settings.toggledCards||e.noSlide)&&!e.disabled?(o(),g(h,{key:2,active:d.settingsStore.settings.toggledCards[e.slug]&&e.toggles||e.noSlide},{default:u(()=>[t.$slots["before-tabs"]?(o(),r("div",j,[a(t.$slots,"before-tabs")])):n("",!0),a(t.$slots,"tabs"),t.$slots.default?(o(),r("div",z,[a(t.$slots,"default")])):n("",!0)]),_:3},8,["active"])):n("",!0)],2)}const J=N(V,[["render",D]]);export{J as C};
