{"version":3,"file":"Carousel.Bs7HDDFf.mjs","names":[],"sources":["https:/framerusercontent.com/modules/xxj4QJxGWKuBIOkgt0w6/UJINElL0Te7U9zIRsSBr/Carousel.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/components/auto-sizing\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function Carousel({firstImage,secondImage,thirdImage,fourthImage,fifthImage,objectFit,progressBar,prograssBarMargin,style}){const images=[firstImage,secondImage,thirdImage,fourthImage,fifthImage].filter(Boolean);const totalSlides=images.length;const extendedImages=[images[totalSlides-1],...images,images[0]];const[currentIndex,setCurrentIndex]=useState(1);const[isTransitioning,setIsTransitioning]=useState(false);useEffect(()=>{if(currentIndex===0){setTimeout(()=>{setIsTransitioning(false);setCurrentIndex(totalSlides);},500);}else if(currentIndex===totalSlides+1){setTimeout(()=>{setIsTransitioning(false);setCurrentIndex(1);},500);}},[currentIndex,totalSlides]);const nextSlide=()=>{setIsTransitioning(true);setCurrentIndex(prevIndex=>prevIndex+1);};const prevSlide=()=>{setIsTransitioning(true);setCurrentIndex(prevIndex=>prevIndex-1);};const showButton=totalSlides>1;return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\"},children:[/*#__PURE__*/_jsxs(motion.div,{style:{...style,display:\"flex\",alignItems:\"center\",overflow:\"hidden\",borderRadius:\"24px\",position:\"relative\",width:\"100%\"},children:[showButton&&/*#__PURE__*/_jsx(\"button\",{onClick:prevSlide,style:{position:\"absolute\",top:\"50%\",left:\"10px\",background:\"transparent\",height:\"fit-content\",width:\"fit-content\",border:\"none\",cursor:\"pointer\",transform:\"translateY(-50%)\",zIndex:1},children:/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",fill:\"#FFFFFFB2\",width:\"36px\",height:\"36px\",viewBox:\"0 0 340 340\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M165,0C74.019,0,0,74.019,0,165s74.019,165,165,165s165-74.019,165-165S255.981,0,165,0z M205.606,234.394   c5.858,5.857,5.858,15.355,0,21.213C202.678,258.535,198.839,260,195,260s-7.678-1.464-10.606-4.394l-80-79.998   c-2.813-2.813-4.394-6.628-4.394-10.606c0-3.978,1.58-7.794,4.394-10.607l80-80.002c5.857-5.858,15.355-5.858,21.213,0   c5.858,5.857,5.858,15.355,0,21.213l-69.393,69.396L205.606,234.394z\"})})}),/*#__PURE__*/_jsx(\"div\",{style:{...style,display:\"flex\",alignItems:\"center\",transition:isTransitioning?\"transform 0.5s ease-in-out\":\"none\",transform:`translateX(-${currentIndex*100}%)`,width:\"100%\"},children:extendedImages.map((item,index)=>item?.src&&/*#__PURE__*/_jsx(\"img\",{src:item.src,alt:`Slide ${index}`,style:{objectFit,width:\"100%\",height:\"100%\",flexShrink:0}},index))}),showButton&&/*#__PURE__*/_jsx(\"button\",{onClick:nextSlide,style:{position:\"absolute\",top:\"50%\",right:\"10px\",background:\"transparent\",height:\"fit-content\",width:\"fit-content\",border:\"none\",cursor:\"pointer\",transform:\"translateY(-50%)\",zIndex:1},children:/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",fill:\"#FFFFFFB2\",height:\"36px\",width:\"36px\",viewBox:\"0 0 340 340\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M165,0C74.019,0,0,74.019,0,165s74.019,165,165,165s165-74.019,165-165S255.981,0,165,0z M225.606,175.605  l-80,80.002C142.678,258.535,138.839,260,135,260s-7.678-1.464-10.606-4.394c-5.858-5.857-5.858-15.355,0-21.213l69.393-69.396  l-69.393-69.392c-5.858-5.857-5.858-15.355,0-21.213c5.857-5.858,15.355-5.858,21.213,0l80,79.998  c2.814,2.813,4.394,6.628,4.394,10.606C230,168.976,228.42,172.792,225.606,175.605z\"})})})]}),progressBar&&images.length>0&&/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",justifyContent:\"center\",margin:\"0 auto\",marginTop:`${prograssBarMargin}px`,width:\"90%\"},children:images.map((_,index)=>/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"2px\",borderRadius:!index?\"2px 0 0 2px\":index===images.length-1?\"0 2px 2px 0\":0,backgroundColor:currentIndex-1===index?\"#000000\":\"#CCCCCC\",transition:\"background-color 0.3s ease-in-out\"}},index))})]});}addPropertyControls(Carousel,{firstImage:{type:ControlType.ResponsiveImage},secondImage:{type:ControlType.ResponsiveImage},thirdImage:{type:ControlType.ResponsiveImage},fourthImage:{type:ControlType.ResponsiveImage},fifthImage:{type:ControlType.ResponsiveImage},progressBar:{type:ControlType.Boolean,defaultValue:false},prograssBarMargin:{type:ControlType.Number,defaultValue:24},objectFit:{type:ControlType.Enum,options:[\"fill\",\"contain\",\"cover\",\"none\",\"scale-down\"],defaultValue:\"cover\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Carousel\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Carousel.map"],"mappings":"iWAMG,SAAwB,EAAS,CAAC,aAAW,cAAY,aAAW,cAAY,aAAW,YAAU,cAAY,oBAAkB,QAAM,CAAC,CAAC,IAAM,EAAO,CAAC,EAAW,EAAY,EAAW,EAAY,CAAW,EAAC,OAAO,QAAQ,CAAO,EAAY,EAAO,OAAa,EAAe,CAAC,EAAO,EAAY,GAAG,GAAG,EAAO,EAAO,EAAG,EAAM,CAAC,EAAa,EAAgB,CAAC,EAAS,EAAE,CAAM,CAAC,EAAgB,EAAmB,CAAC,GAAS,EAAM,CAAC,EAAU,IAAI,CAAC,AAAG,IAAe,EAAG,WAAW,IAAI,CA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