import*as t from"react";import r from"../../../react-dom/index.js";import{Primitive as e}from"../../react-primitive/dist/index.js";import{useLayoutEffect as o}from"../../react-use-layout-effect/dist/index.js";import{jsx as a}from"react/jsx-runtime";var i=t.forwardRef(((i,m)=>{const{container:s,...c}=i,[f,d]=t.useState(!1);o((()=>d(!0)),[]);const n=s||f&&globalThis?.document?.body;return n?r.createPortal(a(e.div,{...c,ref:m}),n):null}));i.displayName="Portal";export{i as Portal};
//# sourceMappingURL=index.js.map
