import { W as createApp, n as reactive } from "./index-5e4623ce.js"; import { e as extend } from "./index-487cde8c.js"; import { u as useExpose } from "./use-scope-id-0b5b8615.js"; function usePopupState() { const state = reactive({ show: false }); const toggle = (show) => { state.show = show; }; const open = (props) => { extend(state, props, { transitionAppear: true }); toggle(true); }; const close = () => toggle(false); useExpose({ open, close, toggle }); return { open, close, state, toggle }; } function mountComponent(RootComponent) { const app = createApp(RootComponent); const root = document.createElement("div"); document.body.appendChild(root); return { instance: app.mount(root), unmount() { app.unmount(); document.body.removeChild(root); } }; } export { mountComponent as m, usePopupState as u };