import e from"react";import o from"../../../../IconButton/IconButton.js";import t from"../../../../Flex/Flex.js";import r from"./Trigger.module.scss.js";import{useDropdownContext as a}from"../../context/DropdownContext.js";import n from"../../../../../../components/loader/dist/Loader/Loader.js";import i from"../../../../../../packages/icons/dist/react/CloseSmall.js";import s from"../../../../../../packages/icons/dist/react/DropdownChevronUp.js";import l from"../../../../../../packages/icons/dist/react/DropdownChevronDown.js";var c={large:"medium",medium:"small",small:"xs"},m=function(){var m=a(),d=m.isOpen,p=m.reset,u=m.contextOnClear,f=m.disabled,g=m.clearable,x=m.selectedItems,b=void 0===x?[]:x,j=m.toggleMenu,C=m.getMenuProps,v=m.clearAriaLabel,w=m.multi?(null==b?void 0:b.length)>0:!!m.selectedItem,E=c[m.size]||"small";return m.readOnly?null:e.createElement("div",{onKeyDown:function(e){e.stopPropagation()}},e.createElement(t,{className:r.actionsWrapper},m.loading&&e.createElement(n,{size:"xs"===E?16:"small"===E?20:24,color:"secondary"}),w&&g&&!f&&e.createElement(o,{"data-testid":"dropdown-clear-button",icon:i,onClick:function(e){e.stopPropagation(),u?u():p()},size:E,ariaLabel:v,hideTooltip:!0}),e.createElement(o,{icon:d?s:l,size:E,disabled:f,ariaControls:C().id,ariaExpanded:d,ariaLabeledBy:C().id,tabIndex:-1,onClick:function(){j()}})))};export{m as default};
//# sourceMappingURL=TriggerActions.js.map
