import{r,dv as a,cl as u,ay as c,cm as l,l as i}from"./index-9PRMimni.js";function f(s){const n=r(null),o=u(),t=()=>{const e=i(n.value);return e||console.error("useModal instance is undefined!"),e};return[e=>{a(()=>{n.value=null}),n.value=e,o?.emit("register",e),c(()=>s,()=>{s&&e.setProps(l(s))},{immediate:!0,deep:!0})},{setProps:e=>{t()?.setProps(e)},openModal:()=>{t()?.openModal()},closeModal:()=>{t()?.closeModal()},setSubLoading:e=>{t()?.setSubLoading(e)}}]}export{f as u};
