import{defineProperty as e}from"../../../../../../_virtual/_rollupPluginBabelHelpers.js";import r from"react";import t from"classnames";import a from"../../../../BaseListItem/BaseListItem.js";import i from"./DropdownInput.js";import l from"./Trigger.module.scss.js";import{useDropdownContext as s}from"../../context/DropdownContext.js";import{Flex as o}from"@vibe/layout/mockedClassNames";import n from"./TriggerActions.js";import{getStyle as m}from"../../../../../helpers/typesciptCssModulesHelper.js";var d=function(){var d,p,c=s(),u=c.inputValue,v=c.selectedItem,b=c.searchable,g=c.size,f=c.valueRenderer,j=c.isFocused,y=c.getToggleButtonProps,E=c.disabled,I=c.readOnly,O=c.error,B=c.label,L=c.getLabelProps,P=c.ariaLabel;return r.createElement(o,{justify:"space-between",align:"center"},r.createElement("div",Object.assign({className:t(l.triggerWrapper,m(l,g))},b?{}:y({"aria-haspopup":"dialog","aria-labelledby":B?L().id:void 0,"aria-label":P||(B||null===(d=L())||void 0===d?void 0:d.id),"aria-disabled":E?"true":void 0,"aria-invalid":O?"true":void 0,"aria-readonly":I?"true":void 0})),r.createElement(i,null),!u&&v&&r.createElement("div",{className:t(l.selectedItem,e({},l.faded,j&&b),m(l,g))},r.createElement(a,{component:"div",itemRenderer:f,size:g,readOnly:!0,item:Object.assign(Object.assign({},v),{disabled:E,startElement:"indent"===(null===(p=v.startElement)||void 0===p?void 0:p.type)?void 0:v.startElement})}))),r.createElement(n,null))};export{d as default};
//# sourceMappingURL=SingleSelectTrigger.js.map
