import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{forwardRef as r,useState as o,useRef as i,useEffect as n,memo as c}from"react";import a from"classnames";import{makeStyles as l,List as p}from"@material-ui/core";import{jsx as u}from"react/jsx-runtime";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 b(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?s(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var d=l((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}}}})),f=c(r((function(e,r){var c=o(!1),l=t(c,2),s=l[0],f=l[1],m=i(),g=d();return n((function(){var e,t;f((null===(e=m.current)||void 0===e?void 0:e.scrollHeight)>(null===(t=m.current)||void 0===t?void 0:t.clientHeight))})),u(p,b(b({},e),{},{className:a(e.className,g.list,s&&g.withShadow),ref:m,role:"listbox"}))})));export{f as default};
