import{l as d,d as p,aK as k,j as s,aL as T,b as g,S as o,ap as i,aM as S}from"./index-DTC0Ed21.js";import{T as f}from"./TasksSearchInput-CjnnmYfA.js";import{S as y}from"./Sprints-DugkuosL.js";import{u as b}from"./useTasksData-Vq9uamq9.js";import{H as I}from"./tasks-ClycqzjK.js";import"./useSprintDnd-Bl1igyj5.js";import"./useDnd-BDrl7hC3.js";import"./tasks-R9G1-k7v.js";import"./use-resize-observer-B2T5TxF-.js";import"./useTaskTypesData-DEDxUwkB.js";import"./Accordion-BmslGzqa.js";const M=()=>{const{t}=d(),{taskKey:e}=p(r=>r.taskModalSlice),{data:a}=k(e);return s.jsx(I,{children:s.jsxs("title",{children:[a?a.Title:t("sidebar.myTasks")," | ",t("common.title")]})})},K=()=>{const{t}=d(),[e,a]=T(""),r=p(j=>j.usersCache.currentUser.Id),{groupedBySprint:u,sprints:n,isError:l,isLoading:c,isFetching:m,isSearching:x}=b({performerIds:[r],search:e,flatList:!0}),h=n.length>0;return s.jsxs(s.Fragment,{children:[s.jsx(M,{}),s.jsx(g,{children:s.jsxs(o,{gap:"lg",flex:1,children:[s.jsx(f,{value:e,onChange:a,loading:m}),s.jsx(o,{flex:1,gap:0,children:l?s.jsx(i,{title:t("500.title"),description:t("500.description"),illustration:"500",buttons:[{buttonText:t("500.reload"),handleClick:()=>window.location.reload()}]}):c?s.jsx(S,{builder:[[3],[1,2],[2,3]]}):h?s.jsx(o,{children:s.jsx(y,{sprints:n,groupedBySprint:u,isError:l,isLoading:c,isMyTasks:!0})}):x?s.jsx(i,{title:t("nodata.noResults.title"),description:t("nodata.noResults.description"),illustration:"noResults"}):s.jsx(i,{title:t("nodata.noTasks.title"),description:t("nodata.noTasks.description"),illustration:"noTasks"})})]})})]})};export{K as default};
