import * as o from "react";
import * as s from "react-dom";
import { jsxs as c } from "react/jsx-runtime";
import { useFloatingPortalNode as m } from "../floating-ui-react/components/FloatingPortal.js";
const f = /* @__PURE__ */ o.forwardRef(function(t, a) {
  const {
    children: i,
    container: n,
    className: d,
    render: u,
    ...l
  } = t, {
    portalNode: r,
    portalSubtree: e
  } = m({
    container: n,
    ref: a,
    componentProps: t,
    elementProps: l
  });
  return !e && !r ? null : /* @__PURE__ */ c(o.Fragment, {
    children: [e, r && /* @__PURE__ */ s.createPortal(i, r)]
  });
});
process.env.NODE_ENV !== "production" && (f.displayName = "FloatingPortalLite");
export {
  f as FloatingPortalLite
};
