1import{j as e}from"./index-D239wB1B.js";import{u as i,a as c,S as d,g as m}from"./reviews.functions-DbDKku2S.js";function l({rating:t}){return e.jsx("div",{className:"flex items-center gap-0.5","aria-label":`${t} out of 5 stars`,children:Array.from({length:5}).map((a,r)=>e.jsx(d,{size:14,className:r<Math.round(t)?"fill-accent text-accent":"text-muted-foreground/30"},r))})}function g({heading:t="What our patients are saying"}){const a=i(m),{data:r,isLoading:n}=c({queryKey:["google-reviews"],queryFn:()=>a(),staleTime:1e3*60*60});return n||!r||r.reviews.length===0?null:e.jsxs("section",{className:"mx-auto max-w-6xl px-4 py-16",children:[e.jsxs("div",{className:"mb-10 text-center",children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.2em] text-primary",children:"Google reviews"}),e.jsx("h2",{className:"mt-2 font-serif text-3xl md:text-4xl",children:t}),r.rating!==null&&e.jsxs("div",{className:"mt-3 flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[e.jsx(l,{rating:r.rating}),e.jsx("span",{className:"font-medium text-foreground",children:r.rating.toFixed(1)}),r.ratingCount!==null&&e.jsxs("span",{children:["· ",r.ratingCount," Google reviews"]})]})]}),e.jsx("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",children:r.reviews.slice(0,6).map((s,o)=>e.jsxs("article",{className:"flex flex-col rounded-2xl border border-border/60 bg-card p-6 shadow-sm",children:[e.jsx(l,{rating:s.rating}),e.jsxs("p",{className:"mt-4 flex-1 text-sm leading-relaxed text-foreground/90 line-clamp-[10]",children:['"',s.text,'"']}),e.jsxs("div",{className:"mt-5 flex items-center gap-3 border-t border-border/60 pt-4",children:[s.authorPhoto?e.jsx("img",{src:s.authorPhoto,alt:s.author,className:"size-9 rounded-full object-cover",loading:"lazy",referrerPolicy:"no-referrer"}):e.jsx("div",{className:"flex size-9 items-center justify-center rounded-full bg-secondary text-xs font-semibold text-secondary-foreground",children:s.author.slice(0,1)}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:s.author}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s.relativeTime})]})]})]},o))}),r.googleMapsUri&&e.jsx("div",{className:"mt-8 text-center",children:e.jsx("a",{href:r.googleMapsUri,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center rounded-full border border-border bg-background px-6 py-3 text-sm font-medium hover:bg-secondary",children:"See all reviews on Google"})})]})}export{g as G};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.