import{W as n,au as a,av as r,aw as i,f as u,p as c}from"./index-BV0H45HW.js";import{s as f}from"./index-Cls4hH_L.js";let l;const m={title:"",width:"",theme:null,message:"",overlay:!0,callback:null,teleport:"body",className:"",allowHtml:!1,lockScroll:!0,transition:void 0,beforeClose:null,overlayClass:"",overlayStyle:void 0,messageAlign:"",cancelButtonText:"",cancelButtonColor:null,cancelButtonDisabled:!1,confirmButtonText:"",confirmButtonColor:null,confirmButtonDisabled:!1,showConfirmButton:!0,showCancelButton:!1,closeOnPopstate:!0,closeOnClickOverlay:!1,destroyOnClose:!1};let p=n({},m);function d(){({instance:l}=r({setup(){const{state:o,toggle:t}=i();return()=>u(f,c(o,{"onUpdate:show":t}),null)}}))}function w(e){return a?new Promise((o,t)=>{l||d(),l.open(n({},p,e,{callback:s=>{(s==="confirm"?o:t)(s)}}))}):Promise.resolve(void 0)}const v=e=>w(n({showCancelButton:!0},e));export{v as s};
