https://try.nodecraft.com/0f4b0336-a1b1-437e-9162-aaec7a6e29e4/41e…/_astro/Testimonial44.hHfMXr4U.js
1import{j as e}from"./VariantContext.DvYRgBT-.js";import{r as p}from"./index.o9bRfbtw.js";const b=i=>/<[^>]+>/.test(i),g=({count:i=5})=>e.jsx("div",{className:"bem_testimonial__stars flex gap-1",children:Array.from({length:i}).map((n,r)=>e.jsx("span",{className:"bem_testimonial__star text-2xl",children:"â
"},`star-filled-${r}`))}),N=i=>{const{heading:n,ratingText:r,testimonials:s}={...u,...i},[c,d]=p.useState(0),l=s?.[c],m=s?.length||0,_=()=>{s&&d(t=>t===0?m-1:t-1)},x=()=>{s&&d(t=>t===m-1?0:t+1)},h=()=>{if(!s)return[];const t=[];for(let o=0;o<3;o++){const a=(c+o)%m;t.push({...s[a],originalIndex:a})}return t};return e.jsxs("section",{id:"testimonial44",className:"bem_testimonial",children:[e.jsx("div",{className:"bem_testimonial__header px-[5%] pt-16 pb-8 md:pt-20 md:pb-10 text-center",children:e.jsxs("div",{className:"container",children:[n&&(b(n)?e.jsx("h2",{className:"bem_testimonial__heading typo-h1 mb-6",style:{"--fw-h1":700},dangerouslySetInnerHTML:{__html:n}}):e.jsx("h2",{className:"bem_testimonial__heading typo-h1 mb-6",style:{"--fw-h1":700},children:n})),e.jsxs("div",{className:"bem_testimonial__rating-wrapper flex flex-col items-center gap-2",children:[e.jsx(g,{count:5}),r&&e.jsx("p",{className:"bem_testimonial__rating-text typo-body-sm uppercase tracking-wider",children:r})]})]})}),e.jsx("div",{className:"container px-[5%]",children:e.jsx("div",{className:"bem_testimonial__divider h-px bg-gray-600 opacity-30"})}),e.jsx("div",{className:"bem_testimonial__slider px-[5%] pt-6 pb-12 md:pt-10 md:pb-16",children:e.jsx("div",{className:"container",children:e.jsxs("div",{className:"bem_testimonial__content grid grid-cols-1 lg:grid-cols-[300px_1fr] gap-8 lg:gap-12",children:[e.jsx("div",{className:"bem_testimonial__quote-section order-2 lg:order-1",children:l&&e.jsxs(e.Fragment,{children:[e.jsxs("blockquote",{className:"bem_testimonial__quote typo-body text-lg mb-6",children:['"',l.quote,'"']}),e.jsx("div",{className:"bem_testimonial__author",children:e.jsxs("p",{className:"bem_testimonial__author-name typo-body",children:[e.jsx("strong",{children:l.authorName}),l.authorDescription&&`, ${l.authorDescription}`]})})]})}),e.jsxs("div",{className:"bem_testimonial__images-wrapper order-1 lg:order-2 overflow-hidden",children:[e.jsx("div",{className:"bem_testimonial__images-section relative",children:e.jsx("div",{className:"bem_testimonial__images-track flex items-start gap-3",children:h().map((t,o)=>{const a=o===0;return e.jsx("div",{className:"bem_testimonial__image-wrapper flex-shrink-0",style:{width:a?"400px":"140px",maxWidth:a?"400px":"140px",height:a?"500px":"340px"},children:e.jsx("img",{src:t.image.src,alt:t.image.alt||t.authorName,className:"bem_image bem_testimonial__image w-full h-full object-cover"})},t.authorName+t.originalIndex)})})}),s&&s.length>1&&e.jsxs("div",{className:"bem_testimonial__nav flex gap-2 mt-6 justify-end",children:[e.jsx("button",{onClick:_,className:"bem_testimonial__nav-btn bem_testimonial__nav-btn--prev w-10 h-10 rounded-full border-2 flex items-center justify-center transition-all","aria-label":"Previous testimonial",children:"â"}),e.jsx("button",{onClick:x,className:"bem_testimonial__nav-btn bem_testimonial__nav-btn--next w-10 h-10 rounded-full border-2 flex items-center justify-center transition-all","aria-label":"Next testimonial",children:"â"})]})]})]})})})]})},u={heading:'REAL MEMBERS.<br><span style="color: #d4a853;">REAL SUCCESS STORIES.</span>',ratingText:"4.5 AVERAGE RATING · 1618 REVIEWS",testimonials:[{quote:"I'm no longer concerned about counting calories or points, and when I have an off day or two, I don't feel bad or guilty about it...I've lost 15% of my body weight, am down a pant size, and will have to shop for new tops soon!",authorName:"Gina",authorDescription:"Real Calibrate Member",image:{src:"https://d22po4pjz3o32e.cloudfront.net/placeholder-image.svg",alt:"Gina"}}]};export{N as Testimonial44,u as Testimonial44Defaults};
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.