import*as n from"react";import e from"../../../warning/warning.js";import{ManagerReferenceNodeSetterContext as r}from"./Manager.js";import{setRef as o,safeInvoke as t,unwrapArray as f}from"./utils.js";function u(u){var i=u.children,a=u.innerRef,c=n.useContext(r),s=n.useCallback((function(n){o(a,n),t(c,n)}),[a,c]);return n.useEffect((function(){return function(){return o(a,null)}}),[]),n.useEffect((function(){e(Boolean(c),"`Reference` should not be used outside of a `Manager` component.")}),[c]),f(i)({ref:s})}export{u as Reference};
//# sourceMappingURL=Reference.js.map
