{"version":3,"file":"InitSliders.BlLAHcVC.mjs","names":[],"sources":["https:/framerusercontent.com/modules/eFkEFNso6HMFvrPy6ZCE/oocox1OWuVd0LfoNHxjz/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=>{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||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);}}};return /*#__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                `});});};// 🔥 новый GameList (как TournamentList)\nexport const withGameListScroll=Component=>{return /*#__PURE__*/forwardRef((props,ref)=>{useEffect(()=>{const list=document.querySelector(\"[data-framer-name='GameList']\");const arrowLeft=document.querySelector(\"[data-framer-name='GameScrollLeft']\");const arrowRight=document.querySelector(\"[data-framer-name='GameScrollRight']\");setTimeout(()=>{disableArrow(arrowLeft);if(list.scrollWidth-list.scrollLeft-list.clientWidth<40){disableArrow(arrowRight);}},500);},[]);const onScroll=e=>{const list=document.querySelector(\"[data-framer-name='GameList']\");const arrowLeft=document.querySelector(\"[data-framer-name='GameScrollLeft']\");const arrowRight=document.querySelector(\"[data-framer-name='GameScrollRight']\");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);}};return /*#__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                `});});};\nexport const __FramerMetadata__ = {\"exports\":{\"withCardListScroll\":{\"type\":\"reactHoc\",\"name\":\"withCardListScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGameListScroll\":{\"type\":\"reactHoc\",\"name\":\"withGameListScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InitSliders.map"],"mappings":"yHAAmF,SAAS,EAAa,EAAQ,CAAC,EAAQ,MAAM,OAAO,kBAAkB,EAAQ,MAAM,cAAc,MAAO,CAAC,SAAS,EAAY,EAAQ,CAAC,EAAQ,MAAM,OAAO,gBAAgB,EAAQ,MAAM,cAAc,MAAO,qBAAzP,IAAwC,EAA+N,EAAmB,GAAgC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