import{j as t,G as u,aE as d,S as i,q as y,b as l,aF as o,aw as x,r as A,aG as r}from"./index-n-59FgrC.js";import{C as j}from"./CommentHeader-NBlJ21_X.js";import{s as h,u as T}from"./useActivityData-C8TvooLi.js";import{u as g,H as I,a as C,b as f}from"./HistoryCreate-ChZ4ZCjJ.js";import"./useTaskTypesData-CgG6u01U.js";import"./IconArrowRight-DlXTlKKx.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:w({task:e,activity:n,statuses:p})},n.Id))}):t.jsx(x,{description:s("nodata.noActivity.title"),illustration:"noData",size:120,p:20})},w=({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};
