{"version":3,"file":"InitSliders.CPfKQ2j7.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,CAAwC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