import{u as d,j as s,L as r,c9 as h,cf as j,w as u}from"./vendor-rThclpOQ.js";import{R as p}from"./rating-stars-CVLS44XM.js";import{A as g,a as f,b as N}from"./avatar-BsP_s7dr.js";import{B as v}from"./button-ZcsoqUQn.js";import{S as w}from"./separator-Cir9hccx.js";import"./utils-8KAaAB9H.js";import"./index-DquVdLUg.js";const k=({course:n})=>{const{props:c}=d(),{translate:i}=c,{frontend:a}=i,{instructor:e}=n,{user:t,courses:l}=e,o=l.reduce((m,x)=>m+(x.enrollments_count||0),0);return s.jsxs("div",{children:[s.jsx("h6",{className:"mb-4 text-xl font-semibold",children:a.instructor}),s.jsx(w,{className:"my-4"}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(r,{href:route("instructors.show",e.id),children:s.jsxs(g,{className:"h-12 w-12",children:[s.jsx(f,{src:t.photo||"",alt:"@shadcn",className:"object-cover"}),s.jsx(N,{children:"CN"})]})}),s.jsx(r,{href:route("instructors.show",e.id),children:s.jsxs("div",{className:"group",children:[s.jsx("h3",{className:"text-xl font-semibold group-hover:underline",children:t.name}),s.jsx("p",{className:"text-gray-500",children:t.email})]})}),s.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[s.jsx("span",{className:"text-xl font-semibold",children:e.total_average_rating?Number(e.total_average_rating).toFixed(1):0}),s.jsx(p,{rating:e.total_average_rating,starClass:"w-4 h-5"})]})]}),s.jsxs("div",{className:"mt-6 flex gap-8",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(h,{className:"h-5 w-5 text-gray-500"}),s.jsxs("span",{children:[o," ",a.students]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(j,{className:"h-5 w-5 text-gray-500"}),s.jsxs("span",{children:[l.length," Courses"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(u,{className:"h-5 w-5 text-gray-500"}),s.jsxs("span",{children:[e.total_reviews_count," Reviews"]})]})]}),s.jsx(v,{className:"mt-6",children:s.jsx(r,{href:route("instructors.show",e.id),children:a.view_details})})]})};export{k as default};
