import{af as y,o,c as l,K as g,B as r,J as a,L as k,t as c,v as u,a as b,E as n,r as i,C as B}from"./index.C4hPdFye.js";import{C as T,S as p}from"./QuestionMark.CZzI4j5i.js";import{S as q}from"./Caret.B7lpKvud.js";import{S as w}from"./Close.DkGVhhYT.js";import{T as A}from"./Slide.Chsbk5hA.js";import{_ as I}from"./dynamic-import-helper.-B9-7_nw.js";const L={emits:["close-card","toggle-card"],setup(){return{settingsStore:y()}},components:{CoreTooltip:T,SvgCaret:q,SvgCircleQuestionMark:p,SvgClose:w,TransitionSlide:A},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{}}},cardId:String},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")}}},N=["id"],V={class:"text"},E={class:"header-icon"},H={class:"header-extra"},M={key:1,class:"content"},j={key:0,class:"content"},z={key:1,class:"content"};function D(t,s,e,d,J,m){const f=i("svg-circle-question-mark"),S=i("core-tooltip"),C=i("svg-caret"),v=i("svg-close"),h=i("transition-slide");return o(),l("div",{class:g(["aioseo-card",{disabled:e.disabled,...e.cardClass}]),id:e.cardId?`aioseo-card-${e.cardId}`:null},[e.hideHeader?n("",!0):(o(),l("div",{key:0,class:g(["header",[{toggles:e.toggles}]]),onClick:s[2]||(s[2]=(..._)=>m.toggleCard&&m.toggleCard(..._))},[r("div",V,[r("div",E,[a(t.$slots,"header-icon")]),r("div",{class:"header-title",onClick:s[0]||(s[0]=k(()=>{},["stop"]))},[a(t.$slots,"header",{},()=>[r("span",null,B(e.headerText),1)])]),t.$slots.tooltip?(o(),c(S,{key:0},{tooltip:u(()=>[a(t.$slots,"tooltip")]),default:u(()=>[b(f)]),_:3})):n("",!0),r("div",H,[a(t.$slots,"header-extra")])]),!e.closes&&e.toggles&&d.settingsStore.settings.toggledCards&&!e.noSlide&&!e.disabled?(o(),c(C,{key:0,class:g({rotated:!d.settingsStore.settings.toggledCards[e.slug]})},null,8,["class"])):n("",!0),e.closes?(o(),c(v,{key:1,onClick:s[1]||(s[1]=_=>t.$emit("close-card",!0))})):n("",!0)],2)),t.$slots.disabled&&e.disabled?(o(),l("div",M,[a(t.$slots,"disabled")])):n("",!0),(d.settingsStore.settings.toggledCards||e.noSlide)&&!e.disabled?(o(),c(h,{key:2,active:d.settingsStore.settings.toggledCards[e.slug]&&e.toggles||e.noSlide},{default:u(()=>[t.$slots["before-tabs"]?(o(),l("div",j,[a(t.$slots,"before-tabs")])):n("",!0),a(t.$slots,"tabs"),t.$slots.default?(o(),l("div",z,[a(t.$slots,"default")])):n("",!0)]),_:3},8,["active"])):n("",!0)],10,N)}const F=I(L,[["render",D]]);export{F as C};
