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";e();var i=t();function a({avgRating:e,totalReviews:t,ratingCounts:a}){let{t:o}=n();return(0,i.jsxs)(`div`,{className:`flex flex-col md:flex-row gap-8 items-center bg-muted/10 p-6 rounded-xl border border-border/50`,children:[(0,i.jsxs)(`div`,{className:`flex flex-col items-center justify-center min-w-[150px]`,children:[(0,i.jsx)(`h3`,{className:`text-5xl font-black text-foreground`,children:e.toFixed(1)}),(0,i.jsx)(`div`,{className:`flex items-center mt-2 mb-1`,children:(e=>Array.from({length:5}).map((t,n)=>(0,i.jsx)(r,{className:`w-5 h-5 ${n<Math.round(e)?`fill-amber-500 text-amber-500`:`fill-muted text-muted`}`},n)))(e)}),(0,i.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[t,` `,o(`Reviews`)]})]}),(0,i.jsx)(`div`,{className:`flex-1 w-full space-y-2`,children:[5,4,3,2,1].map(e=>{let n=a[e]||0,o=t>0?n/t*100:0;return(0,i.jsxs)(`div`,{className:`flex items-center gap-3 text-sm`,children:[(0,i.jsxs)(`span`,{className:`w-12 flex items-center gap-1 font-medium`,children:[e,` `,(0,i.jsx)(r,{className:`w-3 h-3 fill-amber-500 text-amber-500`})]}),(0,i.jsx)(`div`,{className:`flex-1 h-2.5 bg-muted rounded-full overflow-hidden`,children:(0,i.jsx)(`div`,{className:`h-full bg-amber-500 rounded-full`,style:{width:`${o}%`}})}),(0,i.jsx)(`span`,{className:`w-10 text-right text-muted-foreground`,children:n})]},e)})})]})}export{a as t};