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