"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../../utils/cn/cn.cjs.js"),v=require("../useComplexImageCarousel.cjs.js"),s=require("../../../src/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css"),u=require("../../Typography/Typography.cjs.js"),b=require("../../ProgressButton/ProgressButton.cjs.js"),w=({images:n})=>{const{MOBILE_BREAKPOINT:o,containerRef:m,carouselRef:p,imageRefs:g,descriptionRef:h,descriptionItemRef:f,progressButtonContainerRef:C,visible:r,cardSizes:a,handleCustomPrevClick:x,handleCustomNextClick:y,current:j,mobileCardIndex:c,xLargeCardIndex:l}=v.useComplexImageCarousel({images:n});return e.jsxs("div",{className:s.root,children:[e.jsxs("div",{ref:m,className:s.container,children:[e.jsx("div",{ref:p,className:s.carouselArea,children:r.length>0&&r.map((N,i)=>e.jsx("div",{className:t.cn(s.slideContainer,s[`size-${a[i]}`]),ref:d=>{d&&(g.current[i]=d)},"data-flip-id":`slide-${(j+i)%n.length}`,"data-size":a[i],children:e.jsx("img",{src:N.image,alt:`Slide ${i+1}`,className:s.image})},i+1))}),e.jsx("div",{ref:h,className:s.description,children:e.jsxs("div",{ref:f,className:t.cn("description-item",s.descriptionItem),children:[e.jsx(u.Typography,{as:"h3",defaultVariant:"headingLg",mobileVariant:"headingSm",children:typeof window!="undefined"&&window.innerWidth<=o?r[c].title:r[l].title}),e.jsx(u.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",className:s.text,children:typeof window!="undefined"&&window.innerWidth<=o?r[c].description:r[l].description})]})})]}),e.jsx("div",{ref:C,className:s.progressButtonContainer,children:e.jsx(b.ProgressButton,{left:{onClick:x},right:{onClick:y},className:t.cn("progress-buttons",s.progressButton)})})]})};exports.ComplexCarousel=w;
