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