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