import{c as y,u as _,o as w,b6 as R,j as e,b7 as v,r as E,aZ as I,av as b,b8 as M,S as g,aT as V}from"./index-26FXPGkN.js";import{T as A}from"./TasksSearchInput-DiDFGVKK.js";import{S as C}from"./Sprints-SMu3MRKK.js";import{u as D}from"./useTasksData-DXijVek8.js";import{H as F}from"./tasks-BMVBejH2.js";import"./sortGroups-B7LvLKY1.js";import"./TaskCard-DmGvZmT4.js";import"./Textarea-C8aNW3Hx.js";import"./get-env-uyVen0u2.js";import"./use-resize-observer-6Qm_8hWl.js";import"./union-DoflI9J8.js";import"./reduce-Htc8hg3K.js";import"./Accordion-z2XcZ0M6.js";import"./index-DlWqcwmX.js";const H=()=>{const t=y.c(8),{t:s}=_(),{taskKey:l}=w(L),{data:a}=R(l);let i;t[0]!==s||t[1]!==a?(i=a?a.Title:s("sidebar.myTasks"),t[0]=s,t[1]=a,t[2]=i):i=t[2];let o;t[3]!==s?(o=s("common.title"),t[3]=s,t[4]=o):o=t[4];let r;return t[5]!==i||t[6]!==o?(r=e.jsx(F,{children:e.jsxs("title",{children:[i," | ",o]})}),t[5]=i,t[6]=o,t[7]=r):r=t[7],r};function L(t){return t.taskModalSlice}const P="_scrollViewport_c6gf3_1",$={scrollViewport:P},et=()=>{const t=y.c(22),{t:s}=_(),[l,a]=v(""),i=E.useRef(null),o=w(N);let r;t[0]!==o?(r=[o],t[0]=o,t[1]=r):r=t[1];let p;t[2]!==l||t[3]!==r?(p={performerIds:r,search:l,flatList:!0},t[2]=l,t[3]=r,t[4]=p):p=t[4];const{groupedBySprint:j,sprints:m,isError:u,isLoading:d,isFetching:k,isSearching:S}=D(p),T=m.length>0;let f;t[5]===Symbol.for("react.memo_cache_sentinel")?(f=e.jsx(H,{}),t[5]=f):f=t[5];let n;t[6]!==k||t[7]!==l||t[8]!==a?(n=e.jsx(A,{value:l,onChange:a,loading:k}),t[6]=k,t[7]=l,t[8]=a,t[9]=n):n=t[9];let x;t[10]===Symbol.for("react.memo_cache_sentinel")?(x={viewport:$.scrollViewport},t[10]=x):x=t[10];let c;t[11]!==j||t[12]!==T||t[13]!==u||t[14]!==d||t[15]!==S||t[16]!==m||t[17]!==s?(c=e.jsx(I,{viewportRef:i,type:"scroll",scrollbars:"y",offsetScrollbars:!0,h:"100%",mr:-14,mb:-16,classNames:x,children:u?e.jsx(b,{title:s("500.title"),description:s("500.description"),illustration:"500",buttons:[{buttonText:s("500.reload"),handleClick:U}]}):d?e.jsx(M,{builder:[[3],[1,2],[2,3]]}):T?e.jsx(g,{flex:1,pb:"md",children:e.jsx(C,{scrollRef:i,sprints:m,groupedBySprint:j,isError:u,isLoading:d,isMyTasks:!0})}):S?e.jsx(b,{title:s("nodata.noResults.title"),description:s("nodata.noResults.description"),illustration:"noResults"}):e.jsx(b,{title:s("nodata.noTasks.title"),description:s("nodata.noTasks.description"),illustration:"noTasks"})}),t[11]=j,t[12]=T,t[13]=u,t[14]=d,t[15]=S,t[16]=m,t[17]=s,t[18]=c):c=t[18];let h;return t[19]!==n||t[20]!==c?(h=e.jsxs(e.Fragment,{children:[f,e.jsx(V,{children:e.jsxs(g,{gap:"lg",h:"100%",children:[n,c]})})]}),t[19]=n,t[20]=c,t[21]=h):h=t[21],h};function N(t){return t.usersCache.currentUser.Id}function U(){return window.location.reload()}export{et as default};
