"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),r=require("react"),o=require("classnames"),i=require("@material-ui/core"),n=require("react/jsx-runtime");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(e),l=a(t),u=a(o);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var b=i.makeStyles((function(e){var t=e.palette;return{list:{fontSize:16,"& .MuiAutocomplete-option":{display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.16)"}},'& .MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:"initial"},"& .MuiAutocomplete-option:active":{backgroundColor:"initial"}},withShadow:{"&::after":{content:"''",position:"sticky",width:"100%",display:"block",bottom:"0",height:8,backgroundImage:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(t.background.b9," 100%)"),zIndex:1},"&::before":{content:"''",position:"sticky",width:"100%",display:"block",height:8,top:"0",backgroundImage:"linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ".concat(t.background.b9," 100%)"),zIndex:1}}}})),p=r.forwardRef((function(e,t){var o=r.useState(!1),a=l.default(o,2),c=a[0],s=a[1],p=r.useRef(),f=b();return r.useEffect((function(){var e,t;s((null===(e=p.current)||void 0===e?void 0:e.scrollHeight)>(null===(t=p.current)||void 0===t?void 0:t.clientHeight))})),n.jsx(i.List,d(d({},e),{},{className:u.default(e.className,f.list,c&&f.withShadow),ref:p,role:"listbox"}))})),f=r.memo(p);module.exports=f;
