import{c as x,j as s,aN as h,n as j,S as f,G as T,u as I,aO as A,r as v,aP as u,av as g}from"./index-26FXPGkN.js";import{C as S}from"./CommentHeader--C4VAG06.js";import{s as C,u as k}from"./useActivityData-K4EnTVaR.js";import{u as w,H as D,a as H,b as L}from"./HistoryCreate-CSpPsajx.js";import"./useTaskTypesData-CFzDcAWE.js";import"./IconArrowRight-BTNBWTJ0.js";const _=m=>{const t=x.c(14),{task:a,activity:r}=m;let e;t[0]!==r.Author?(e=s.jsx(h,{size:36,user:r.Author}),t[0]=r.Author,t[1]=e):e=t[1];let l;t[2]!==r||t[3]!==a?(l=s.jsx(S,{activity:r,task:a,showType:!0}),t[2]=r,t[3]=a,t[4]=l):l=t[4];let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c={whiteSpace:"pre-line"},t[5]=c):c=t[5];let o;t[6]!==r.Description?(o=s.jsx(j,{fz:14,c:"dark",style:c,children:r.Description}),t[6]=r.Description,t[7]=o):o=t[7];let p;t[8]!==l||t[9]!==o?(p=s.jsxs(f,{gap:6,w:"100%",children:[l,o]}),t[8]=l,t[9]=o,t[10]=p):p=t[10];let n;return t[11]!==e||t[12]!==p?(n=s.jsxs(T,{className:C.comment,wrap:"nowrap",children:[e,p]}),t[11]=e,t[12]=p,t[13]=n):n=t[13],n},$=m=>{const t=x.c(14),{task:a}=m,{t:r}=I(),{data:e,isLoading:l}=k(a.Id);let c;t[0]!==e||t[1]!==a.SprintId?(c={sprintId:a.SprintId,activityData:e},t[0]=e,t[1]=a.SprintId,t[2]=c):c=t[2];const{statuses:o,isLoading:p}=w(c);if(l||p){let i;return t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(f,{gap:16,mt:12,children:[s.jsx(A.Comment,{}),s.jsx(A.Comment,{})]}),t[3]=i):i=t[3],i}if(!e.length){let i;t[4]!==r?(i=r("nodata.noActivity.title"),t[4]=r,t[5]=i):i=t[5];let d;return t[6]!==i?(d=s.jsx(g,{description:i,illustration:"noData",size:120,p:20}),t[6]=i,t[7]=d):d=t[7],d}let n;t[8]!==e||t[9]!==o||t[10]!==a?(n=e==null?void 0:e.map(i=>s.jsx(v.Fragment,{children:b({task:a,activity:i,statuses:o})},i.Id)),t[8]=e,t[9]=o,t[10]=a,t[11]=n):n=t[11];let y;return t[12]!==n?(y=s.jsx(f,{gap:16,mt:12,children:n}),t[12]=n,t[13]=y):y=t[13],y},b=({task:m,activity:t,statuses:a})=>{switch(t.Type){case u.IActivityType.Comment:return s.jsx(_,{task:m,activity:t});case u.IActivityType.ChangeStatus:case u.IActivityType.ChangeTask:case u.IActivityType.AssignTask:return s.jsx(L,{sprintId:m.SprintId,activity:t,statuses:a});case u.IActivityType.UploadAttachments:return s.jsx(H,{activity:t});case u.IActivityType.AddTask:return s.jsx(D,{activity:t});default:return null}};export{$ as default};
