text: "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Modal=Modal,exports.default=void 0;var _xeUtils=_interopRequireDefault(require("xe-utils/methods/xe-utils")),_modal=_interopRequireDefault(require("./src/modal")),_queue=_interopRequireDefault(require("./src/queue")),_vXETable=_interopRequireDefault(require("../v-x-e-table"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var AlertController=null,AllActivedModal=[];function Modal(a){return new Promise(function(t){if(a&&a.id&&_queue.default.some(function(e){return e.id===a.id}))t("exist");else{var l=a.events||{};a.events=Object.assign({},l,{hide:function(e){l.hide&&l.hide.call(this,e),o.$destroy(),_xeUtils.default.remove(AllActivedModal,function(e){return e===o}),t(e.type)}});var o=new AlertController({el:document.createElement("div"),propsData:a});setTimeout(function(){return o.open()}),AllActivedModal.push(o)}})}["alert","confirm","message"].forEach(function(a,e){var r=2===e?{mask:!1,lockView:!1,showHeader:!1}:{showFooter:!0};r.type=a,r.dblclickZoom=!1,1===e&&(r.status="question"),Modal[a]=function(e,t,l){var o;return _xeUtils.default.isObject(e)?o=e:t&&(o={title:t}),Modal(Object.assign({message:_xeUtils.default.toString(e),type:a},r,o,l))}}),Modal.closeAll=function(){AllActivedModal.forEach(function(e){return e.close("close")})},Modal.install=function(e){_vXETable.default._modal=1,e.component("vxe-message",_modal.default),e.component(_modal.default.name,_modal.default),AlertController=e.extend(_modal.default),e.prototype.$XMsg=Modal,e.prototype.$XModal=Modal,_vXETable.default.$modal=Modal};var _default=Modal;exports.default=_default;