{"version":3,"file":"Carousel.lCK67f4F.mjs","names":["useState","useCallback","_Fragment","__esmMin","init_npm_react_18_3_1","ce","init_jsx_runtime","ne","c","p","_e","motion","AnimatePresence","init_framer_motion_DhsWWWsN","init_framer_CcflMUCW","addPropertyControls","useIsStaticRenderer","RenderTarget","ControlType","Carousel","props","currentIndex","setCurrentIndex","isStatic","isThumbnail","handleNext","prev","images","handlePrev","handleDotClick","index","autoPlay","interval","autoPlayInterval","aspectRatioPadding","aspectRatio","style","currentImage","variants","transition","direction","animationProps","transitionDuration","showNavigation","l","navigationBackground","navigationColor","showDots","init_Carousel"],"sources":["https:/framerusercontent.com/modules/a1Rof7gkAe1B5XLGkCTg/xZ0hFsEavuz3w1viaatU/Carousel.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useCallback,useEffect}from\"react\";import{addPropertyControls,ControlType,RenderTarget,useIsStaticRenderer}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";/**\n * Photo Carousel\n *\n * A customizable carousel component for displaying photos with navigation controls.\n *\n * @framerIntrinsicWidth 500\n * @framerIntrinsicHeight 300\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function Carousel(props){const{images=[{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Photo 1\"},{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Photo 2\"},{src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Photo 3\"}],autoPlay=false,autoPlayInterval=3e3,showNavigation=true,showDots=true,navigationColor=\"#FFFFFF\",navigationBackground=\"rgba(0, 0, 0, 0.5)\",borderRadius=8,transition=\"slide\",transitionDuration=.5,aspectRatio=\"16:9\",style}=props;const[currentIndex,setCurrentIndex]=useState(0);const isStatic=useIsStaticRenderer();const isThumbnail=RenderTarget.current()===RenderTarget.thumbnail;const handleNext=useCallback(()=>{setCurrentIndex(prev=>(prev+1)%images.length);},[images.length]);const handlePrev=useCallback(()=>{setCurrentIndex(prev=>(prev-1+images.length)%images.length);},[images.length]);const handleDotClick=useCallback(index=>{setCurrentIndex(index);},[]);// Autoplay\nuseEffect(()=>{if(!autoPlay||images.length<=1||isStatic||isThumbnail)return;const interval=setInterval(handleNext,autoPlayInterval);return()=>clearInterval(interval);},[autoPlay,autoPlayInterval,handleNext,images.length,isStatic,isThumbnail]);const aspectRatioPadding={auto:\"66.67%\",\"16:9\":\"56.25%\",\"4:3\":\"75%\",\"1:1\":\"100%\"}[aspectRatio];if(images.length===0){return /*#__PURE__*/_jsx(\"div\",{style:{...style,width:\"100%\",height:\"100%\",background:\"#f5f5f5\",borderRadius,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:\"#999\",fontSize:14},children:\"Add images to carousel\"});}const currentImage=images[currentIndex];const slideVariants={enter:direction=>({x:direction>0?\"100%\":\"-100%\",opacity:0}),center:{x:0,opacity:1},exit:direction=>({x:direction<0?\"100%\":\"-100%\",opacity:0})};const fadeVariants={enter:{opacity:0},center:{opacity:1},exit:{opacity:0}};const variants=transition===\"slide\"?slideVariants:fadeVariants;const animationProps=transition===\"slide\"?{custom:1}:{};return /*#__PURE__*/_jsxs(\"div\",{style:{...style,width:\"100%\",height:\"100%\",position:\"relative\",borderRadius,overflow:\"hidden\",background:\"#f5f5f5\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{paddingTop:aspectRatioPadding}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,right:0,bottom:0,overflow:\"hidden\"},children:/*#__PURE__*/_jsx(AnimatePresence,{mode:\"wait\",initial:false,children:/*#__PURE__*/_jsx(motion.img,{src:currentImage.src,alt:currentImage.alt,style:{position:\"absolute\",width:\"100%\",height:\"100%\",objectFit:\"cover\"},variants:variants,initial:\"enter\",animate:\"center\",exit:\"exit\",transition:{duration:transitionDuration,ease:\"easeInOut\"},...animationProps},currentIndex)})}),showNavigation&&images.length>1&&!isThumbnail&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"button\",{onClick:handlePrev,style:{position:\"absolute\",left:12,top:\"50%\",transform:\"translateY(-50%)\",width:40,height:40,borderRadius:\"50%\",background:navigationBackground,border:\"none\",cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:navigationColor,fontSize:18,zIndex:10,transition:\"opacity 0.2s\"},\"aria-label\":\"Previous image\",children:\"←\"}),/*#__PURE__*/_jsx(\"button\",{onClick:handleNext,style:{position:\"absolute\",right:12,top:\"50%\",transform:\"translateY(-50%)\",width:40,height:40,borderRadius:\"50%\",background:navigationBackground,border:\"none\",cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:navigationColor,fontSize:18,zIndex:10,transition:\"opacity 0.2s\"},\"aria-label\":\"Next image\",children:\"→\"})]}),showDots&&images.length>1&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",bottom:16,left:\"50%\",transform:\"translateX(-50%)\",display:\"flex\",gap:10,zIndex:10,padding:\"6px 12px\",borderRadius:20,background:\"rgba(0, 0, 0, 0.3)\"},children:images.map((_,index)=>/*#__PURE__*/_jsx(\"button\",{onClick:()=>handleDotClick(index),style:{width:index===currentIndex?28:10,height:10,borderRadius:5,background:index===currentIndex?navigationColor:\"rgba(255, 255, 255, 0.5)\",border:\"none\",cursor:\"pointer\",transition:\"all 0.2s ease\",flexShrink:0},onMouseEnter:e=>{if(index!==currentIndex){e.currentTarget.style.background=\"rgba(255, 255, 255, 0.8)\";}},onMouseLeave:e=>{if(index!==currentIndex){e.currentTarget.style.background=\"rgba(255, 255, 255, 0.5)\";}},\"aria-label\":`Go to image ${index+1}`,\"aria-current\":index===currentIndex?\"true\":undefined},index))})]});}addPropertyControls(Carousel,{images:{type:ControlType.Array,title:\"Photos\",control:{type:ControlType.ResponsiveImage},maxCount:20,defaultValue:[{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Photo 1\"},{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Photo 2\"},{src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Photo 3\"}]},aspectRatio:{type:ControlType.Enum,title:\"Aspect Ratio\",options:[\"auto\",\"16:9\",\"4:3\",\"1:1\"],optionTitles:[\"Auto\",\"16:9\",\"4:3\",\"1:1\"],defaultValue:\"16:9\",displaySegmentedControl:true},transition:{type:ControlType.Enum,title:\"Transition\",options:[\"slide\",\"fade\"],optionTitles:[\"Slide\",\"Fade\"],defaultValue:\"slide\",displaySegmentedControl:true},transitionDuration:{type:ControlType.Number,title:\"Duration\",defaultValue:.5,min:.1,max:2,step:.1,unit:\"s\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:50,unit:\"px\"},showNavigation:{type:ControlType.Boolean,title:\"Navigation\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},showDots:{type:ControlType.Boolean,title:\"Dots\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},autoPlay:{type:ControlType.Boolean,title:\"Autoplay\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},autoPlayInterval:{type:ControlType.Number,title:\"Interval\",defaultValue:3e3,min:1e3,max:1e4,step:500,unit:\"ms\",hidden:({autoPlay})=>!autoPlay},navigationColor:{type:ControlType.Color,title:\"Nav Color\",defaultValue:\"#FFFFFF\"},navigationBackground:{type:ControlType.Color,title:\"Nav Background\",defaultValue:\"rgba(0, 0, 0, 0.5)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Carousel\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",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