"use strict";(self["webpackChunkcarabi_x2"]=self["webpackChunkcarabi_x2"]||[]).push([[8362],{2215:function(t,e,l){l.r(e),l.d(e,{default:function(){return u}});var i=function(){var t=this,e=t._self._c;return t.opened?e("div",{class:{"uk-modal-container":t.large},attrs:{"uk-modal":""}},[e("div",{staticClass:"uk-modal-dialog uk-flex uk-flex-column",staticStyle:{"max-height":"100%"},style:{height:t.height}},[t.closable?e("button",{staticClass:"uk-modal-close-default",attrs:{type:"button","uk-close":""}}):t._e(),t.title?e("div",{staticClass:"uk-modal-header",staticStyle:{padding:"7px 15px"}},[e("h4",{staticClass:"uk-margin-remove"},[t._v(" "+t._s(t.title)+" ")])]):t._e(),t._t("default")],2)]):t._e()},o=[],s=l(2779),a={name:"Modal",data(){return{opened:!1}},props:{autoOpen:{type:Boolean,default:!1},fullHeight:{type:Boolean,default:!1},large:{type:Boolean,default:!1},title:{type:String,default:""},closable:{type:Boolean,default:!0}},mounted(){this.autoOpen&&this.open()},beforeDestroy(){console.log("modal beforeDestroy",this.modal),this.modal&&this.modal.hide()},computed:{height(){return this.fullHeight?"100%":"auto"}},methods:{initModal(){s.util.on(this.$el,"show",(t=>{t.target===this.$el&&this.$emit("opening")})),s.util.on(this.$el,"shown",(t=>{t.target===this.$el&&this.$emit("opened")})),s.util.on(this.$el,"hide",(t=>{t.target===this.$el&&this.$emit("closing")})),s.util.on(this.$el,"hidden",(t=>{t.target===this.$el&&setTimeout((()=>{console.log("modal hidden",this.$el,this.modal,this._isDestroyed),this.$emit("closed"),this.destroyModal()}),0)})),s.util.on(this.$el,"beforehide",(t=>{this.closable||t.preventDefault()})),this.modal=s.modal(this.$el,{container:document.body,stack:!0})},async open(){this.opened=!0,await this.$nextTick(),this.initModal(),this.modal.show()},close(){this.modal.hide()},destroyModal(){this.$el&&s.util.off(this.$el,"show shown hide hidden beforehide"),this.modal&&(this.modal.$destroy(!0),this.modal=null),this.opened=!1}}},h=a,d=l(1656),n=(0,d.A)(h,i,o,!1,null,null,null),u=n.exports}}]);
//# sourceMappingURL=Modal.feb32c07.js.map