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