import{S as a}from"./Caret.eeb84d06.js";import{n as r}from"./vueComponentNormalizer.67c9b86e.js";var l=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal"}},[o("div",{class:[{"aioseo-app":e.isolate}].concat(e.classes)},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container"},[e.noHeader?e._e():o("div",{staticClass:"modal-header"},[e._t("header",function(){return[e._t("headerTitle"),o("button",{staticClass:"close",on:{click:function(n){return n.stopPropagation(),e.$emit("close")}}},[o("svg-close",{on:{click:function(n){return e.$emit("close")}}})],1)]})],2),o("div",{staticClass:"modal-body",class:{"allow-overflow":e.allowBodyOverflow}},[e._t("body")],2),e.$slots.footer?o("div",{staticClass:"modal-container__footer"},[e._t("footer")],2):e._e()])])])])])},i=[];const c={components:{SvgClose:a},props:{noHeader:Boolean,isolate:Boolean,classes:Array,allowBodyOverflow: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)},beforeDestroy(){document.removeEventListener("click",this.escapeListener)}},s={};var u=r(c,l,i,!1,_,null,null,null);function _(e){for(let t in s)this[t]=s[t]}const p=function(){return u.exports}();export{p as C};
