{"version":3,"file":"TestimonialsCarousel.Db_LbTYp.mjs","names":["React.useRef","React.useState","React.useMemo","React.useCallback"],"sources":["https:/framerusercontent.com/modules/RNP0FHgS6bouK8jyrbET/4Ja5N43EV5mYdlS4Pg7D/TestimonialsCarousel.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{startTransition}from\"react\";const defaults=[{image:\"https://framerusercontent.com/images/qDDfnFPqEHKZSra2XRwkuWJXWY.jpg\",quote:\"“Usei por duas semanas e a diferen\\xe7a na confian\\xe7a foi absurda. Resultado r\\xe1pido e sem complica\\xe7\\xe3o.”\",name:\"Rafael Mendes\",date:\"29 Jul 2026\"},{image:\"https://framerusercontent.com/images/X0fSOH3RjNVTuhI6DS1vidRAo.jpg\",quote:\"“Entrega discreta, aplica\\xe7\\xe3o simples e efeito consistente. Foi exatamente o que eu precisava para voltar a me sentir seguro.”\",name:\"Diego Carvalho\",date:\"27 Jul 2026\"},{image:\"https://framerusercontent.com/images/tgXILbHKCm3Im9y0DOcEbeTs8.jpg\",quote:\"“J\\xe1 no primeiro uso senti diferen\\xe7a no desempenho. Hoje recomendo para amigos que tamb\\xe9m buscavam uma solu\\xe7\\xe3o pr\\xe1tica.”\",name:\"Bruno Almeida\",date:\"24 Jul 2026\"}];function resolveImageUrl(value){if(typeof value===\"string\"&&value.trim().length>0)return value;return\"\";}function toBackgroundImage(url){const safeUrl=resolveImageUrl(url);if(!safeUrl)return undefined;return`url(\"${safeUrl}\")`;}function hasRenderableTestimonials(testimonials){if(!testimonials||testimonials.length===0)return false;return testimonials.some(item=>{const hasImage=resolveImageUrl(item.image).length>0;const hasQuote=typeof item.quote===\"string\"&&item.quote.trim().length>0;const hasName=typeof item.name===\"string\"&&item.name.trim().length>0;const hasDate=typeof item.date===\"string\"&&item.date.trim().length>0;return hasImage||hasQuote||hasName||hasDate;});}/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function TestimonialsCarousel({testimonials,cardWidth=360,gap=16,autoScroll=true,interval=3,showArrows=true,arrowBorderColor=\"#051E39\",arrowIconColor=\"#051E39\",style}){const items=hasRenderableTestimonials(testimonials)?testimonials:defaults;const containerRef=React.useRef(null);const[currentIndex,setCurrentIndex]=React.useState(0);const isPaused=React.useRef(false);const stepSize=React.useMemo(()=>cardWidth+gap,[cardWidth,gap]);React.useEffect(()=>{if(!autoScroll||items.length<=1)return;const timer=setInterval(()=>{if(isPaused.current)return;const container=containerRef.current;if(!container)return;startTransition(()=>{setCurrentIndex(prev=>{const next=(prev+1)%items.length;container.scrollTo({left:next*stepSize,behavior:\"smooth\"});return next;});});},interval*1e3);return()=>clearInterval(timer);},[autoScroll,interval,items.length,stepSize]);const scrollTo=React.useCallback(index=>{const container=containerRef.current;if(!container||items.length===0)return;const next=(index%items.length+items.length)%items.length;startTransition(()=>setCurrentIndex(next));container.scrollTo({left:next*stepSize,behavior:\"smooth\"});},[items.length,stepSize]);const goNext=React.useCallback(()=>{if(items.length===0)return;scrollTo(currentIndex+1);},[currentIndex,items.length,scrollTo]);const goPrev=React.useCallback(()=>{if(items.length===0)return;scrollTo(currentIndex-1);},[currentIndex,items.length,scrollTo]);const handleScroll=React.useCallback(()=>{const container=containerRef.current;if(!container||stepSize<=0||items.length===0)return;const nextIndex=Math.round(container.scrollLeft/stepSize);const normalized=(nextIndex%items.length+items.length)%items.length;if(normalized!==currentIndex){startTransition(()=>setCurrentIndex(normalized));}},[currentIndex,items.length,stepSize]);return /*#__PURE__*/_jsxs(\"div\",{style:{...style,display:\"flex\",flexDirection:\"column\",gap:16,width:\"100%\",maxWidth:\"100%\",minWidth:0,overflow:\"hidden\",position:\"relative\"},children:[showArrows&&items.length>1&&/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",justifyContent:\"flex-end\",alignItems:\"center\",gap:10},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"Depoimento anterior\",onClick:goPrev,style:{width:34,height:34,borderRadius:\"50%\",border:`1.5px solid ${arrowBorderColor}`,color:arrowIconColor,background:\"transparent\",cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:0},children:/*#__PURE__*/_jsx(\"span\",{style:{fontSize:16,lineHeight:1},children:\"‹\"})}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"Pr\\xf3ximo depoimento\",onClick:goNext,style:{width:34,height:34,borderRadius:\"50%\",border:`1.5px solid ${arrowBorderColor}`,color:arrowIconColor,background:\"transparent\",cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:0},children:/*#__PURE__*/_jsx(\"span\",{style:{fontSize:16,lineHeight:1},children:\"›\"})})]}),/*#__PURE__*/_jsx(\"div\",{ref:containerRef,onMouseEnter:()=>{isPaused.current=true;},onMouseLeave:()=>{isPaused.current=false;},onTouchStart:()=>{isPaused.current=true;},onTouchEnd:()=>{setTimeout(()=>{isPaused.current=false;},1500);},onScroll:handleScroll,style:{display:\"flex\",gap,overflowX:\"auto\",scrollSnapType:\"x mandatory\",WebkitOverflowScrolling:\"touch\",scrollbarWidth:\"none\",msOverflowStyle:\"none\",width:\"100%\",minWidth:0,boxSizing:\"border-box\",paddingBottom:4},children:items.map((t,i)=>{const defaultItem=defaults[i%defaults.length];const imageUrl=resolveImageUrl(t.image)||resolveImageUrl(defaultItem?.image);return /*#__PURE__*/_jsxs(\"div\",{style:{minWidth:cardWidth,maxWidth:cardWidth,backgroundColor:\"#F8F5EF\",borderRadius:12,overflow:\"hidden\",border:\"1px solid rgba(5,30,57,0.08)\",boxShadow:\"0px 4px 24px rgba(5,30,57,0.12)\",scrollSnapAlign:\"start\",flexShrink:0},children:[/*#__PURE__*/_jsx(\"div\",{style:{height:220,position:\"relative\",overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",backgroundImage:toBackgroundImage(imageUrl),backgroundSize:\"cover\",backgroundPosition:\"center\",backgroundRepeat:\"no-repeat\"},\"aria-hidden\":\"true\"})}),/*#__PURE__*/_jsxs(\"div\",{style:{padding:\"16px 18px 18px\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{color:\"#051E39\",fontSize:13,marginBottom:8,letterSpacing:.5},children:\"★★★★★\"}),t.quote&&/*#__PURE__*/_jsxs(\"p\",{style:{fontFamily:\"Montserrat, sans-serif\",fontWeight:400,fontSize:13,color:\"#16110F\",lineHeight:1.6,margin:\"0 0 12px 0\"},children:[\"“\",t.quote,\"”\"]}),/*#__PURE__*/_jsx(\"div\",{style:{height:1,background:\"rgba(5,30,57,0.1)\",marginBottom:12}}),t.name&&/*#__PURE__*/_jsx(\"div\",{style:{fontFamily:\"Montserrat, sans-serif\",fontWeight:700,fontSize:13,color:\"#051E39\"},children:t.name}),t.date&&/*#__PURE__*/_jsx(\"div\",{style:{fontFamily:\"Montserrat, sans-serif\",fontWeight:400,fontSize:11,color:\"rgba(5,30,57,0.5)\",marginTop:2},children:t.date})]})]},i);})}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",justifyContent:\"center\",gap:8},children:items.map((_,i)=>/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":`Ir para depoimento ${i+1}`,onClick:()=>scrollTo(i),style:{width:i===currentIndex?24:8,height:8,borderRadius:100,background:i===currentIndex?\"#EFE7D6\":\"rgba(239,231,214,0.35)\",border:\"none\",padding:0,cursor:\"pointer\",transition:\"all 0.3s ease\"}},i))})]});}addPropertyControls(TestimonialsCarousel,{testimonials:{type:ControlType.Array,title:\"Depoimentos\",control:{type:ControlType.Object,title:\"Depoimento\",controls:{image:{type:ControlType.Image,title:\"Foto\"},quote:{type:ControlType.String,title:\"Depoimento\",displayTextArea:true,defaultValue:\"\"},name:{type:ControlType.String,title:\"Nome\",defaultValue:\"\"},date:{type:ControlType.String,title:\"Data\",defaultValue:\"\"}}}},autoScroll:{type:ControlType.Boolean,title:\"Auto scroll\",defaultValue:true},interval:{type:ControlType.Number,title:\"Intervalo (seg)\",defaultValue:3,min:1,max:10,step:.5,hidden:props=>!props.autoScroll},cardWidth:{type:ControlType.Number,title:\"Largura do card\",defaultValue:360,min:200,max:480,step:10},gap:{type:ControlType.Number,title:\"Espa\\xe7o entre cards\",defaultValue:16,min:4,max:40},showArrows:{type:ControlType.Boolean,title:\"Setas\",defaultValue:true},arrowBorderColor:{type:ControlType.Color,title:\"Borda seta\",defaultValue:\"#051E39\",hidden:props=>!props.showArrows},arrowIconColor:{type:ControlType.Color,title:\"\\xcdcone seta\",defaultValue:\"#051E39\",hidden:props=>!props.showArrows}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TestimonialsCarousel\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TestimonialsCarousel.map"],"mappings":"+MAAu7B,SAAS,EAAgB,EAAM,CAAgE,OAA5D,OAAO,GAAQ,UAAU,EAAM,KAAK,CAAC,CAAC,OAAO,EAAS,EAAY,EAAG,CAAC,SAAS,EAAkB,EAAI,CAAC,IAAM,EAAQ,EAAgB,CAAG,EAAM,KAAyB,MAAM,QAAQ,EAAQ,GAAI,CAAC,SAAS,EAA0B,EAAa,CAAwD,MAApD,CAAC,GAAc,EAAa,SAAS,EAAS,GAAa,EAAa,KAAK,GAAM,CAAC,IAAM,EAAS,EAAgB,EAAK,KAAK,CAAC,CAAC,OAAO,EAAQ,EAAS,OAAO,EAAK,OAAQ,UAAU,EAAK,MAAM,KAAK,CAAC,CAAC,OAAO,EAAQ,EAAQ,OAAO,EAAK,MAAO,UAAU,EAAK,KAAK,KAAK,CAAC,CAAC,OAAO,EAAQ,EAAQ,OAAO,EAAK,MAAO,UAAU,EAAK,KAAK,KAAK,CAAC,CAAC,OAAO,EAAE,OAAO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