import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/objectWithoutProperties";import{jsx as o}from"react/jsx-runtime";import{List as n}from"@material-ui/core";import{forwardRef as c,useRef as i,useState as l,useEffect as s,useCallback as p}from"react";import u from"classnames";import{throttle as a}from"lodash";import m from"./Autocomplete.scss.js";var f=["className"];function b(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,o)}return t}function O(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?b(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}var j=c((function(r,c){var b=r.className,j=t(r,f),y=i(),v=l(!1),d=e(v,2),P=d[0],h=d[1];s((function(){var r=y.current,e=a((function(){h(!(null==r||!r.scrollTop)&&(null==r?void 0:r.scrollTop)>0)}),100,{leading:!0});return e(),null==r||r.addEventListener("scroll",e),function(){null==r||r.removeEventListener("scroll",e)}}),[]);var g=p((function(r){"function"==typeof c?c(r):c&&(c.current=r),y.current=r}),[c]);return o(n,O(O({},j),{},{ref:g,className:u(b,P&&m.listboxScrolled)}))}));export{j as AutocompleteListBox};
//# sourceMappingURL=AutocompleteListBox.js.map
