import{j as e,L as o,u as m}from"./vendor-rThclpOQ.js";import{B as d}from"./badge-DJgeeB6N.js";import{C as c,b as x}from"./card-HXna_7vU.js";import{c as l}from"./utils-8KAaAB9H.js";import"./index-DquVdLUg.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(c,{className:l("group",a),children:[e.jsx(o,{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(o,{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"})]})]})})]})},b=()=>{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(c,{className:"flex items-center justify-center p-6",children:e.jsx("p",{children:s.no_courses_found})})};export{b as default};
