import { defineComponent as s, createVNode as p, render as u, h as C } from "vue";
import { Modal as f } from "@aplus-frontend/antdv";
import { getTopWindow as g } from "../../utils/index.mjs";
import { ConfigProvider as h, globalConfigCached as e } from "../../config-provider/config-provider.mjs";
import { getContainerDom as n } from "./util.mjs";
const w = (r) => (o) => {
  let t;
  const d = /* @__PURE__ */ s({
    data() {
      const [l, c] = f.useModal();
      return {
        modal: l,
        contextHolder: c
      };
    },
    mounted() {
      t = this.modal?.[r]?.(o);
    },
    render() {
      return p(h, e.value, {
        default: () => [this.contextHolder?.()]
      });
    }
  }), m = n(e?.value?.getPopupContainer), a = n(o.getContainer), i = m || a || g().document.body;
  return u(C(d), i), t;
};
export {
  w as methodsFn
};
