{"version":3,"file":"ThreeUpCardsSlider.DOkWefPR.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":"wcAMo2B,SAAwB,EAAmB,CAAC,SAAO,gBAAc,oBAAkB,mBAAiB,eAAa,CAAC,IAAM,EAASA,EAAO,KAAK,CAAka,OAAja,MAAc,CAAC,IAAI,EAAkL,OAA/J,IAAa,EAAgB,eAAe,CAAC,IAAM,EAAY,EAAS,SAAS,iBAAiB,yBAAyB,CAAC,EAAc,EAAY,EAAG,IAAI,MAAY,CAAI,GAAa,aAAa,EAAgB,GAAM,EAAE,CAAC,CAAC,MAAuB,CAAC,IAAM,EAAY,EAAS,SAAS,iBAAiB,yBAAyB,CAAI,GAAa,EAAc,EAAY,EAAI,IAAI,CAAqB,EAAMC,EAAU,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,wBAAwB,CAAC,OAAO,EAAY,CAAC,CAAC,CAAc,EAAK,OAAO,CAAC,IAAI,aAAa,KAAK,+DAA+D,CAAC,CAAC,IAAgB,SAAsB,EAAMC,EAAO,CAAC,IAAI,EAAS,aAAa,EAAkB,cAAc,EAAiB,EAAE,EAAE,UAAU,yBAAyB,EAAiB,qBAAqB,KAAK,QAAQ,CAAC,EAAW,EAAW,CAAC,WAAW,CAAC,OAAO,sBAAsB,OAAO,sBAAsB,CAAC,YAAY,EAAiB,CAAC,GAAG,EAAiB,KAAK,CAAC,cAAc,EAAE,CAAC,KAAK,CAAC,cAAc,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,CAAC,EAAiB,SAAS,CAAC,EAAO,KAAK,EAAM,IAAqB,EAAKC,EAAY,CAAC,MAAM,CAAC,MAAM,QAAQ,MAAM,OAAO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