{"version":3,"file":"InitSliders.CFlaOpno.mjs","names":[],"sources":["https:/framerusercontent.com/modules/Eol6YzrtgyYOnkGfQcpS/2oBwhwsOuPVU8cZTsK2f/InitSliders.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect}from\"react\";function disableArrow(element){element.style.filter=\"brightness(0.5)\";element.style.pointerEvents=\"none\";}function enableArrow(element){element.style.filter=\"brightness(1)\";element.style.pointerEvents=\"auto\";}export const withCardListScroll=Component=>{return /*#__PURE__*/forwardRef((props,ref)=>{useEffect(()=>{const list=document.querySelector(\"[data-framer-name='CardList']\");const arrowLeft=document.querySelector(\"[data-framer-name='CardScrollLeft']\");const arrowRight=document.querySelector(\"[data-framer-name='CardScrollRight']\");if(arrowLeft){disableArrow(arrowLeft);if(list.scrollWidth-list.scrollLeft-list.clientWidth<40){disableArrow(arrowRight);}}},[]);const onScroll=e=>{// console.log({ e })\nconst list=document.querySelector(\"[data-framer-name='CardList']\");const arrowLeft=document.querySelector(\"[data-framer-name='CardScrollLeft']\");const arrowRight=document.querySelector(\"[data-framer-name='CardScrollRight']\");if(arrowLeft||arrowRight){if(list.scrollLeft>0||list.scrollWidth-list.scrollLeft-list.clientWidth>40){enableArrow(arrowLeft);enableArrow(arrowRight);}if(list.scrollLeft<=40){disableArrow(arrowLeft);}if(list.scrollWidth-list.scrollLeft-list.clientWidth<40){disableArrow(arrowRight);}}};// This part runs every time the component is rendered.\nreturn /*#__PURE__*/_jsx(Component,{ref:ref,...props,onScroll:onScroll,style:{scrollbarWidth:\"none\",msOverflowStyle:\"none\",overflowX:\"scroll\",WebkitOverflowScrolling:\"touch\"},customCSS:`\n                    &::-webkit-scrollbar {\n                        width: 0px !important;\n                        height: 0px !important;\n                        background: transparent !important;\n                        display: none !important;\n                    }\n                    & {\n                        -webkit-appearance: none !important;\n                        overflow-x: scroll !important;\n                    }\n                `});});};export const withTournamentsListScroll=Component=>{return /*#__PURE__*/forwardRef((props,ref)=>{useEffect(()=>{const list=document.querySelector(\"[data-framer-name='TournamentSlider']\");const arrowLeft=document.querySelector(\"[data-framer-name='TournamentScrollLeft']\");const arrowRight=document.querySelector(\"[data-framer-name='TournamentScrollRight']\");setTimeout(()=>{disableArrow(arrowLeft);if(list.scrollWidth-list.scrollLeft-list.clientWidth<40){disableArrow(arrowRight);}},500);},[]);const onScroll=e=>{const list=document.querySelector(\"[data-framer-name='TournamentSlider']\");const arrowLeft=document.querySelector(\"[data-framer-name='TournamentScrollLeft']\");const arrowRight=document.querySelector(\"[data-framer-name='TournamentScrollRight']\");if(list.scrollLeft>0||list.scrollWidth-list.scrollLeft-list.clientWidth>40){enableArrow(arrowLeft);enableArrow(arrowRight);}if(list.scrollLeft<=40){disableArrow(arrowLeft);}if(list.scrollWidth-list.scrollLeft-list.clientWidth<40){disableArrow(arrowRight);}};// This part runs every time the component is rendered.\nreturn /*#__PURE__*/_jsx(Component,{ref:ref,...props,onScroll:onScroll,style:{scrollbarWidth:\"none\",msOverflowStyle:\"none\",overflowX:\"scroll\",WebkitOverflowScrolling:\"touch\"},customCSS:`\n                    &::-webkit-scrollbar {\n                        width: 0px !important;\n                        height: 0px !important;\n                        background: transparent !important;\n                        display: none !important;\n                    }\n                    & {\n                        -webkit-appearance: none !important;\n                        overflow-x: scroll !important;\n                    }\n                `});});}// export const withCardListArrowHover = (Component): ComponentType => {\n//     return forwardRef((props, ref) => {\n//         return <Component ref={ref} {...props} whileHover={{ opacity: 0.6 }} />\n//     })\n// }\n;\nexport const __FramerMetadata__ = {\"exports\":{\"withTournamentsListScroll\":{\"type\":\"reactHoc\",\"name\":\"withTournamentsListScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCardListScroll\":{\"type\":\"reactHoc\",\"name\":\"withCardListScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InitSliders.map"],"mappings":"kKAAmF,SAAS,EAAa,EAAQ,CAAC,EA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