import{r as e,t}from"./jsx-runtime-BbTa8W_M-1776590214964.js";import{t as n}from"./useTranslation-D1etqd9u-1776590214964.js";import{t as r}from"./star-wSlMsd-z-1776590214964.js";import{t as i}from"./user-BksKc3Ev-1776590214964.js";import{n as a,r as o,t as s}from"./avatar-GrmkJk1Z-1776590214964.js";e();var c=t();function l({reviews:e}){let{t}=n();return!e||e.length===0?(0,c.jsx)(`div`,{className:`text-center py-8 text-muted-foreground border border-dashed rounded-xl`,children:t(`No reviews yet. Be the first to review!`)}):(0,c.jsx)(`div`,{className:`space-y-6`,children:e.map(e=>(0,c.jsxs)(`div`,{className:`flex gap-4 border-b border-border/50 pb-6 last:border-0 last:pb-0`,children:[(0,c.jsxs)(s,{className:`w-10 h-10 border bg-muted`,children:[(0,c.jsx)(o,{src:e.user?.avatar_path?`/storage/${e.user.avatar_path}`:``}),(0,c.jsx)(a,{children:(0,c.jsx)(i,{className:`w-5 h-5 text-muted-foreground`})})]}),(0,c.jsxs)(`div`,{className:`flex-1`,children:[(0,c.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,c.jsx)(`span`,{className:`font-bold text-sm`,children:e.user?.name||t(`Unknown User`)}),(0,c.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:new Date(e.created_at).toLocaleDateString()})]}),(0,c.jsx)(`div`,{className:`flex items-center gap-0.5 mb-2`,children:Array.from({length:5}).map((t,n)=>(0,c.jsx)(r,{className:`w-3.5 h-3.5 ${n<e.rating?`fill-amber-500 text-amber-500`:`fill-muted text-muted`}`},n))}),e.comment&&(0,c.jsx)(`p`,{className:`text-sm text-foreground/90 mt-2 leading-relaxed`,children:e.comment})]})]},e.id))})}export{l as t};