{"version":3,"file":"SolutionGalleryCarousel.DPqYOnTy.mjs","names":["React.useMemo","React.useState","React.useRef","React.useCallback"],"sources":["https:/framerusercontent.com/modules/MPaC269vb9AEOcByE94m/OGECwpfG378xAwBmgCsH/SolutionGalleryCarousel.js"],"sourcesContent":["// User request: Create a new Framer code component named SolutionGalleryCarousel for a tennis SaaS Solutions page that replaces a three-card screenshot placeholder gallery, auto-advances exactly three slides every 4 seconds, supports manual dot navigation with clean pause/restart behavior, uses restrained crossfade/slide transitions, is responsive with a ~16:10 media surface, follows pale-blue/white/blue-accent styling, remains accessible, exposes controls for slide image URL/title/caption plus interval and key colors, shows Screen 01/02/03 placeholder states when no images are set, and remains stable in static canvas rendering.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{AnimatePresence,motion,useInView}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function SolutionGalleryCarousel(props){const{slide1Image=\"\",slide1Title=\"Screen 01\",slide1Caption=\"Replace with product screenshot\",slide2Image=\"\",slide2Title=\"Screen 02\",slide2Caption=\"Replace with product screenshot\",slide3Image=\"\",slide3Title=\"Screen 03\",slide3Caption=\"Replace with product screenshot\",autoplayInterval=4,outerSurfaceColor=\"#F5F9FF\",slideSurfaceColor=\"#FFFFFF\",borderColor=\"#D9E6FF\",accentColor=\"#2A6BFF\",textColor=\"#000000\",captionColor=\"#666666\",typography,style}=props;const slides=React.useMemo(()=>[{image:slide1Image,title:slide1Title,caption:slide1Caption},{image:slide2Image,title:slide2Title,caption:slide2Caption},{image:slide3Image,title:slide3Title,caption:slide3Caption}],[slide1Image,slide1Title,slide1Caption,slide2Image,slide2Title,slide2Caption,slide3Image,slide3Title,slide3Caption]);const[activeIndex,setActiveIndex]=React.useState(0);const[resetKey,setResetKey]=React.useState(0);const staticRenderer=useIsStaticRenderer();const rootRef=React.useRef(null);const inView=useInView(rootRef,{amount:.4});const canAnimate=!staticRenderer;const goToSlide=React.useCallback(index=>{React.startTransition(()=>{setActiveIndex(index);setResetKey(value=>value+1);});},[]);React.useEffect(()=>{if(staticRenderer||!inView)return;if(typeof window===\"undefined\")return;const safeSeconds=Math.max(1,autoplayInterval);const intervalId=window.setInterval(()=>{React.startTransition(()=>{setActiveIndex(prev=>(prev+1)%3);});},safeSeconds*1e3);return()=>{window.clearInterval(intervalId);};},[autoplayInterval,resetKey,staticRenderer,inView]);const activeSlide=slides[activeIndex];const textBaseStyle={fontSize:typography?.fontSize,letterSpacing:typography?.letterSpacing,lineHeight:typography?.lineHeight,fontFamily:typography?.fontFamily,fontWeight:typography?.fontWeight,fontStyle:typography?.fontStyle};return /*#__PURE__*/_jsxs(\"section\",{ref:rootRef,style:{position:\"relative\",width:\"100%\",background:outerSurfaceColor,borderRadius:22,border:`1px solid ${borderColor}`,padding:16,boxSizing:\"border-box\",...style},\"aria-label\":\"Solution gallery carousel\",children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",aspectRatio:\"16 / 10\",borderRadius:16,border:`1px solid ${borderColor}`,overflow:\"hidden\",background:slideSurfaceColor},children:canAnimate?/*#__PURE__*/_jsx(AnimatePresence,{mode:\"wait\",initial:false,children:/*#__PURE__*/_jsx(motion.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.35,ease:\"easeOut\"},style:{position:\"absolute\",inset:0},children:/*#__PURE__*/_jsx(SlideContent,{image:activeSlide.image,title:activeSlide.title,caption:activeSlide.caption,textColor:textColor,captionColor:captionColor,accentColor:accentColor,textBaseStyle:textBaseStyle})},`slide-${activeIndex}`)}):/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0},children:/*#__PURE__*/_jsx(SlideContent,{image:activeSlide.image,title:activeSlide.title,caption:activeSlide.caption,textColor:textColor,captionColor:captionColor,accentColor:accentColor,textBaseStyle:textBaseStyle})})}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:\"50%\",bottom:12,transform:\"translateX(-50%)\",display:\"flex\",gap:8,background:\"rgba(255,255,255,0.92)\",border:`1px solid ${borderColor}`,borderRadius:999,padding:\"6px 10px\"},children:[0,1,2].map(dotIndex=>{const selected=activeIndex===dotIndex;return /*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>goToSlide(dotIndex),\"aria-label\":`Go to slide ${dotIndex+1}`,\"aria-pressed\":selected,style:{width:10,height:10,borderRadius:\"50%\",border:selected?`1px solid ${accentColor}`:`1px solid ${borderColor}`,background:selected?accentColor:\"#FFFFFF\",cursor:\"pointer\",padding:0}},dotIndex);})})]});}function SlideContent(props){const{image,title,caption,textColor,captionColor,accentColor,textBaseStyle}=props;const resolvedImageSrc=React.useMemo(()=>{if(typeof image===\"string\")return image;return image?.src??\"\";},[image]);const resolvedImageSrcSet=React.useMemo(()=>{if(typeof image===\"string\")return undefined;return image?.srcSet;},[image]);const resolvedAlt=React.useMemo(()=>{if(typeof image===\"string\")return title||\"Solution screenshot\";return image?.alt||title||\"Solution screenshot\";},[image,title]);const hasImage=Boolean(resolvedImageSrc&&resolvedImageSrc.trim().length>0);if(hasImage){return /*#__PURE__*/_jsx(\"img\",{src:resolvedImageSrc,srcSet:resolvedImageSrcSet,alt:resolvedAlt,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",display:\"block\"}});}return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",alignItems:\"center\",textAlign:\"center\",padding:24,boxSizing:\"border-box\",background:\"linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(246,250,255,1) 100%)\"},children:[/*#__PURE__*/_jsx(\"p\",{style:{margin:0,marginBottom:8,color:accentColor,...textBaseStyle},children:title}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,color:captionColor||textColor,...textBaseStyle,opacity:.9},children:caption})]});}addPropertyControls(SolutionGalleryCarousel,{slide1Image:{type:ControlType.ResponsiveImage,title:\"Screen 01 Image\"},slide1Title:{type:ControlType.String,title:\"Screen 01 Title\",defaultValue:\"Screen 01\"},slide1Caption:{type:ControlType.String,title:\"Screen 01 Caption\",defaultValue:\"Replace with product screenshot\"},slide2Image:{type:ControlType.ResponsiveImage,title:\"Screen 02 Image\"},slide2Title:{type:ControlType.String,title:\"Screen 02 Title\",defaultValue:\"Screen 02\"},slide2Caption:{type:ControlType.String,title:\"Screen 02 Caption\",defaultValue:\"Replace with product screenshot\"},slide3Image:{type:ControlType.ResponsiveImage,title:\"Screen 03 Image\"},slide3Title:{type:ControlType.String,title:\"Screen 03 Title\",defaultValue:\"Screen 03\"},slide3Caption:{type:ControlType.String,title:\"Screen 03 Caption\",defaultValue:\"Replace with product screenshot\"},autoplayInterval:{type:ControlType.Number,title:\"Interval\",defaultValue:4,min:1,max:20,step:.5,unit:\"s\"},outerSurfaceColor:{type:ControlType.Color,title:\"Outer Surface\",defaultValue:\"#FFFFFF\"},slideSurfaceColor:{type:ControlType.Color,title:\"Slide Surface\",defaultValue:\"#F5F5F5\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"#EEEEEE\"},accentColor:{type:ControlType.Color,title:\"Accent\",defaultValue:\"#000000\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#000000\"},captionColor:{type:ControlType.Color,title:\"Caption\",defaultValue:\"#CCCCCC\"},typography:{type:ControlType.Font,title:\"Text Font\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"},controls:\"extended\",defaultFontType:\"sans-serif\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SolutionGalleryCarousel\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\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