import{j as s,L as o,u as n}from"./vendor-BKmmeuxg.js";import{A as i,a as d,b as m}from"./avatar-j28afJTV.js";import{C as l,a as u,b as h}from"./card-D9_SJYq6.js";import{c as x}from"./utils-DxSsnXxD.js";const j=({enrollment:r,className:t})=>{const{course:e}=r;return s.jsxs(l,{className:x("overflow-hidden shadow-sm",t),children:[s.jsx(u,{className:"p-0",children:s.jsx(o,{className:"p-2 pb-0",href:route("student.course.show",{id:e.id,tab:"modules"}),children:s.jsx("div",{className:"relative h-[220px] w-full overflow-hidden rounded-lg",children:s.jsx("img",{src:e.thumbnail||"/assets/images/blank-image.jpg",alt:e.title,className:"h-full w-full object-cover transition-transform duration-300 hover:scale-105",onError:a=>{const c=a.target;c.src="/assets/images/blank-image.jpg"}})})})}),s.jsxs(h,{className:"p-4",children:[s.jsx("div",{className:"mb-3 flex items-center gap-2",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(i,{className:"h-5 w-5",children:[s.jsx(d,{src:e.instructor.user.photo||"",alt:e.instructor.user.name,className:"object-cover"}),s.jsx(m,{children:"IM"})]}),s.jsx("p",{className:"text-xs font-medium",children:e.instructor.user.name})]})}),s.jsx(o,{href:route("student.course.show",{id:e.id,tab:"modules"}),children:s.jsx("p",{className:"hover:text-secondary-foreground text-sm font-semibold",children:e.title})})]})]})},N=()=>{const{courseEnrollments:r,translate:t}=n().props,{frontend:e}=t;return r&&r.length>0?s.jsx("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3",children:r.map(a=>s.jsx(j,{enrollment:a},a.id))}):s.jsx(l,{className:"flex items-center justify-center p-6",children:s.jsx("p",{children:e.no_courses_found})})};export{N as default};
