"use strict";var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/objectWithoutProperties"),t=require("react"),n=require("classnames"),o=require("@material-ui/core"),i=require("../context/index.js"),u=require("../../../effects/useOutsideClick.js"),c=require("react/jsx-runtime");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=s(e),a=s(r),l=s(n),b=["className","children","inputRef"];function f(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 d(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?f(Object(t),!0).forEach((function(r){p.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var m=o.makeStyles((function(){return{paper:{boxShadow:"0px 2px 1px -1px rgb(0 0 0 / 20%), 0px 1px 1px 0px rgb(0 0 0 / 14%), 0px 1px 3px 0px rgb(0 0 0 / 12%)",backgroundColor:"#424242",transition:"box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",borderRadius:5,position:"absolute",top:0,left:0,width:"100%",margin:0}}})),x=t.forwardRef((function(e,r){var t,n=e.className,o=e.children,s=e.inputRef,p=a.default(e,b),f=m(),x=i.default(),O=x.loading,j=x.AllSelectComponent,h=x.RecentSearchesComponent,y=x.GroupsComponent,g=x.isEmptyOptions,v=x.onOutsideClick;return u(r,v,["#removeGroupIcon","#selectAllLabel",null==s||null===(t=s.current)||void 0===t?void 0:t.parentNode]),c.jsxs("div",d(d({},p),{},{ref:r,className:l.default(n,f.paper),children:[!O&&c.jsxs(c.Fragment,{children:[y," ",h," ",j]}),g&&y?null:o]}))}));module.exports=x;
