"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),j=require("swiper/modules"),p=require("swiper/react"),h=require("../../utils/cn/cn.cjs.js"),q=require("../../utils/useSwiper/useSwiper.cjs.js");;/* empty css                                                                         */;/* empty css                                                                                     */;/* empty css                                                                                     */const r=require("../../src/components/ProductGallery/productGallery.module.css"),m=require("../ProgressButton/ProgressButton.cjs.js"),b=require("../ProductGalleryCard/ProductGalleryCard.cjs.js"),v=[j.Navigation],N=({slides:i,header:w,isTabbed:t=!1})=>{const{swiper:n,activeIndex:o,isEnd:a,setIsEnd:S,hideNav:g,handleSlideChange:C,handlePrevClick:l,handleNextClick:c,onSwiperInit:x,handleSwiperResize:P,handleSlideTo:d}=q.useSwiper();return u.useEffect(()=>{n==null||n.setProgress(0,300)},[n]),u.useEffect(()=>{i.length&&d(0)},[i,d]),e.jsxs("div",{className:r.root,children:[e.jsxs("div",{className:h.cn(r.topRow,{[r.topRowTabbed]:t}),children:[e.jsx("div",{className:r.headerWrapper,children:w}),e.jsx("div",{className:h.cn(r.swiperControlsDesktop,{[r.swiperControlsHidden]:g,[r.swiperControlsTabbed]:t}),children:e.jsx(m.ProgressButton,{left:{disabled:o<=0,onClick:l},right:{disabled:a,onClick:c}})})]}),e.jsx("div",{className:r.carouselArea,children:e.jsx(p.Swiper,{onSwiper:x,onResize:P,onSlideChange:C,onReachEnd:()=>S(!0),modules:v,spaceBetween:0,slidesPerView:"auto",className:r.swiper,children:i.map(s=>e.jsx(p.SwiperSlide,{className:r.swiperSlide,children:e.jsx(b.ProductGalleryCard,{name:s.name,price:s.price,image:s.image,link:s.link,buttons:s.buttons,zenpatientId:s.zenpatientId})},`${s.name}_${s.link}`))})}),e.jsx("div",{className:r.swiperControlsMobile,children:e.jsx(m.ProgressButton,{left:{disabled:o<=0,onClick:l},right:{disabled:a,onClick:c}})})]})};exports.ProductGallery=N;
