import{i as e}from"./rolldown-runtime-B1FJdls4.js";import{m as t,p as n}from"./vendor-dnd-C1cICjTT.js";var r=e(t(),1),i=n();function a({children:e,lockBodyScroll:t=!0}){let[n,a]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(a(!0),!t)return;let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}},[t]),n?(0,i.createPortal)(e,document.body):null}export{a as t};