"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),v=require("swiper/modules"),d=require("swiper/react");;/* empty css                                                                         */;/* empty css                                                                                     */;/* empty css                                                                                     */const R=require("../../utils/useSwiper/useSwiper.cjs.js"),s=require("../../src/modules/Testimonial/testimonial.module.css"),h=require("../../components/RatingStars/RatingStars.cjs.js"),k=require("../../components/Typography/Typography.cjs.js"),q=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),g=require("../../components/ProgressButton/ProgressButton.cjs.js"),C=require("./components/VideoCard/VideoCard.cjs.js"),w=require("./components/TextCard/TextCard.cjs.js"),_=[v.Navigation],y=({title:u,rating:i,reviews:m})=>{const{activeIndex:p,isEnd:r,isBeginning:a,hideNav:t,handleSlideChange:x,handlePrevClick:o,handleNextClick:l,onSwiperInit:S,handleSwiperResize:j,handleReachEnd:b,handleReachBeginning:N}=R.useSwiper();return e.jsxs("section",{className:s.root,children:[e.jsxs("div",{className:s.headerContainer,children:[i&&e.jsxs("div",{className:s.ratingContainer,children:[!!i.stars&&e.jsx("div",{className:s.desktop,children:e.jsx(h.RatingStars,{rating:i.stars,size:"lg"})}),!!i.stars&&e.jsx("div",{className:s.mobile,children:e.jsx(h.RatingStars,{rating:i.stars,size:"sm"})}),!!i.totalReviews&&e.jsxs(k.Typography,{as:"p",defaultVariant:"labelLg",mobileVariant:"labelSm",emphasis:!0,weight:"regular",children:[i.totalReviews,"+ member reviews"]})]}),e.jsxs("div",{className:s.headerRow,children:[e.jsx(q.HighlightedTitle,{title:u,colorScheme:"light"}),!t&&e.jsx("div",{className:s.desktopNavigation,children:e.jsx(g.ProgressButton,{left:{disabled:a,onClick:o},right:{disabled:r,onClick:l}})})]})]}),e.jsx("div",{className:s.content,children:e.jsx(d.Swiper,{onSwiper:S,onResize:j,onSlideChange:x,onReachEnd:b,onReachBeginning:N,modules:_,spaceBetween:0,slidesPerView:"auto",className:s.swiper,children:m.map((n,c)=>e.jsx(d.SwiperSlide,{className:s.swiperSlide,children:n.background.type==="video"?e.jsx(C.VideoCard,{...n,background:n.background,isActive:p===c}):e.jsx(w.TextCard,{...n,background:n.background})},`${n.background.type}_${c}`))})}),!t&&e.jsx("div",{className:s.mobileNavigation,children:e.jsx(g.ProgressButton,{left:{disabled:a,onClick:o},right:{disabled:r,onClick:l}})})]})};exports.Testimonial=y;
