import{defineProperty as e}from"../../../../../../_virtual/_rollupPluginBabelHelpers.js";import l,{useRef as t}from"react";import a from"classnames";import r from"./Trigger.module.scss.js";import{useDropdownContext as o}from"../../context/DropdownContext.js";import s from"../../../../Text/Text.js";import i from"../../../../../../base/dist/BaseInput/BaseInput.js";var n=function(n){var m,p=n.inputSize,d=o(),u=d.inputValue,c=d.autoFocus,b=d.disabled,f=d.readOnly,g=d.placeholder,v=d.multi,x=d.selectedItem,j=d.selectedItems,y=void 0===j?[]:j,h=d.inputAriaLabel,I=d.searchable,O=d.size,P=d.label,E=d.isOpen,F=d.getDropdownProps,T=d.getLabelProps,z=d.getInputProps,B=t(null),S=v?y.length>0:!!x,w=F?F({preventKeyAction:E}):{};return l.createElement(l.Fragment,null,I?l.createElement(i,Object.assign({},z(Object.assign({"aria-labelledby":P?T().id:void 0,"aria-label":h||(P||null===(m=T())||void 0===m?void 0:m.id),placeholder:S?"":g,ref:B},w)),{inputRole:"combobox",value:u||"",autoFocus:c,size:p||O,className:a(r.inputWrapper,e(e(e(e({},r.hasSelected,!v&&x&&!u),r.small,"small"===p),r.multi,v&&S),r.multiSelected,v&&S&&"small"===p)),disabled:b,readOnly:f})):l.createElement(l.Fragment,null,!S&&g&&l.createElement(s,{color:"secondary",className:a(r.placeholderText,e({},r.disabled,!!b)),type:"small"===O?"text2":"text1"},g)))};export{n as default};
//# sourceMappingURL=DropdownInput.js.map
