import{S as d}from"./Caret.42a820e0.js";import{_ as m,h as u,w as p,T as _,r as f,o as a,f as o,c as l,x as n,g as v,d as h,a as r,n as y}from"./_plugin-vue_export-helper.2d9794a3.js";const w={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)}},C={class:"modal-mask"},$={class:"modal-wrapper"},k={class:"modal-container"},g={key:0,class:"modal-header"},B={class:"modal-body"},E={key:1,class:"modal-container__footer"};function L(e,s,t,T,b,A){const i=f("svg-close");return a(),u(_,{name:"modal"},{default:p(()=>[o("div",{class:y(["aioseo-modal",[{"aioseo-app":t.isolate,"allow-overflow":t.allowOverflow},...t.classes]])},[o("div",C,[o("div",$,[o("div",k,[t.noHeader?r("",!0):(a(),l("div",g,[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",B,[n(e.$slots,"body")]),e.$slots.footer?(a(),l("div",E,[n(e.$slots,"footer")])):r("",!0)])])])],2)]),_:3})}const S=m(w,[["render",L]]);export{S as C};
