{"version":3,"file":"Carousel_Overflow_Visible.fGUxTuMP.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/VrvhW852JstTacme0Yjw/Rrwsqx13uzTax2cjrOEg/Carousel_Overflow_Visible.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,useRef}from\"react\";export function withScrollContainer(Component){return props=>{const[padding,setPadding]=useState(`0 calc(50vw - 720px)`);const[containerPadding,setContainerPadding]=useState(\"0 90px\");const prevButtonRef=useRef(null);const nextButtonRef=useRef(null);const scrollContainerRef=useRef(null);const[hasHorizontalScroll,setHasHorizontalScroll]=useState(false);const checkForHorizontalScroll=()=>{if(scrollContainerRef.current){const hasScroll=scrollContainerRef.current.scrollWidth>scrollContainerRef.current.clientWidth;setHasHorizontalScroll(hasScroll);}};useEffect(()=>{const updatePadding=()=>{if(window.innerWidth<=890){setPadding(`0 calc(50vw - 700px)`);setContainerPadding(\"0 20px\");}else{setPadding(`0 calc(50vw - 720px)`);setContainerPadding(\"0 90px\");}checkForHorizontalScroll();};updatePadding();window.addEventListener(\"resize\",updatePadding);// Add click event listeners to custom buttons\nif(prevButtonRef.current){prevButtonRef.current.addEventListener(\"click\",handlePrevClick);}if(nextButtonRef.current){nextButtonRef.current.addEventListener(\"click\",handleNextClick);}return()=>{window.removeEventListener(\"resize\",updatePadding);if(prevButtonRef.current){prevButtonRef.current.removeEventListener(\"click\",handlePrevClick);}if(nextButtonRef.current){nextButtonRef.current.removeEventListener(\"click\",handleNextClick);}};},[]);const handlePrevClick=()=>{if(scrollContainerRef.current){const scrollAmount=scrollContainerRef.current.offsetWidth;scrollContainerRef.current.scrollBy({left:-scrollAmount,behavior:\"smooth\"});}};const handleNextClick=()=>{if(scrollContainerRef.current){const scrollAmount=scrollContainerRef.current.offsetWidth;scrollContainerRef.current.scrollBy({left:scrollAmount,behavior:\"smooth\"});}};return /*#__PURE__*/_jsxs(\"div\",{className:\"scroll-outer\",style:{display:\"flex\",flexDirection:\"column\"},children:[/*#__PURE__*/_jsxs(\"div\",{ref:scrollContainerRef,className:\"scroll-container\",style:{overflow:\"scroll\",padding:containerPadding,scrollbarWidth:\"none\",msOverflowStyle:\"-ms-autohiding-scrollbar\",WebkitOverflowScrolling:\"touch\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                            .scroll-container::-webkit-scrollbar {\n                                display: none;\n                            }\n                            @media (max-width: 890px) {\n                                .buttons-container {\n                                    display: none;\n                                }\n                            }\n                            .sticky-element {\n                                list-style-type: none;\n                                padding: 0;\n                                margin: 0;\n                                display: flex;\n                                justify-content: flex-end;\n                                width: 100%;\n                            }\n                            .paddlenav-arrow {\n                                background: none;\n                                border: none;\n                                cursor: pointer;\n                                padding: 10px;\n                                color: inherit;\n                            }\n                            .paddlenav-arrow svg {\n                                width: 36px;\n                                height: 36px;\n                                fill: currentColor;\n                            }\n                            .paddlenav-arrow:disabled {\n                                opacity: 0.5;\n                                cursor: not-allowed;\n                            }\n                        `}),/*#__PURE__*/_jsx(\"div\",{className:\"item-container\",style:{padding,display:\"grid\",gridTemplateRows:\"repeat(1, auto)\",gridTemplateColumns:\"max-content\",gridAutoFlow:\"column\",gridRowGap:\"0px\",rowGap:\"0px\",width:\"fit-content\"},children:/*#__PURE__*/_jsx(Component,{...props})})]}),/*#__PURE__*/_jsx(\"div\",{className:\"buttons-outer-container\",style:{placeContent:\"center\",alignItems:\"center\",display:hasHorizontalScroll?\"flex\":\"none\",flex:\"0 0 auto\",flexFlow:\"column\",gap:\"64px\",height:\"min-content\",overflow:\"visible\",padding:\"0px\",position:\"relative\",width:\"100%\"},children:/*#__PURE__*/_jsx(\"div\",{className:\"buttons-container\",style:{placeContent:\"flex-end flex-start\",alignItems:\"flex-end\",display:\"flex\",flex:\"0 0 auto\",flexFlow:\"row\",gap:\"0px\",height:\"min-content\",maxWidth:\"1440px\",overflow:\"hidden\",padding:\"0px 90px\",position:\"relative\",width:\"100%\"},children:/*#__PURE__*/_jsxs(\"ul\",{className:\"sticky-element\",children:[/*#__PURE__*/_jsx(\"li\",{className:\"left-item\",children:/*#__PURE__*/_jsx(\"button\",{ref:prevButtonRef,\"aria-label\":\"Previous\",className:\"paddlenav-arrow paddlenav-arrow-previous\",children:/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 36 36\",style:{borderRadius:\"36px\",backgroundColor:\"#d2d2d7a3\",width:\"36px\",height:\"36px\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"M21.559,12.062 L15.618,17.984 L21.5221,23.944 C22.105,24.533 22.1021,25.482 21.5131,26.065 C21.2211,26.355 20.8391,26.4999987 20.4571,26.4999987 C20.0711,26.4999987 19.6851,26.352 19.3921,26.056 L12.4351,19.034 C11.8531,18.446 11.8551,17.4999987 12.4411,16.916 L19.4411,9.938 C20.0261,9.353 20.9781,9.354 21.5621,9.941 C22.1471,10.528 22.1451,11.478 21.5591,12.062 L21.559,12.062 Z\"})})})}),/*#__PURE__*/_jsx(\"li\",{className:\"right-item\",children:/*#__PURE__*/_jsx(\"button\",{ref:nextButtonRef,\"aria-label\":\"Next\",className:\"paddlenav-arrow paddlenav-arrow-next\",children:/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 36 36\",style:{borderRadius:\"36px\",backgroundColor:\"#d2d2d7a3\",width:\"36px\",height:\"36px\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"M23.5587,16.916 C24.1447,17.4999987 24.1467,18.446 23.5647,19.034 L16.6077,26.056 C16.3147,26.352 15.9287,26.4999987 15.5427,26.4999987 C15.1607,26.4999987 14.7787,26.355 14.4867,26.065 C13.8977,25.482 13.8947,24.533 14.4777,23.944 L20.3818,17.984 L14.4408,12.062 C13.8548,11.478 13.8528,10.5279 14.4378,9.941 C15.0218,9.354 15.9738,9.353 16.5588,9.938 L23.5588,16.916 L23.5587,16.916 Z\"})})})}),/*#__PURE__*/_jsx(\"div\",{className:\"scrim\"})]})})})]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withScrollContainer\":{\"type\":\"reactHoc\",\"name\":\"withScrollContainer\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Carousel_Overflow_Visible.map"],"mappings":"qJAAsG,SAAgB,EAAoB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAQ,GAAYA,EAAS,uBAAuB,CAAM,CAAC,EAAiB,GAAqBA,EAAS,SAAS,CAAO,EAAcC,EAAO,KAAK,CAAO,EAAcA,EAAO,KAAK,CAAO,EAAmBA,EAAO,KAAK,CAAM,CAAC,EAAoB,GAAwBD,EAAS,GAAM,CAAO,MAA6B,CAAI,EAAmB,SAAuG,EAA9E,EAAmB,QAAQ,YAAY,EAAmB,QAAQ,YAA6C,EAAI,MAAc,CAAC,IAAM,MAAkB,CAAI,EAAO,YAAY,KAAK,EAAW,uBAAuB,CAAC,EAAoB,SAAS,GAAO,EAAW,uBAAuB,CAAC,EAAoB,SAAS,EAAE,GAA0B,EAC9rB,OADisB,GAAe,CAAC,EAAO,iBAAiB,SAAS,EAAc,CACn7B,EAAc,SAAS,EAAc,QAAQ,iBAAiB,QAAQ,EAAgB,CAAK,EAAc,SAAS,EAAc,QAAQ,iBAAiB,QAAQ,EAAgB,KAAY,CAAC,EAAO,oBAAoB,SAAS,EAAc,CAAI,EAAc,SAAS,EAAc,QAAQ,oBAAoB,QAAQ,EAAgB,CAAK,EAAc,SAAS,EAAc,QAAQ,oBAAoB,QAAQ,EAAgB,GAAM,EAAE,CAAC,CAAC,IAAM,MAAoB,CAAC,GAAG,EAAmB,QAAQ,CAAC,IAAM,EAAa,EAAmB,QAAQ,YAAY,EAAmB,QAAQ,SAAS,CAAC,KAAK,CAAC,EAAa,SAAS,SAAS,CAAC,GAAU,MAAoB,CAAC,GAAG,EAAmB,QAAQ,CAAC,IAAM,EAAa,EAAmB,QAAQ,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