import{a as g,lW as v,g as A,b as S,ek as w,r as x,lX as C,q as j,j as r,B as s,_ as D,T as h,P as c}from"./index-d2b25495.js";import{A as I}from"./Avatar-9337c33f.js";import"./createSvgIcon-e39ae511.js";const R=()=>{var d;const{projectActivity:{projectActivityParams:u,activityList:a,selectedData:_},system:{userAccessList:P}}=g(e=>({projectActivity:v(e),system:A(e)})),m=S(),{id:f}=w();x.useEffect(()=>{m(C({...u,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=j(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(x.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 l;return{width:"24px",height:"24px",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",bgcolor:(l=n==null?void 0:n.palette)==null?void 0:l.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(h,{color:"primary",sx:{wordSpacing:3,fontSize:"16px"},mb:2,children:j(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(h,{variant:"subtitle2",sx:{fontSize:"16px"},color:"grey.700",children:t.user+"  ->  "+t.type+" "+t.table+"  ->  "+t.project})})]})]})})})]},b))},p)})]})})};export{R as default};
