'use strict';

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

var Modal$1 = require('./src/Modal.cjs');
var index = require('./src/useModal/index.cjs');
var confirm = require('./src/confirm.cjs');
var destroyFns = require('./src/destroyFns.cjs');
require('./src/interface.cjs');
var props = require('./src/props.cjs');

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

exports.useModal = index.default;
exports.modalProps = props.modalProps;
exports.Modal = Modal;
exports.default = Modal;
//# sourceMappingURL=index.cjs.map
