import{slicedToArray as r}from"../_virtual/_rollupPluginBabelHelpers.js";import{useState as e,useCallback as l}from"react";import t from"./useResizeObserver.js";function i(r){if(!r)return!1;var e=r.style.overflow;e&&"visible"!==e||(r.style.overflow="hidden");var l=r.scrollWidth>r.clientWidth||r.scrollHeight>r.clientHeight;return r.style.overflow=e,l}function o(o){var n=o.ref,u=e(i(null==n?void 0:n.current)),s=r(u,2),c=s[0],f=s[1],a=l((function(){f(i(null==n?void 0:n.current))}),[n,f]);return t({ref:n,callback:a,debounceTime:0}),c}export{o as default};
