import{d as M,s as z,c as e,o as s,a,t as o,F as d,g as m,i as u,u as l,h as C,n as D}from"./app-Do7K7VDV.js";import{_ as F}from"./AdminLayout-DeT_GLTC.js";import{h as _}from"./moment-BAtM24Ew.js";import"./AssetModal-C18ToIEK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./InputFieldError-0BmYlL24.js";import"./ToastrContainer-CtYDvNPN.js";const B={class:"card card-body"},N={class:"card-title"},V={class:"table-hover table-bordered table"},j={key:0},S={class:"capitalize"},A={key:1},E={class:"capitalize"},O={key:2},T={key:3},$={class:"capitalize"},q={class:"text-xs"},G={key:0,class:"text-red-600"},H={key:1,class:"text-red-600"},I={class:"text-xs"},J={key:0},K={key:1},P=M({layout:F}),et=Object.assign(P,{__name:"Show",props:["activityLog"],setup(i){const{trim:h}=z(),g=["id","log_name","meta","uuid","user_id","creator_id","workspace_id","loggable_type","loggable_id","updated_at","user","creator","workspace"],p=["user","creator","workspace"];return(y,f)=>{var b;return s(),e("div",B,[a("h5",N,o(y.trans("Activity Logs")),1),a("table",V,[a("tbody",null,[(s(!0),e(d,null,m(i.activityLog,(n,t)=>(s(),e("tr",{key:n},[g.includes(t)?u("",!0):(s(),e("td",j,[a("span",S,o(l(h)(t)),1)])),p.includes(t)?(s(),e("td",A,[a("span",E,o(l(h)(t)),1)])):u("",!0),g.includes(t)?u("",!0):(s(),e("td",O,[a("pre",null,o(n),1)])),p.includes(t)?(s(),e("td",T,[(s(!0),e(d,null,m(n,(c,r)=>(s(),e("span",{key:c},[a("pre",null,o(r)+" : "+o(c),1)]))),128))])):u("",!0)]))),128)),a("tr",null,[a("td",null,[a("span",$,o(y.trans("Meta")),1)]),a("td",null,[i.activityLog.event==="updated"?(s(!0),e(d,{key:0},m(((b=i.activityLog.meta)==null?void 0:b.old)||{},(n,t)=>{var c,r,v,k,L,Y,w,x;return s(),e("div",{key:t,class:"flex items-center gap-x-2"},[a("span",null,o(t)+" :",1),a("div",q,[a("div",null,[t.includes("_at")?(s(),e("span",G,o(l(_)(n).format("DD/MM/YYYY, h:mm a")),1)):(s(),e("span",H,o(n),1)),f[0]||(f[0]=C(" → ",-1)),t.includes("_at")&&((r=(c=i.activityLog.meta)==null?void 0:c.new)!=null&&r[t])?(s(),e("span",{key:2,class:D({"font-semibold text-green-600":((k=(v=i.activityLog.meta)==null?void 0:v.new)==null?void 0:k[t])!==n})},o(l(_)(i.activityLog.meta.new[t]).format("DD/MM/YYYY, h:mm a")),3)):(s(),e("span",{key:3,class:D({"font-semibold text-green-600":((Y=(L=i.activityLog.meta)==null?void 0:L.new)==null?void 0:Y[t])!==n})},o((x=(w=i.activityLog.meta)==null?void 0:w.new)==null?void 0:x[t]),3))])])])}),128)):(s(!0),e(d,{key:1},m(i.activityLog.meta,(n,t)=>(s(),e("div",{key:t,class:"flex items-center gap-2"},[a("span",null,o(t)+" :",1),a("div",I,[t.includes("_at")&&n?(s(),e("span",J,o(l(_)(n).format("DD/MM/YYYY, h:mm a")),1)):(s(),e("span",K,o(n),1))])]))),128))])])])])])}}});export{et as default};
