import{j as e}from"./react-vendor-xYZnmIII.js";import{g as n}from"./ui-components-CQM92IK3.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./interactive-vendor-B1OgcAgP.js";const u=(s,i)=>{const{table:a}=i;return[{id:"index",header:()=>e.jsx("div",{className:"pl-4",children:"#"}),cell:({row:t})=>e.jsx("div",{className:"w-4 pl-4 text-center font-medium",children:t.index+1})},{id:"name",header:a.name,cell:({row:t})=>{const r=t.original.user;return e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"bg-muted h-12 w-12 overflow-hidden rounded-full",children:r.photo?e.jsx("img",{src:r.photo,alt:r.name,className:"h-full w-full object-cover"}):e.jsx("div",{className:"flex h-full w-full items-center justify-center bg-gray-200 text-gray-500",children:e.jsx("span",{className:"text-lg",children:a.img_placeholder})})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:r.name}),e.jsx("p",{className:"text-muted-foreground text-sm",children:r.email})]})]})}},{id:"enrolled_course",header:()=>s==="course"?a.enrolled_course:"Enrolled Exam",cell:({row:t})=>{const r=t.original,l=t.original;return e.jsx("div",{className:"max-w-md",children:e.jsx("p",{className:"line-clamp-1",children:s==="course"?l.course.title:r.exam.title})})}},{id:"enrolled_date",header:a.enrolled_date,cell:({row:t})=>{const l=new Date(t.original.entry_date).toLocaleDateString("en-US",{month:"long",day:"2-digit",year:"numeric"});return e.jsx("div",{children:l})}},{id:"expiry_date",header:()=>e.jsx("div",{className:"pr-4 text-end",children:a.expiry_date}),cell:({row:t})=>{if(!t.original.expiry_date)return e.jsx("div",{className:"pr-4 text-end",children:e.jsx(n,{className:"bg-green-100 text-green-800 hover:bg-green-100",children:a.lifetime_access})});const l=new Date(t.original.expiry_date).toLocaleDateString("en-US",{month:"long",day:"2-digit",year:"numeric"});return e.jsx("div",{className:"pr-4 text-end",children:l})}}]};export{u as default};
