{"version":3,"file":"SlideNavigation.DKyDHQuM.mjs","names":["useState","Children","direction","_Fragment"],"sources":["https:/framerusercontent.com/modules/34F0NSYhNqY3lJTiNFZC/x254jVzl9axAQh8FFlQW/SlideNavigation.js"],"sourcesContent":["// Slide navigation component with arrow key controls, responsive design\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useEffect,startTransition,Children}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";/**\n * Slide Navigation Component\n * \n * Navigate through slides using left/right arrow keys\n * \n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 600\n * \n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function SlideNavigation(props){const{children,backgroundColor,textColor,showArrowHint,animationDuration,shadow,borderRadius,showNavigationButtons}=props;const[currentIndex,setCurrentIndex]=useState(0);const[direction,setDirection]=useState(0);const slides=Children.toArray(children);// Calculate adjacent slide indices for preloading\nconst prevIndex=currentIndex===0?slides.length-1:currentIndex-1;const nextIndex=currentIndex===slides.length-1?0:currentIndex+1;useEffect(()=>{if(typeof window===\"undefined\")return;const handleKeyDown=e=>{if(e.key===\"ArrowLeft\"){e.preventDefault();// Don't navigate if already at the first slide\nif(currentIndex===0)return;startTransition(()=>{setDirection(-1);setCurrentIndex(prev=>prev-1);});}else if(e.key===\"ArrowRight\"){e.preventDefault();// Don't navigate if already at the last slide\nif(currentIndex===slides.length-1)return;startTransition(()=>{setDirection(1);setCurrentIndex(prev=>prev+1);});}};window.addEventListener(\"keydown\",handleKeyDown);return()=>window.removeEventListener(\"keydown\",handleKeyDown);},[slides.length,currentIndex]);const goToSlide=index=>{startTransition(()=>{setDirection(index>currentIndex?1:-1);setCurrentIndex(index);});};const handlePrevious=()=>{if(currentIndex===0)return;startTransition(()=>{setDirection(-1);setCurrentIndex(prev=>prev-1);});};const handleNext=()=>{if(currentIndex===slides.length-1)return;startTransition(()=>{setDirection(1);setCurrentIndex(prev=>prev+1);});};const variants={enter:direction=>({y:direction>0?\"20%\":\"-20%\",opacity:0,filter:\"blur(4px)\"}),center:{y:0,opacity:1,filter:\"blur(0px)\"},exit:direction=>({y:direction>0?\"-20%\":\"20%\",opacity:0,filter:\"blur(4px)\"})};return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"hidden\",backgroundColor,display:\"flex\",flexDirection:\"column\",borderRadius:`${borderRadius}px`,boxShadow:shadow?\"0 4px 20px rgba(0, 0, 0, 0.15)\":\"none\"},tabIndex:0,role:\"region\",\"aria-label\":\"Slide navigation\",\"aria-live\":\"polite\",children:[/*#__PURE__*/_jsxs(\"div\",{style:{flex:1,position:\"relative\",width:\"100%\",overflow:\"hidden\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",width:\"100%\",height:\"100%\",visibility:\"hidden\",pointerEvents:\"none\"},\"aria-hidden\":\"true\",children:currentIndex>0&&slides[prevIndex]}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",width:\"100%\",height:\"100%\",visibility:\"hidden\",pointerEvents:\"none\"},\"aria-hidden\":\"true\",children:currentIndex<slides.length-1&&slides[nextIndex]}),/*#__PURE__*/_jsx(AnimatePresence,{initial:false,custom:direction,children:/*#__PURE__*/_jsx(motion.div,{custom:direction,variants:variants,initial:\"enter\",animate:\"center\",exit:\"exit\",transition:{y:{type:\"spring\",stiffness:400,damping:35,duration:.2},opacity:{duration:.15},filter:{duration:.15}},style:{position:\"absolute\",width:\"100%\",height:\"100%\",display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\"},children:slides[currentIndex]},currentIndex)})]}),showArrowHint&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",bottom:\"24px\",left:\"50%\",transform:\"translateX(-50%)\",display:\"flex\",gap:\"8px\",alignItems:\"center\",opacity:.5,pointerEvents:\"none\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{padding:\"8px 12px\",backgroundColor:textColor,color:backgroundColor,borderRadius:\"6px\",fontSize:\"12px\",fontWeight:600},children:\"←\"}),/*#__PURE__*/_jsx(\"span\",{style:{fontSize:\"12px\",color:textColor,fontWeight:500},children:\"Use arrow keys\"}),/*#__PURE__*/_jsx(\"div\",{style:{padding:\"8px 12px\",backgroundColor:textColor,color:backgroundColor,borderRadius:\"6px\",fontSize:\"12px\",fontWeight:600},children:\"→\"})]}),showNavigationButtons&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"button\",{onClick:handlePrevious,disabled:currentIndex===0,style:{position:\"absolute\",left:\"16px\",top:\"50%\",transform:\"translateY(-50%)\",width:\"48px\",height:\"48px\",borderRadius:\"50%\",backgroundColor:textColor,color:backgroundColor,border:\"none\",cursor:currentIndex===0?\"not-allowed\":\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:\"20px\",fontWeight:\"bold\",opacity:currentIndex===0?.3:.8,transition:\"opacity 0.2s ease\",boxShadow:\"0 2px 8px rgba(0, 0, 0, 0.15)\",zIndex:10},onMouseEnter:e=>{if(currentIndex!==0){e.currentTarget.style.opacity=\"1\";}},onMouseLeave:e=>{if(currentIndex!==0){e.currentTarget.style.opacity=\"0.8\";}},\"aria-label\":\"Previous slide\",children:\"←\"}),/*#__PURE__*/_jsx(\"button\",{onClick:handleNext,disabled:currentIndex===slides.length-1,style:{position:\"absolute\",right:\"16px\",top:\"50%\",transform:\"translateY(-50%)\",width:\"48px\",height:\"48px\",borderRadius:\"50%\",backgroundColor:textColor,color:backgroundColor,border:\"none\",cursor:currentIndex===slides.length-1?\"not-allowed\":\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:\"20px\",fontWeight:\"bold\",opacity:currentIndex===slides.length-1?.3:.8,transition:\"opacity 0.2s ease\",boxShadow:\"0 2px 8px rgba(0, 0, 0, 0.15)\",zIndex:10},onMouseEnter:e=>{if(currentIndex!==slides.length-1){e.currentTarget.style.opacity=\"1\";}},onMouseLeave:e=>{if(currentIndex!==slides.length-1){e.currentTarget.style.opacity=\"0.8\";}},\"aria-label\":\"Next slide\",children:\"→\"})]})]});}addPropertyControls(SlideNavigation,{children:{type:ControlType.Slot,title:\"Slides\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},showNavigationButtons:{type:ControlType.Boolean,title:\"Show Nav Buttons\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},showArrowHint:{type:ControlType.Boolean,title:\"Show Arrow Hint\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},animationDuration:{type:ControlType.Number,title:\"Animation Speed\",defaultValue:.2,min:.1,max:1,step:.1,unit:\"s\"},shadow:{type:ControlType.Boolean,title:\"Shadow\",defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:0,min:0,max:50,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SlideNavigation\",\"slots\":[\"children\"],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"800\",\"framerIntrinsicHeight\":\"600\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SlideNavigation.map"],"mappings":"8QAWG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,WAAS,kBAAgB,YAAU,gBAAc,oBAAkB,SAAO,eAAa,yBAAuB,EAAW,CAAC,EAAa,GAAiBA,EAAS,EAAE,CAAM,CAAC,EAAU,GAAcA,EAAS,EAAE,CAAO,EAAOC,EAAS,QAAQ,EAAS,CACvS,EAAU,IAAe,EAAE,EAAO,OAAO,EAAE,EAAa,EAAQ,EAAU,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