!function(){function t(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,s=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){s=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return c}}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}System.register(["./index-legacy-DF2p3puw.js","./Icons-legacy-CvLN7pi_.js","./InlineSelect-legacy-DL21TEgb.js"],(function(e,r){"use strict";var n,o,a,i,c,l,s;return{setters:[function(t){n=t.f,o=t.r,a=t.j,i=t.i},function(t){c=t.d,l=t.D},function(t){s=t.I}],execute:function(){e("S",(function(e){var r=e.sortByList,u=e.defaultSortBy,f=void 0===u?r[0]:u,d=e.defaultSortDirection,y=void 0===d?"desc":d,m=t(n("sort",i),2),b=m[0],h=m[1],v=t(n("sortBy",i),2),p=v[0],x=v[1],g=o.useMemo((function(){return b||y}),[y,b]),j=o.useCallback((function(t){return x(t===f?void 0:t,!0)}),[f,x]),S=o.useCallback((function(){var t="asc"===g?"desc":"asc";return h(t===y?void 0:t,!0)}),[g,y,h]);return a.jsxs("div",{className:"my-6 ml-1 flex flex-row gap-2 items-center",children:[a.jsx("h4",{className:"text-theme-helptext",children:"Sort by"}),a.jsxs("div",{className:"flex items-center",children:[a.jsx(s,{className:"text-base",onChange:j,options:r.map((function(t){return{label:t,value:t}})),value:p||f}),a.jsx("button",{className:"text-base font-medium text-gray-500 flex items-center justify-end\n         cursor-pointer ml-1 hover:bg-white hover:shadow p-1 rounded border border-transparent hover:border-gray-400",onClick:S,"data-tooltip-id":"react-tooltip","data-tooltip-content":"Sort ".concat("asc"===g?"descending":"ascending"),children:"asc"===g?a.jsx(c,{}):a.jsx(l,{})})]})]})}))}}}))}();
