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,EAAK0B,QAAS,IAId1B,IAASA,EAAK0B,OAChB,OACEyB,EAAAA,EAAAA,MAAA,OACEJ,WAAW6C,EAAAA,EAAAA,GAAG,CACZ,iBAAiB5F,EAAKa,KAAKhD,QAAQ,IAAK,OACxC,CACE,wBACEQ,EAAcV,SAASqC,EAAKP,QAIlC8D,QAASA,IACPrI,EAAQkH,MAAKoB,EAAAA,EAAAA,IAAYxD,EAAKwB,QAC/B7B,SAAA,EAEDsB,EAAAA,EAAAA,KAAA,OACE8B,WAAW6C,EAAAA,EAAAA,GAAG,CACZ,sBACA,CACE,8BACEvH,EAAcV,SAASqC,EAAKP,QAE/BE,SAEFK,EAAKgB,QAERmC,EAAAA,EAAAA,MAAA,OACEJ,UAAU,8BACVsB,MAAO,CAAEP,MAAO,QAASnE,SAAA,EAEzBsB,EAAAA,EAAAA,KAAA,QAAM8B,UAAU,iBAAgBpD,SAC7BK,EAAKa,OAE6B,MAAtB,OAAb1E,QAAa,IAAbA,OAAa,EAAbA,EAAeiH,kBAChB/G,EAAKgH,aACNrD,EAAKa,OAAS,GAAGzF,EAAE,uBAQf,MAPF6F,EAAAA,EAAAA,KAACC,EAAAA,EAAU,CACTL,KAAK,iBACLM,IAAI,UACJC,MAAM,UACNC,KAAMC,EAAAA,GAAUC,IAChBwB,UAAU,6BA/BX/C,EAAKP,IAqChB,SAKV0D,EAAAA,EAAAA,MAAA,OACEJ,WAAW6C,EAAAA,EAAAA,GAAG,CACZ,yDACA,CACE,wCACEjH,GAAYkH,IAAI,gBACbvK,GAA+B,OAAjB+B,MAEpBsC,SAAA,EAEDrE,GAA+B,OAAjB+B,IAAyB4D,EAAAA,EAAAA,KAAC6E,EAAAA,EAAO,IAChD/K,EAAM4E,UACPsB,EAAAA,EAAAA,KAAA,OAAKuE,GAAG,gCAOrB,C","sources":["elements/Accounts/layout/Desktop/index.tsx","elements/Accounts/hooks/useWalletSectionsToExclude.ts"],"sourcesContent":["import {\n  ReactElement,\n  SyntheticEvent,\n  useEffect,\n  useMemo,\n  useState\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useSelector } from 'react-redux';\nimport { useHistory, useLocation } from 'react-router-dom';\nimport cc from 'classcat';\nimport i18n from 'i18next';\nimport { ITEMS_WITH_BADGE } from 'utils/account/user-info';\nimport LocalStorage from 'utils/bom-dom-manipulation/local-storage';\nimport {\n  EIconSize,\n  offsetBadgeValue,\n  ZINDEX_HIGH_1,\n  ZINDEX_HIGH_2,\n  ZINDEX_HIGH_3\n} from 'utils/constants/app/ui';\nimport SpringConfigs from 'utils/constants/swarm/spring-configs';\nimport { storageKeyName } from 'utils/generic/storage-key-name';\nimport { IAccountSettingsMenu } from 'interfaces/account-settings-menu';\nimport { ICasinoCachedGames } from 'interfaces/casino-data';\nimport { ACCOUNT_DESKTOP_MENU } from 'elements/Accounts/menu';\nimport { GlobalIcon } from 'components/GlobalIcon';\nimport { Loading } from 'components/Loading';\nimport { Logout } from 'components/Logout';\nimport { updateQuery } from 'components/QueryRoute';\nimport { Portal } from 'components/Shared/Portal';\nimport { ListItem } from 'components/UI/ListItem';\nimport { UserInfoAndBalance } from 'components/UserInfoAndBalance';\nimport { GamblingMessageCa } from 'newcomponents/Shared/account/GamblingMessageCa';\nimport { Badge } from 'newcomponents/UI/Badge';\nimport { CustomModal } from 'newcomponents/UI/CustomModal';\nimport { usePopupScrollDisable } from 'hooks/usePopupScrollDisable';\nimport { useSearchParams } from 'hooks/useSearchParams';\nimport { useFetchAccountParams } from 'newhooks/account/useFetchAccountParams';\nimport {\n  getForgotPasswordOpen,\n  getForgotUsernameOpen,\n  getHigherZIndex,\n  getSectionsData\n} from 'store/selectors/app-data';\nimport { getActiveGames } from 'store/selectors/new-casino';\nimport {\n  getBonuses,\n  getIsLoggedIn,\n  getUnreadMessagesCount,\n  getUser\n} from 'store/selectors/user-data';\nimport { useBonusSectionsToExclude } from '../../hooks/useBonusSectionsToExclude';\nimport { useWalletSectionsToExclude } from '../../hooks/useWalletSectionsToExclude';\nimport { WalletModal } from '../WalletModal';\nimport './index.less';\n\ntype Props = {\n  children: ReactElement;\n  closeModal: (e?: SyntheticEvent) => void;\n};\n\nconst isLoyaltyPointsAvailable =\n  LocalStorage.getItem(\n    storageKeyName('account', 'LOYALTY_POINTS_AVAILABLE')\n  ) === 'true';\n\nexport const DesktopLayout = (props: Props): ReactElement => {\n  const location = useLocation();\n  const history = useHistory();\n  const { t } = useTranslation();\n  const isLoggedIn = useSelector(getIsLoggedIn);\n  const higherZIndex = useSelector(getHigherZIndex);\n  const searchParams = useSearchParams();\n  const activeGames = useSelector(getActiveGames) as ICasinoCachedGames;\n  const bonusSectionsToExclude = useBonusSectionsToExclude();\n  const walletSectionsToExclude = useWalletSectionsToExclude();\n  const bonuses = useSelector(getBonuses);\n  const sectionsData = useSelector(getSectionsData);\n  const [rootPath, mainPath, subPath] = location.search.includes('=*')\n    ? location.search.split('=*&')\n    : location.search.replace(/\\?|=%2A$/g, '').split('=%2A&');\n\n  const activeMenu = rootPath.concat(':').concat(mainPath);\n  const unreadMessagesCount = useSelector(getUnreadMessagesCount);\n  const [bonusesCount, setBonusesCount] = useState<number>();\n  const activeSubMenu = activeMenu.concat(':').concat(subPath);\n  const { accountParams } = useFetchAccountParams();\n  const user = useSelector(getUser);\n  const forgotPass = useSelector(getForgotPasswordOpen);\n  const forgotUsername = useSelector(getForgotUsernameOpen);\n  const accountParamsTabsOn = ['myCards'];\n  const queryParams = new URLSearchParams(window.location.search);\n  const isThereAnyActiveGame = Object.keys(activeGames).length > 0;\n\n  const mainMenu = useMemo<IAccountSettingsMenu>(() => {\n    if (!accountParams && SpringConfigs.ACCOUNT_PARAMS) {\n      return {} as IAccountSettingsMenu;\n    }\n\n    const menu =\n      ACCOUNT_DESKTOP_MENU.find(({ key }) => activeMenu.includes(key)) ||\n      ({} as IAccountSettingsMenu);\n\n    if (\n      menu?.formType === 'bonuses' &&\n      menu.children &&\n      bonusSectionsToExclude\n    ) {\n      bonusSectionsToExclude.forEach(sectionKey => {\n        menu.children = menu.children?.filter(item => item.key !== sectionKey);\n      });\n    }\n\n    if (\n      menu?.formType === 'myWallet' &&\n      menu.children &&\n      walletSectionsToExclude\n    ) {\n      walletSectionsToExclude.forEach(sectionKey => {\n        menu.children = menu.children?.filter(item => item.key !== sectionKey);\n      });\n    }\n\n    return menu;\n  }, [activeMenu, user, bonusSectionsToExclude, accountParams]);\n\n  const isSmallModal =\n    searchParams['register'] ||\n    searchParams['login'] ||\n    searchParams['forgot-password'] ||\n    searchParams['reset-password'] ||\n    searchParams['forgot-username'] ||\n    forgotPass ||\n    forgotUsername;\n\n  useEffect(() => {\n    setBonusesCount(\n      (bonuses?.casinoBonuses?.length || 0) +\n        (bonuses?.freeBonuses?.length || 0) +\n        (bonuses?.freeSpinBonuses?.length || 0)\n    );\n  }, [bonuses]);\n\n  const createMenu = useMemo(() => {\n    const menuData: any[] = [];\n\n    const sectionMenu =\n      sectionsData?.sections && sectionsData?.sections.length\n        ? [\n            ...sectionsData?.sections,\n            ...(isLoyaltyPointsAvailable\n              ? [\n                  {\n                    key: 'accounts:loyalty-points',\n                    name: i18n.t('account.loyaltyPoints'),\n                    auth: true,\n                    icon: (\n                      <GlobalIcon\n                        lib=\"account\"\n                        name=\"medalOutlined\"\n                        theme=\"default\"\n                        size={EIconSize._24}\n                      />\n                    ),\n                    query: { accounts: '*', 'loyalty-points': '*' },\n                    hidden: false,\n                    formType: 'loyalty-points'\n                  }\n                ]\n              : [])\n          ]\n        : ACCOUNT_DESKTOP_MENU;\n\n    sectionMenu.map(item => {\n      let hidden = true;\n\n      if (sectionsData?.sections?.length) {\n        const singleMenu = ACCOUNT_DESKTOP_MENU.filter(\n          section => section.formType === item.formType\n        );\n\n        if (singleMenu.length && !item.hidden) {\n          hidden = false;\n        }\n\n        item = singleMenu[0];\n      }\n\n      if ((item && item.auth && !sectionsData?.sections?.length) || !hidden) {\n        if (\n          item.formType === 'myProfile' &&\n          sectionsData?.myProfile &&\n          sectionsData?.myProfile.length\n        ) {\n          const childrenData: ReactElement[] = [];\n          sectionsData.myProfile.map(profile => {\n            const profileMenu = item.children.filter(\n              (section: { formType: string }) =>\n                section.formType === profile.formType\n            );\n\n            if (profileMenu && profileMenu[0] && !profile.hidden) {\n              profileMenu[0].hidden = profile.hidden;\n              childrenData.push(profileMenu[0]);\n            }\n          });\n\n          if (childrenData.length) {\n            item.children = childrenData;\n          }\n        }\n\n        //need only case when is_bonus_allowed is false not null or undefined\n        if (\n          (user.is_bonus_allowed !== false && item.formType === 'bonuses') ||\n          item.formType !== 'bonuses'\n        ) {\n          const showBadge = ITEMS_WITH_BADGE.includes(`${item.formType}`);\n          const count =\n            item.formType === 'bonuses'\n              ? bonusesCount\n              : item.formType === 'messages' && unreadMessagesCount;\n\n          menuData.push(\n            <ListItem\n              arrow=\"horizontal\"\n              key={item.key}\n              noNeedClass={Boolean(item.key === 'accounts:bonuses' && count)}\n              thumb={\n                showBadge && count ? (\n                  <Badge\n                    className=\"listItem_badgeAccount\"\n                    count={count}\n                    offset={[offsetBadgeValue.OFFSET_TYPE_VALUE_MINUS_12, 1]}\n                    size=\"small\"\n                  >\n                    <div className=\"listItem__thumb\"> {item.icon} </div>\n                  </Badge>\n                ) : item.icon &&\n                  +accountParams?.verifiedAccount === 1 &&\n                  item.key === 'accounts:settings' &&\n                  !user.is_verified ? (\n                  <Badge\n                    count={false}\n                    offset={[offsetBadgeValue.OFFSET_TYPE_VALUE_MINUS_12, 1]}\n                    size=\"small\"\n                    className=\"icon__Settings\"\n                  >\n                    <div className=\"listItem__thumb\"> {item.icon} </div>\n                  </Badge>\n                ) : (\n                  item.icon\n                )\n              }\n              active={activeMenu.includes(item.key)}\n              onClick={() => history.push(updateQuery(item.query))}\n            >\n              {item.name}\n            </ListItem>\n          );\n        }\n      }\n    });\n\n    return menuData;\n  }, [\n    sectionsData,\n    activeMenu,\n    bonusesCount,\n    unreadMessagesCount,\n    user.owner_id\n  ]);\n\n  usePopupScrollDisable(!isThereAnyActiveGame);\n\n  return isSmallModal ? (\n    <CustomModal\n      className=\"accountModal--desktop--small\"\n      visible={true}\n      footer={null}\n      width={463}\n      centered\n      zIndex={ZINDEX_HIGH_1}\n      maskStyle={{\n        backgroundColor: 'var(--v3-black-2)',\n        zIndex: ZINDEX_HIGH_2\n      }}\n      style={{ borderRadius: 12, padding: '40px 0' }}\n      bodyStyle={{ padding: 0 }}\n      onCancel={props.closeModal}\n      closable={!searchParams.booking_id}\n      closeIcon={\n        !searchParams.booking_id ? (\n          <GlobalIcon\n            lib=\"generic\"\n            name=\"close\"\n            theme=\"default\"\n            position=\"absolute\"\n            size={EIconSize._16}\n            className=\"accountModal__header__close\"\n          />\n        ) : null\n      }\n      maskClosable={false}\n      // @ts-ignore\n      renderInBody={true}\n    >\n      {props.children}\n    </CustomModal>\n  ) : (\n    <Portal>\n      <div\n        className=\"accountModal accountModal--desktop\"\n        style={{\n          zIndex: higherZIndex ? ZINDEX_HIGH_1 : ZINDEX_HIGH_3\n        }}\n      >\n        <div className=\"accountModal__container accountModal__container--absolute\">\n          <div className=\"accountModal__mainMenu accountModal__sectionWrapper\">\n            {sectionsData && (\n              <div className=\"accountModal__main-menu\">\n                <UserInfoAndBalance />\n                {SpringConfigs.CANADIAN_ACCOUNT_TYPE && <GamblingMessageCa />}\n                <div className=\"accountModal__section-title\">\n                  {t('account.myAccount')}\n                </div>\n                {createMenu}\n                <Logout />\n              </div>\n            )}\n          </div>\n          <div\n            className=\"accountModal__wrapper\"\n            id=\"accountModal__wrapper__Layout\"\n          >\n            <WalletModal activeMenu={activeMenu} haveCancel={false} />\n\n            <div className=\"accountModal__header accountModal__sectionWrapper\">\n              <div className=\"accountModal__header__title\">\n                {t(mainMenu?.name)}\n              </div>\n              {!searchParams.booking_id ? (\n                <GlobalIcon\n                  lib=\"generic\"\n                  name=\"close\"\n                  theme=\"default\"\n                  size={EIconSize._16}\n                  position=\"absolute\"\n                  className=\"accountModal__header__close\"\n                  onClick={props.closeModal}\n                />\n              ) : null}\n            </div>\n            <div className=\"accountModal__body\">\n              {sectionsData !== null &&\n                mainMenu &&\n                mainMenu?.children &&\n                mainMenu.children.length > 0 && (\n                  <div className=\"accountModal__subMenu accountModal__sectionWrapper\">\n                    <div className=\"accMenu\">\n                      {mainMenu?.children.map(item => {\n                        if (\n                          accountParamsTabsOn.includes(item.alias as string)\n                        ) {\n                          item.hidden = true;\n\n                          if (\n                            accountParams &&\n                            +accountParams[item.alias as string]\n                          ) {\n                            item.hidden = false;\n                          }\n                        }\n\n                        if (item && !item.hidden) {\n                          return (\n                            <div\n                              className={cc([\n                                `accMenu__item ${item.name.replace(' ', '-')}`,\n                                {\n                                  'accMenu__item--active':\n                                    activeSubMenu.includes(item.key)\n                                }\n                              ])}\n                              key={item.key}\n                              onClick={() =>\n                                history.push(updateQuery(item.query))\n                              }\n                            >\n                              <div\n                                className={cc([\n                                  'accMenu__item__icon',\n                                  {\n                                    'accMenu__item__icon--active':\n                                      activeSubMenu.includes(item.key)\n                                  }\n                                ])}\n                              >\n                                {item.icon as any}\n                              </div>\n                              <div\n                                className=\"flexbox justifySpaceBetween\"\n                                style={{ width: '100%' }}\n                              >\n                                <span className=\"globalEllipsis\">\n                                  {item.name}\n                                </span>\n                                {+accountParams?.verifiedAccount === 1 &&\n                                !user.is_verified &&\n                                item.name === `${t('account.documents')}` ? (\n                                  <GlobalIcon\n                                    name=\"attentionError\"\n                                    lib=\"generic\"\n                                    theme=\"default\"\n                                    size={EIconSize._24}\n                                    className=\"icon__ErrorDocument\"\n                                  />\n                                ) : null}\n                              </div>\n                            </div>\n                          );\n                        }\n                      })}\n                    </div>\n                  </div>\n                )}\n              <div\n                className={cc([\n                  'accountModal__mainSection accountModal__sectionWrapper',\n                  {\n                    'accountModal__sectionWrapper-messages':\n                      queryParams.has('messages') &&\n                      !(!isLoggedIn && sectionsData === null)\n                  }\n                ])}\n              >\n                {!isLoggedIn && sectionsData === null && <Loading />}\n                {props.children}\n                <div id=\"fixed-footer\" />\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </Portal>\n  );\n};\n","import { useMemo } from 'react';\nimport { useSelector } from 'react-redux';\nimport { ftnCurrency } from 'utils/account/account-params';\nimport { useFetchAccountParams } from 'newhooks/account/useFetchAccountParams';\nimport { getUser } from 'store/selectors/user-data';\n\nexport const useWalletSectionsToExclude = (): string[] | null => {\n  const { accountParams } = useFetchAccountParams();\n  const user = useSelector(getUser);\n\n  return useMemo(() => {\n    if (accountParams && !user.pending) {\n      const _walletSectionsToExclude: Set<string> = new Set([]);\n\n      const stakeAndEarnTurnOff =\n        +accountParams.stakeAndEarn !== 1 || user.currency_id !== ftnCurrency;\n\n      if (stakeAndEarnTurnOff) {\n        _walletSectionsToExclude.add('accounts:wallet:stake-and-earn');\n      }\n\n      const bankAccountSettingTurnOff = +accountParams.bankAccount !== 1;\n\n      if (bankAccountSettingTurnOff) {\n        _walletSectionsToExclude.add('accounts:wallet:bank-account');\n      }\n\n      const transferToFriendTurnOff = +accountParams.buddyTransfer !== 1;\n\n      if (transferToFriendTurnOff) {\n        _walletSectionsToExclude.add('accounts:wallet:transfer-to-friend');\n      }\n\n      return Array.from(_walletSectionsToExclude);\n    }\n\n    return null;\n  }, [accountParams, user]);\n};\n"],"names":["isLoyaltyPointsAvailable","LocalStorage","getItem","storageKeyName","DesktopLayout","props","location","useLocation","history","useHistory","t","useTranslation","isLoggedIn","useSelector","getIsLoggedIn","higherZIndex","getHigherZIndex","searchParams","useSearchParams","activeGames","getActiveGames","bonusSectionsToExclude","useBonusSectionsToExclude","walletSectionsToExclude","useWalletSectionsToExclude","accountParams","useFetchAccountParams","user","getUser","useMemo","pending","_walletSectionsToExclude","Set","stakeAndEarn","currency_id","ftnCurrency","add","bankAccount","buddyTransfer","Array","from","bonuses","getBonuses","sectionsData","getSectionsData","rootPath","mainPath","subPath","search","includes","split","replace","activeMenu","concat","unreadMessagesCount","getUnreadMessagesCount","bonusesCount","setBonusesCount","useState","activeSubMenu","forgotPass","getForgotPasswordOpen","forgotUsername","getForgotUsernameOpen","accountParamsTabsOn","queryParams","URLSearchParams","window","isThereAnyActiveGame","Object","keys","length","mainMenu","SpringConfigs","ACCOUNT_PARAMS","menu","ACCOUNT_DESKTOP_MENU","find","_ref","key","formType","children","forEach","sectionKey","_menu$children","filter","item","_menu$children2","isSmallModal","useEffect","_bonuses$casinoBonuse","_bonuses$freeBonuses","_bonuses$freeSpinBonu","casinoBonuses","freeBonuses","freeSpinBonuses","createMenu","menuData","sections","name","i18n","auth","icon","_jsx","GlobalIcon","lib","theme","size","EIconSize","_24","query","accounts","hidden","map","_sectionsData$section","_sectionsData$section2","singleMenu","section","myProfile","childrenData","profile","profileMenu","push","is_bonus_allowed","showBadge","ITEMS_WITH_BADGE","count","ListItem","arrow","noNeedClass","Boolean","thumb","Badge","className","offset","offsetBadgeValue","OFFSET_TYPE_VALUE_MINUS_12","_jsxs","verifiedAccount","is_verified","active","onClick","updateQuery","owner_id","usePopupScrollDisable","CustomModal","visible","footer","width","centered","zIndex","ZINDEX_HIGH_1","maskStyle","backgroundColor","ZINDEX_HIGH_2","style","borderRadius","padding","bodyStyle","onCancel","closeModal","closable","booking_id","closeIcon","position","_16","maskClosable","renderInBody","Portal","ZINDEX_HIGH_3","UserInfoAndBalance","CANADIAN_ACCOUNT_TYPE","GamblingMessageCa","Logout","id","WalletModal","haveCancel","alias","cc","has","Loading"],"sourceRoot":""}