import{r as t,R as o}from"./index-TEHZzOO_.js";import{a as i,d as f}from"./scroll_context-DvLTq0a0.js";const p=({children:l,scrollKey:n,childRef:a,shouldUpdateScroll:c=f})=>{const e=t.useContext(i),r=t.useRef();return t.useImperativeHandle(a,()=>r.current,[]),t.useEffect(()=>{if(!(!e||!r.current))return e.registerElement(n,r.current,(s,u)=>c.call(e.scrollBehavior,s,u)),()=>{e.unregisterElement(n)}},[]),o.Children.only(o.cloneElement(l,{ref:r}))};export{p as S};
//# sourceMappingURL=index-DM_-Fo9k.js.map
