import{j as e,aS as c,aT as m}from"./react-vendor-xYZnmIII.js";import{a as o,c as l,g as d,l as x}from"./ui-components-CQM92IK3.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./interactive-vendor-B1OgcAgP.js";const p=({enrollment:t,className:a})=>{var i,n;const{exam:s}=t,r=route("student.exam.show",{id:s.id,tab:"attempts"});return e.jsxs(o,{className:l("group",a),children:[e.jsx(c,{href:r,children:e.jsxs("div",{className:l("relative overflow-hidden","aspect-video"),children:[s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.title,className:"h-full w-full object-cover transition-transform group-hover:scale-105"}):e.jsx("div",{className:"from-primary/20 to-primary/5 flex h-full items-center justify-center bg-gradient-to-br",children:e.jsx("span",{className:"text-primary/30 text-4xl font-bold",children:s.title.charAt(0)})}),s.level&&e.jsx(d,{className:"absolute top-2 left-2 capitalize",children:s.level})]})}),e.jsx("div",{className:l("flex flex-col"),children:e.jsxs(x,{className:"p-4",children:[e.jsx(c,{href:r,children:e.jsx("h3",{className:"group-hover:text-primary mb-2 line-clamp-2 text-lg font-semibold transition-colors",children:s.title})}),s.short_description&&e.jsx("p",{className:"text-muted-foreground mb-3 line-clamp-2 text-sm",children:s.short_description}),e.jsxs("div",{className:"text-muted-foreground mb-3 flex items-center gap-1 text-sm",children:[e.jsx("span",{children:"by"}),e.jsx("span",{className:"font-medium",children:((n=(i=s.instructor)==null?void 0:i.user)==null?void 0:n.name)||"Instructor"})]})]})})]})},N=()=>{const{examEnrollments:t,translate:a}=m().props,{frontend:s}=a;return t&&t.length>0?e.jsx("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3",children:t.map(r=>e.jsx(p,{enrollment:r},r.id))}):e.jsx(o,{className:"flex items-center justify-center p-6",children:e.jsx("p",{children:s.no_courses_found})})};export{N as default};
