!function(){function e(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||r(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,u,i,a=[],l=!0,c=!1;try{if(u=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=u.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return a}}(e,t)||r(e,t)||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 r(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}System.register(["./index-legacy-DF2p3puw.js","./query-hooks-legacy-C5ePN5-y.js","./MultiSelectDropdown-legacy-BBZF_-wi.js"],(function(r,n){"use strict";var o,u,i,a,l,c,f,s,y,d;return{setters:[function(e){o=e.r,u=e.x,i=e.j,a=e.t,l=e.f,c=e.i,f=e.aj,s=e.au},function(e){y=e.b},function(e){d=e.M}],execute:function(){var n=r("u",(function(){var e,r=y(),n=a.workItems.getPageConfig.useQuery({queryContext:r},{keepPreviousData:!0}),u=t(l("filter",c),2),i=u[0],d=u[1],b=o.useCallback((function(e){d(f(e),!0)}),[d]),m=o.useMemo((function(){return s(i)}),[i]);return{filters:null===(e=n.data)||void 0===e?void 0:e.filters,selectedFilters:m,setSelectedFilters:b}}));r("F",o.forwardRef((function(r,a){var l=r.setRenderCount,c=n(),f=c.filters,s=c.selectedFilters,y=c.setSelectedFilters,b=o.useCallback((function(t){return function(r){return y([].concat(e(s.filter((function(e){return e.label!==t}))),[{label:t,tags:r}]))}}),[s,y]);return o.useLayoutEffect((function(){l(u(1))}),[l,f]),i.jsx("div",{className:"flex flex-wrap gap-4",ref:a,children:Object.entries(f||{}).map((function(e){var r,n=t(e,2),o=n[0],u=n[1];return i.jsx(d,{label:o,options:u.map((function(e){return{label:e,value:e}})),value:(null===(r=s.find((function(e){return e.label===o})))||void 0===r?void 0:r.tags)||[],onChange:b(o)},o)}))})})))}}}))}();
