import{S as d}from"./Caret.19bf2275.js";import{_ as m,r as u,b as p,w as _,C as f,o as a,a as o,c as l,e as n,D as v,d as h,f as r,B as y}from"./_plugin-vue_export-helper.a81c6319.js";const C={emits:["close"],components:{SvgClose:d},props:{classes:{type:Array,default(){return[]}},noHeader:Boolean,isolate:Boolean,allowOverflow:Boolean,confirmation:Boolean},methods:{scrollToElement(){const e=this.$el.getElementsByClassName("component-wrapper")[0];setTimeout(()=>{e&&(e.firstChild.scrollTop=0)},10)},escapeListener(e){e.key==="Escape"&&!this.confirmation&&this.$emit("close")}},mounted(){document.addEventListener("keydown",this.escapeListener),this.scrollToElement(),this.isolate&&document.body.appendChild(this.$el)},beforeUnmount(){document.removeEventListener("click",this.escapeListener)}},w={class:"modal-mask"},$={class:"modal-wrapper"},k={class:"modal-container"},B={key:0,class:"modal-header"},g={class:"modal-body"},E={key:1,class:"modal-container__footer"};function L(e,s,t,b,T,A){const i=u("svg-close");return a(),p(f,{name:"modal"},{default:_(()=>[o("div",{class:y(["aioseo-modal",[{"aioseo-app":t.isolate,"allow-overflow":t.allowOverflow},...t.classes]])},[o("div",w,[o("div",$,[o("div",k,[t.noHeader?r("",!0):(a(),l("div",B,[n(e.$slots,"header",{},()=>[n(e.$slots,"headerTitle"),o("button",{class:"close",onClick:s[1]||(s[1]=v(c=>e.$emit("close"),["stop"]))},[h(i,{onClick:s[0]||(s[0]=c=>e.$emit("close"))})])])])),o("div",g,[n(e.$slots,"body")]),e.$slots.footer?(a(),l("div",E,[n(e.$slots,"footer")])):r("",!0)])])])],2)]),_:3})}const V=m(C,[["render",L]]);export{V as C};
