'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var Modal = require('./Modal.js');
var confirm = require('./confirm.js');
var index = require('./useModal/index.js');
var destroyFns = require('./destroyFns.js');

function modalWarn(props) {
  return confirm.default(confirm.withWarn(props));
}
Modal.default.useModal = index.default;
Modal.default.info = function infoFn(props) {
  return confirm.default(confirm.withInfo(props));
};
Modal.default.success = function successFn(props) {
  return confirm.default(confirm.withSuccess(props));
};
Modal.default.error = function errorFn(props) {
  return confirm.default(confirm.withError(props));
};
Modal.default.warning = modalWarn;
Modal.default.warn = modalWarn;
Modal.default.confirm = function confirmFn(props) {
  return confirm.default(confirm.withConfirm(props));
};
Modal.default.destroyAll = function destroyAllFn() {
  while (destroyFns.default.length) {
    const close = destroyFns.default.pop();
    if (close)
      close();
  }
};
Modal.default.install = function(app) {
  app.component(Modal.default.name, Modal.default);
  return app;
};

exports.default = Modal.default;
//# sourceMappingURL=index.js.map
