import o from"./Modal.mjs";import e,{withInfo as f,withSuccess as s,withError as c,withConfirm as u,withWarn as l}from"./confirm.mjs";import t from"./destroyFns.mjs";import m from"./useModal/index.mjs";function i(r){return e(l(r))}o.useModal=m;o.info=function(n){return e(f(n))};o.success=function(n){return e(s(n))};o.error=function(n){return e(c(n))};o.warning=i;o.warn=i;o.confirm=function(n){return e(u(n))};o.addDestroyFn=r=>{t.push(r)};o.delDestroyFn=r=>{for(let n=t.length-1;n>=0;n--)t[n]===r&&t.splice(n,1)};o.destroyAll=function(){for(;t.length;){const n=t.pop();n&&n()}};o.install=function(r){return r.component(o.name,o),r};export{o as default};
