import * as o from "react";
import n from "react-dom";
import { P as f } from "./index-MSR-vgWR.mjs";
import { u as c } from "./index-CCKe-Mpx.mjs";
import { jsx as l } from "react/jsx-runtime";
var u = "Portal", p = o.forwardRef((r, a) => {
  const { container: e, ...s } = r, [i, m] = o.useState(!1);
  c(() => m(!0), []);
  const t = e || i && globalThis?.document?.body;
  return t ? n.createPortal(/* @__PURE__ */ l(f.div, { ...s, ref: a }), t) : null;
});
p.displayName = u;
export {
  p as P
};
//# sourceMappingURL=index-DLHLIYPI.mjs.map
