import{u as m,j as s,L as x,cb as h,aA as p,c9 as j,i as u}from"./vendor-rThclpOQ.js";import{R as g}from"./rating-stars-CVLS44XM.js";import{A as f,a as N,b as v}from"./avatar-BsP_s7dr.js";import{c as b}from"./course-languages-DcPHNS0l.js";import{e as w}from"./utils-8KAaAB9H.js";const R=({course:a})=>{const{props:n}=m(),{translate:i}=n,{frontend:l}=i,{title:c,short_description:o,instructor:e,average_rating:r}=a,t=b.find(d=>d.value===a.language);return s.jsxs("div",{className:"space-y-7",children:[s.jsx("h1",{className:"text-3xl font-semibold md:text-4xl",children:c}),s.jsx("p",{children:o}),s.jsxs("div",{className:"grid grid-cols-2 gap-y-4 lg:grid-cols-3",children:[s.jsx(x,{href:route("instructors.show",e.id),children:s.jsxs("div",{className:"group flex items-center gap-2",children:[s.jsxs(f,{children:[s.jsx(N,{src:e.user.photo||"",alt:e.user.name,className:"object-cover"}),s.jsx(v,{children:e.user.name[0]})]}),s.jsx("span",{className:"font-medium group-hover:underline",children:e.user.name})]})}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("p",{className:"font-semibold",children:r?Number(r).toFixed(1):0}),s.jsx(g,{rating:r||0,starClass:"w-4 h-5"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(h,{className:"h-5 w-5"}),s.jsx("span",{children:t==null?void 0:t.label})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(p,{className:"h-5 w-5"}),s.jsx("span",{children:l.course_certificate})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(j,{className:"h-5 w-5"}),s.jsxs("span",{children:[a.enrollments_count||0," ",l.enrolled_students]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(u,{className:"h-5 w-5"}),s.jsx("span",{children:w(a)})]})]})]})};export{R as default};
