import{b as d,v as p,aI as k,j as s,aJ as T,a as g,S as o,aw as i,aK as S}from"./index-n-59FgrC.js";import{T as f}from"./TasksSearchInput-5LSyivTU.js";import{S as y}from"./Sprints-DNKHb2ly.js";import{u as I}from"./useTasksData-B6wVLlCr.js";import{H as b}from"./useTaskTypesData-CgG6u01U.js";import"./useSprintDnd-CJDVVJPx.js";import"./useDnd-BLM6vUjp.js";import"./tasks-CZQGFm5u.js";import"./get-env-uyVen0u2.js";import"./use-resize-observer-Bh8oaK16.js";import"./Accordion-DVbX6gPb.js";const M=()=>{const{t}=d(),{taskKey:e}=p(r=>r.taskModalSlice),{data:a}=k(e);return s.jsx(b,{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}=I({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};
