{"version":3,"file":"Carousel.BE_8stGL.mjs","names":["useState","__esmMin","init_npm_react_18_3_1","ce","init_jsx_runtime","c","p","_e","motion","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_BWFVvmND","ControlType","Carousel","images","firstImage","secondImage","thirdImage","fourthImage","fifthImage","totalSlides","extendedImages","currentIndex","setCurrentIndex","isTransitioning","setIsTransitioning","nextSlide","prevIndex","prevSlide","showButton","style","item","index","progressBar","prograssBarMargin","init_Carousel"],"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":"A,yOAMG,SAAwBa,EAAS,CAAC,aAAW,cAAY,aAAW,cAAY,aAAW,YAAU,cAAY,oBAAkB,SAAO,CAAC,IAAMC,EAAO,CAACC,EAAWC,EAAYC,EA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