(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[105],{7027:function(e,t,s){Promise.resolve().then(s.bind(s,5844))},9376:function(e,t,s){"use strict";var n=s(5475);s.o(n,"usePathname")&&s.d(t,{usePathname:function(){return n.usePathname}}),s.o(n,"useRouter")&&s.d(t,{useRouter:function(){return n.useRouter}})},5844:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return d}});var n=s(7437),a=s(2265),r=s(9376);let i={LaunchTask:"\uD83D\uDCCB",SubscriptionTier:"\uD83D\uDCB0",ContentSession:"\uD83D\uDCC5",FunnelMetric:"\uD83D\uDCCA"},c={created:"text-green-400",updated:"text-blue-400",recorded:"text-purple-400"};function d(){let[e,t]=(0,a.useState)([]),[s,d]=(0,a.useState)(!0),u=(0,r.useRouter)();if((0,a.useEffect)(()=>{fetch("/api/activity").then(e=>401===e.status?(u.push("/login"),null):e.json()).then(e=>{e&&t(e.logs),d(!1)})},[u]),s)return(0,n.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,n.jsx)("div",{className:"text-brand-muted",children:"Loading..."})});let l=new Map;return e.forEach(e=>{let t=new Date(e.createdAt).toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"});l.has(t)||l.set(t,[]),l.get(t).push(e)}),(0,n.jsxs)("div",{className:"max-w-4xl mx-auto space-y-6",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"text-2xl font-bold text-brand-text",children:"Activity Log"}),(0,n.jsx)("p",{className:"text-brand-muted text-sm mt-1",children:"Auto-logged from dashboard actions"})]}),(0,n.jsxs)("div",{className:"space-y-8",children:[Array.from(l.entries()).map(e=>{let[t,s]=e;return(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-xs font-semibold text-brand-muted uppercase tracking-wider mb-4",children:t}),(0,n.jsx)("div",{className:"space-y-1",children:s.map(e=>(0,n.jsxs)("div",{className:"flex items-start gap-4 py-3 px-4 rounded-lg hover:bg-brand-card/50 transition-colors group",children:[(0,n.jsx)("div",{className:"text-lg shrink-0 mt-0.5",children:i[e.entity]||"\uD83D\uDCDD"}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsxs)("p",{className:"text-sm text-brand-text",children:[(0,n.jsx)("span",{className:"font-medium",children:e.user.name})," ",(0,n.jsx)("span",{className:c[e.action]||"text-brand-muted",children:e.action})," ",(0,n.jsx)("span",{className:"text-brand-muted",children:e.entity.replace(/([A-Z])/g," $1").trim()})]}),e.details&&(0,n.jsx)("p",{className:"text-xs text-brand-muted mt-0.5 truncate",children:e.details})]}),(0,n.jsx)("span",{className:"text-xs text-brand-muted shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:new Date(e.createdAt).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})})]},e.id))})]},t)}),0===e.length&&(0,n.jsx)("div",{className:"bg-brand-card border border-brand-border rounded-xl p-12 text-center",children:(0,n.jsx)("p",{className:"text-brand-muted",children:"No activity recorded yet. Actions taken in the dashboard will appear here."})})]})]})}}},function(e){e.O(0,[971,117,744],function(){return e(e.s=7027)}),_N_E=e.O()}]);