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