import{a as g,m4 as v,h as A,b as S,eh as w,r as l,m5 as C,t as h,j as r,B as s,_ as D,T as j,Q as c}from"./index-def636a4.js";import{A as I}from"./Avatar-03680000.js";import"./createSvgIcon-ff487f53.js";const Y=()=>{var d;const{projectActivity:{projectActivityParams:m,activityList:a,selectedData:_},system:{userAccessList:E}}=g(e=>({projectActivity:v(e),system:A(e)})),u=S(),{id:f}=w();l.useEffect(()=>{u(C({...m,search:"",page:1,project:f}))},[]);function y(e){return e==="Create"?"Created":e==="Update"?"Updated":e==="Delete"?"Deleted":e}const o={};return a==null||a.forEach((e,p)=>{var t;const i=h(e.created_on).format("YYYY-MM-DD hh:mm:ss a");o[i]=[{date:e.created_on,type:y(e.type_name),variant:"#15d1e9",table:e.screen_name,project:e.instance_code,user:(t=e.user)==null?void 0:t.username}]}),r.jsx(s,{sx:{px:2},children:r.jsxs(s,{sx:{"& > *:not(:first-child)":{mt:2},position:"relative"},children:[r.jsx(s,{sx:e=>({position:"absolute",border:"2px solid",borderColor:e==null?void 0:e.palette.primary.main,height:"100%",top:1,left:"40px",insetInlineStart:{md:"0%"},translate:"-50%",zIndex:0})}),(d=Object.keys(o))==null?void 0:d.map((e,p)=>{var i;return r.jsx(l.Fragment,{children:(i=o[e])==null?void 0:i.map((t,b)=>r.jsxs(s,{sx:{display:"flex",alignItems:"flex-start",mb:2},children:[r.jsx(s,{sx:{position:"",left:{xs:"40px",md:"50%"},translate:"-50%"},children:r.jsx(s,{sx:n=>{var x;return{width:"24px",height:"24px",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",bgcolor:(x=n==null?void 0:n.palette)==null?void 0:x.primary.main}},children:r.jsx(s,{sx:{width:"8px",height:"8px",bgcolor:"white",borderRadius:"50%"}})})}),r.jsx(s,{sx:{width:"100%"},children:r.jsx(s,{sx:{position:"relative",marginInlineStart:{md:"0px"},ml:{md:"0px",xs:"0px"}},children:r.jsxs(D,{sx:{boxShadow:"none",borderBottom:"2px solid",borderColor:"divider",borderRadius:"0"},children:[r.jsx(j,{color:"primary",sx:{wordSpacing:3,fontSize:"16px"},mb:2,children:h(t.date).format("LLL").toUpperCase()}),r.jsxs(c,{container:!0,spacing:2,pb:2,alignItems:"center",children:[r.jsx(c,{children:r.jsx(I,{sx:{width:30,height:30},src:"",alt:""})}),r.jsx(c,{children:r.jsx(j,{variant:"subtitle2",sx:{fontSize:"16px"},color:"grey.700",children:t.user+"  ->  "+t.type+" "+t.table+"  ->  "+t.project})})]})]})})})]},b))},p)})]})})};export{Y as default};
