import{h as l,E as s}from"./eleVendor-d42abce8-1783405707921v=1.0.0.js";const m=(o,u,r,t,a="warning")=>new Promise((c,g)=>{l.confirm(`\u662F\u5426${r}?`,"\u6E29\u99A8\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:a,draggable:!0}).then(async()=>{try{const e=await o(u);if(e.code!==0&&e.code!==200){s.error(e.msg||e.message);return}let n=t||`${r}\u6210\u529F`;s({type:"success",message:`${n}!`}),c(!0)}catch(e){console.error(e)}}).catch(e=>{console.error({err:e})})});export{m as u};
