import{defineProperty as e}from"../../../../../../_virtual/_rollupPluginBabelHelpers.js";import t from"react";import r 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 o from"./TriggerActions.js";import{getStyle as n}from"../../../../../helpers/typesciptCssModulesHelper.js";import d from"../../../../../../components/layout/dist/Flex/Flex.js";var m=function(){var m,p,c=s(),u=c.inputValue,v=c.selectedItem,g=c.searchable,b=c.size,f=c.valueRenderer,j=c.isFocused,y=c.getToggleButtonProps,E=c.disabled,x=c.readOnly,I=c.error,O=c.label,B=c.getLabelProps,L=c.ariaLabel;return t.createElement(d,{justify:"space-between",align:"center"},t.createElement("div",Object.assign({className:r(l.triggerWrapper,n(l,b))},g?{}:y({"aria-haspopup":"dialog","aria-labelledby":O?B().id:void 0,"aria-label":L||(O||null===(m=B())||void 0===m?void 0:m.id),"aria-disabled":E?"true":void 0,"aria-invalid":I?"true":void 0,"aria-readonly":x?"true":void 0})),t.createElement(i,null),!u&&v&&t.createElement("div",{className:r(l.selectedItem,e({},l.faded,j&&g),n(l,b))},t.createElement(a,{component:"div",itemRenderer:f,size:b,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})}))),t.createElement(o,null))};export{m as default};
//# sourceMappingURL=SingleSelectTrigger.js.map
