import{j as t,H as u,aD as d,S as i,M as y,l,aE as o,ap as x,r as A,aF as r}from"./index-DTC0Ed21.js";import{C as j}from"./CommentHeader-D1RTY24j.js";import{s as h,u as T}from"./useActivityData-B5503wCJ.js";import{u as g,H as I,a as C,b as f}from"./HistoryCreate-DmLtlI9_.js";import"./useTaskTypesData-DEDxUwkB.js";import"./IconArrowRight-BEyjYI9V.js";const v=({task:e,activity:s})=>t.jsxs(u,{className:h.comment,wrap:"nowrap",children:[t.jsx(d,{size:36,user:s.Author}),t.jsxs(i,{gap:6,w:"100%",children:[t.jsx(j,{activity:s,task:e,showType:!0}),t.jsx(y,{fz:14,c:"dark",style:{whiteSpace:"pre-line"},children:s.Description})]})]}),E=({task:e})=>{const{t:s}=l(),{data:a,isLoading:c}=T(e.Id),{statuses:p,isLoading:m}=g({sprintId:e.SprintId,activityData:a});return c||m?t.jsxs(i,{gap:16,mt:12,children:[t.jsx(o.Comment,{}),t.jsx(o.Comment,{})]}):a.length?t.jsx(i,{gap:16,mt:12,children:a==null?void 0:a.map(n=>t.jsx(A.Fragment,{children:S({task:e,activity:n,statuses:p})},n.Id))}):t.jsx(x,{description:s("nodata.noActivity.title"),illustration:"noData",size:120,p:20})},S=({task:e,activity:s,statuses:a})=>{switch(s.Type){case r.IActivityType.Comment:return t.jsx(v,{task:e,activity:s});case r.IActivityType.ChangeStatus:case r.IActivityType.ChangeTask:case r.IActivityType.AssignTask:return t.jsx(f,{sprintId:e.SprintId,activity:s,statuses:a});case r.IActivityType.UploadAttachments:return t.jsx(C,{activity:s});case r.IActivityType.AddTask:return t.jsx(I,{activity:s});default:return null}};export{E as default};
