import{u as o,j as s,w as c,p as i}from"./vendor-rThclpOQ.js";import{S as l}from"./student-feedback-B1ea7LZJ.js";import{T as n}from"./table-footer-CXgex4hi.js";import{A as d,a as x,b as p}from"./avatar-BsP_s7dr.js";import{c as u}from"./utils-8KAaAB9H.js";import"./progress-B27dL7CW.js";import"./use-lang-BK6P2WMc.js";import"./dropdown-menu-Cm0H42C1.js";import"./route-B4ZMN77y.js";import"./button-ZcsoqUQn.js";import"./index-DquVdLUg.js";import"./scroll-area-BCwyUKIK.js";const _=()=>{const{props:a}=o(),{translate:m}=a,{frontend:t}=m;return s.jsxs(s.Fragment,{children:[s.jsx(l,{totalReviews:a.totalReviews}),s.jsxs("div",{className:"mt-6 border-t pt-6",children:[s.jsx("h3",{className:"mb-6 text-xl font-semibold",children:t.student_reviews}),s.jsx("div",{className:"space-y-6",children:a.reviews.data.length>0?a.reviews.data.map(e=>s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(d,{className:"mt-1 h-8 w-8",children:[s.jsx(x,{src:e.user.photo||"",alt:e.user.name,className:"object-cover"}),s.jsx(p,{children:e.user.name.charAt(0)})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:e.user.name}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex gap-1",children:[1,2,3,4,5].map(r=>s.jsx("button",{type:"button",children:s.jsx(c,{className:u("h-4 w-4",r<=e.rating?"fill-amber-400 text-amber-400":"text-gray-300")})},r))}),s.jsx("p",{className:"text-muted-foreground text-xs",children:i(new Date(e.created_at),"MMM d, yyyy h:mm a")})]})]})]}),s.jsx("p",{className:"mt-3 text-sm",children:e.review})]},e.id)):s.jsx("p",{className:"p-3 text-center",children:t.no_reviews_found})}),s.jsx(n,{className:"mt-6",routeName:"course.details",paginationInfo:a.reviews,routeParams:{slug:a.course.slug,id:a.course.id}})]})]})};export{_ as default};
