{"version":3,"file":"ThreeUpCardsSlider.CmPyepXF.mjs","names":["useRef","_Fragment","Swiper","SwiperSlide","useCallback"],"sources":["https:/framerusercontent.com/modules/b7O8Eva7wbl5HQlogkm6/vThvsXAzYHnPYGuKvU1N/ThreeUpCardsSlider.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useRef,useCallback,useEffect}from\"react\";import{Navigation,Pagination}from\"swiper/modules\";import{Swiper,SwiperSlide}from\"swiper/react\";import{addPropertyControls,ControlType}from\"framer\";var ComponentMode;(function(ComponentMode){ComponentMode[\"SLIDER\"]=\"slider\";ComponentMode[\"STACKING_CARDS\"]=\"stacking-cards\";})(ComponentMode||(ComponentMode={}));const ArrowSvg=()=>{return /*#__PURE__*/_jsx(\"svg\",{width:\"15\",height:\"16\",viewBox:\"0 0 15 16\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M14.544 7.977 7.44 15.102l-1.194-1.216 5.077-5.077H.102V7.124h11.2L6.224 2.046 7.42.852l7.125 7.125Z\",fill:\"#261F2E\"})});};/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */const normalBreakpoint={320:{slidesPerView:1.05,spaceBetween:8},580:{slidesPerView:1.5,spaceBetween:8},768:{slidesPerView:2,spaceBetween:10},950:{slidesPerView:2.5,spaceBetween:10},1199:{slidesPerView:3}};const useDebouncedResize=(callback,delay)=>{const debouncedCallback=useCallback(()=>{let timer;return()=>{clearTimeout(timer);timer=setTimeout(()=>{callback();},delay);};},[callback,delay]);useEffect(()=>{const handleResize=debouncedCallback();window.addEventListener(\"resize\",handleResize);return()=>{window.removeEventListener(\"resize\",handleResize);};},[debouncedCallback]);};const setSameHeight=elements=>{let maxHeight=0;if(elements&&elements.length){elements.forEach(el=>{el.style.minHeight=\"unset\";});elements.forEach((el,index)=>{if(maxHeight<el.clientHeight)maxHeight=el.clientHeight;});elements.forEach(el=>{el.style.minHeight=`${maxHeight}px`;});}};export default function ThreeUpCardsSlider({slides,componentMode,spaceBetweenCards,moreDesktopCards,alignTitles}){const glideRef=useRef(null);useEffect(()=>{let timeoutInstance;if(alignTitles){timeoutInstance=setTimeout(()=>{const firstSlides=glideRef.current?.querySelectorAll(\"#information-container\");setSameHeight(firstSlides);},1e3);}return()=>{if(alignTitles){clearTimeout(timeoutInstance);}};},[]);useDebouncedResize(()=>{const firstSlides=glideRef.current?.querySelectorAll(\"#information-container\");if(alignTitles){setSameHeight(firstSlides);}},300);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:innerStyles}}),/*#__PURE__*/_jsx(\"link\",{rel:\"stylesheet\",href:\"https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css\"}),componentMode===\"slider\"?/*#__PURE__*/_jsxs(Swiper,{ref:glideRef,spaceBetween:spaceBetweenCards,slidesPerView:moreDesktopCards?4:3,className:`three-up-cards-slider ${moreDesktopCards?\"desktop-no-padding\":\"\"}`,modules:[Navigation,Pagination],navigation:{nextEl:\".swiper-button-next\",prevEl:\".swiper-button-prev\"},breakpoints:moreDesktopCards?{...normalBreakpoint,1199:{slidesPerView:4},1300:{slidesPerView:4.5},1500:{slidesPerView:5}}:normalBreakpoint,children:[slides.map((slide,index)=>/*#__PURE__*/_jsx(SwiperSlide,{style:{color:\"white\",width:\"100%\"},children:slide},index)),/*#__PURE__*/_jsx(\"div\",{className:\"swiper-button-next\",children:/*#__PURE__*/_jsx(ArrowSvg,{})}),/*#__PURE__*/_jsx(\"div\",{className:\"swiper-button-prev\",children:/*#__PURE__*/_jsx(ArrowSvg,{})})]}):/*#__PURE__*/_jsx(\"div\",{className:\"three-up-cards-stacking-cards\",children:slides.map((slide,index)=>slide)})]});}addPropertyControls(ThreeUpCardsSlider,{spaceBetweenCards:{type:ControlType.Number,defaultValue:16},componentMode:{type:ControlType.Enum,defaultValue:\"slider\",options:[\"slider\",\"stacking-cards\"],optionTitles:[\"Slider\",\"Stacking Cards\"]},moreDesktopCards:{type:ControlType.Boolean,defaultValue:false},alignTitles:{type:ControlType.Boolean,defaultValue:false},slides:{type:ControlType.Array,control:{type:ControlType.ComponentInstance}}});const innerStyles=`\n    .three-up-cards-stacking-cards {\n        display: flex;\n        flex-wrap: wrap;\n        gap: 40px;\n    }\n\n    .three-up-cards-stacking-cards > * {\n        width: 100% !important;\n    }\n\n    .three-up-cards-slider .swiper-wrapper .swiper-slide,\n    .three-up-cards-slider .swiper-wrapper .swiper-slide > * { \n        width: 100%; \n    }\n\n    @media (max-width: 1999px) {\n        .swiper.three-up-cards-slider.desktop-no-padding {\n            padding: 0 30px 0 30px !important;\n        }\n    }\n\n    @media (max-width: 1199px) {\n        .swiper.three-up-cards-slider.desktop-no-padding {\n            padding: 0 8px 0 8px !important;\n        }\n    }\n\n    @media (max-width: 1199px) {\n        .swiper.three-up-cards-slider {\n            padding: 0 8px 0 8px !important;\n        }\n    }\n\n    .three-up-cards-slider .swiper-button-next:after,\n    .three-up-cards-slider .swiper-button-prev:after {\n        display: none;\n    }\n\n    .three-up-cards-slider .swiper-button-next,\n    .three-up-cards-slider .swiper-button-prev {\n        border-radius: 50%;\n        width: 46px !important;\n        height: 46px !important;\n        background-color: #FFD90D;\n    }\n\n    .three-up-cards-slider .swiper-button-next svg,\n    .three-up-cards-slider .swiper-button-prev svg {\n        width: 15px !important;\n        height: 15px !important;\n    }\n\n    .three-up-cards-slider .swiper-button-prev svg {\n        transform: rotate(180deg);\n    }\n\n    .three-up-cards-slider .swiper-button-disabled {\n        display: none !important;\n    }\n\n    @media (max-width: 1500px) {\n         .three-up-cards-slider .swiper-wrapper .swiper-slide div[data-framer-name=\"Desktop - ArrowCTA\"] {\n            height: 600px;\n        }\n    }\n\n    @media (max-width: 1300px) {\n         .three-up-cards-slider .swiper-wrapper .swiper-slide div[data-framer-name=\"Desktop - ArrowCTA\"] {\n            height: 550px;\n        }\n    }\n`;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ThreeUpCardsSlider\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ThreeUpCardsSlider.map"],"mappings":"6RAMo2B,SAAwB,EAAmB,CAAC,SAAO,gBAAc,oBAAkB,mBAAiB,eAAa,CAAC,IAAM,EAASA,EAAO,IAAI,EAAma,OAAja,MAAc,CAAC,IAAI,EAAkL,OAA/J,IAAa,EAAgB,eAAe,CAAC,IAAM,EAAY,EAAS,SAAS,iBAAiB,wBAAwB,EAAE,EAAc,CAAW,CAAE,EAAE,GAAG,OAAa,CAAI,GAAa,aAAa,CAAe,CAAG,CAAE,EAAE,CAAC,CAAC,EAAE,MAAuB,CAAC,IAAM,EAAY,EAAS,SAAS,iBAAiB,wBAAwB,EAAK,GAAa,EAAc,CAAW,CAAG,EAAE,GAAG,EAAsB,EAAMC,EAAU,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,wBAAwB,CAAC,OAAO,CAAW,CAAC,CAAC,EAAe,EAAK,OAAO,CAAC,IAAI,aAAa,KAAK,8DAA8D,CAAC,EAAE,IAAgB,SAAsB,EAAMC,EAAO,CAAC,IAAI,EAAS,aAAa,EAAkB,cAAc,EAAiB,EAAE,EAAE,UAAU,yBAAyB,EAAiB,qBAAqB,KAAK,QAAQ,CAAC,EAAW,CAAU,EAAE,WAAW,CAAC,OAAO,sBAAsB,OAAO,qBAAqB,EAAE,YAAY,EAAiB,CAAC,GAAG,EAAiB,KAAK,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,GAAG,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,EAAiB,SAAS,CAAC,EAAO,KAAK,EAAM,IAAqB,EAAKC,EAAY,CAAC,MAAM,CAAC,M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