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AAKiE,kBAChB,EAAC,IAED,SAAsBC,GAA4B,IAAD,QAC7CC,EAAAA,EAAAA,IAAY,WACT,EAAKF,mBAAqBC,CAC7B,GACJ,GAAC,0BAKD,SAAqBzB,GACjB,IAAI2B,EAAiBpE,KAAKC,SAASoE,WAAWC,QAAQC,UAAUC,wBAAwB/B,EAAKzC,KAAKwD,sBAAuBxD,KAAKuD,uBAC9H,OAAGa,KAIHA,EAAiBpE,KAAKyD,iBAAiBhB,KAKhC,IAAIS,EAA2CT,EAAKzC,KAAKwD,sBAAuBxD,KAAKC,SAAUD,KAAKuD,uBAC/G,GAAC,0BAED,WAAqC,IAAD,OAChC,OAAQvD,KAAKC,SAASC,cAAcC,KAAKC,oBAAoBqE,gBAAkB,IAC1EC,KAAI,SAAAjC,GAAG,OAAI,EAAKkC,aAAalC,EAAI,IACjCmC,QAAO,SAAA/C,GAAQ,OAAIA,EAASgD,OAAO,GAC5C,GAAC,qCAGD,WAA0C,IAAD,EACrC,SAAK7E,KAAKC,SAAS6E,WAAWC,WAAa/E,KAAKC,SAAS+E,UAAUC,eAI/DjF,KAAKC,SAASiF,OAAOC,OAAOC,aAI5BC,QAA4D,QAArD,EAACrF,KAAKC,SAASC,cAAcC,KAAKC,2BAAmB,aAApD,EAAsDkF,oBAI3DtF,KAAKC,SAASsF,6BAA6BC,mCACtD,KAAC,EAnDc,CAvB6BC,EAAAA,GAAW,wHAwBN,IAAK,IAAD,E","sources":["app-react/services/bottom-navigation-bar/bottom-navigation-bar-menu-item-config-reader.ts","app-react/components/bottom-navigation-bar/boxes/menu-item/bottom-navigation-bar-menu-item.box.ts","app-react/components/bottom-navigation-bar/boxes/menu-item/bottom-navigation-bar-menu-item.default.box.ts","app-react/components/bottom-navigation-bar/boxes/menu-item-text/bottom-navigation-bar-menu-item-text.box.ts","app-react/components/bottom-navigation-bar/boxes/menu-item-icon/bottom-navigation-bar-menu-item-icon.box.ts","app-react/components/bottom-navigation-bar/boxes/menu-item-icon/bottom-navigation-bar-menu-item-icon.default.box.ts","app-react/components/bottom-navigation-bar/bottom-navigation-bar-menu-item-icon.component.tsx","app-react/components/bottom-navigation-bar/bottom-navigation-bar-menu-item.component.tsx","app-react/services/bottom-navigation-bar/menu-items/generic-bottom-navigation-bar-menu-item.renderer.tsx","app-react/services/bottom-navigation-bar/bottom-navigation-bar.service.ts"],"sourcesContent":["import {MenuItemConfigReaderBase} from \"../menu-items-common/menu-item-config-reader/menu-item-config-reader-base\";\nimport {MenuItemsConfiguration} from \"../configurations/config-data-sections/menu-items.configuration\";\nimport {\n MenuItemAnalyticsCategoryAndLabel\n} from \"../menu-items-common/menu-item-config-reader/menu-item-config-reader.interface\";\nimport {OrbitUserFlowAnalyticsCategory, OrbitUserFlowAnalyticsLabel} from \"../analytics/analytics.service.interface\";\n\n\nexport class BottomNavigationBarMenuItemConfigReader extends MenuItemConfigReaderBase {\n\n protected _getMenuItemsConfigOverrides(): MenuItemsConfiguration | undefined {\n return this.services.configuration.data.bottomNavigationBar.menuItemsOverride;\n }\n\n protected _getAnalyticsCategoryAndLabel(): MenuItemAnalyticsCategoryAndLabel {\n return {\n category: OrbitUserFlowAnalyticsCategory.Navigation,\n label: OrbitUserFlowAnalyticsLabel.BottomNavigationBar\n }\n }\n}","import {BottomNavigationBarMenuItemDefaultBox} from \"./bottom-navigation-bar-menu-item.default.box\";\n\n\nexport const BottomNavigationBarMenuItemBox = BottomNavigationBarMenuItemDefaultBox;\n","import styled, {css} from \"styled-components\";\n\ninterface IStickyNavigationMenuItemBoxProps {\n type: string;\n isActive: boolean;\n}\n\nexport const BottomNavigationBarMenuItemDefaultBox = styled.div`\n flex: auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n text-transform: uppercase;\n font-size: 1rem;\n color: ${props => props.theme.colors.text};\n transition: color 0.2s ease;\n\n ${props => props.isActive && css`\n color: ${props => props.theme.colors.textLight};\n `}\n \n\n ${props => props.type === \"deposit\" && css`\n color: ${props => props.theme.colors.moneyColor};\n `}\n`;\n","import {styledBox} from \"../../../../themes/architecture/styled-box\";\n\nexport const BottomNavigationBarMenuItemTextBox = styledBox(\"BottomNavigationBarMenuItemTextBox\");\n","import {BottomNavigationBarMenuItemIconDefaultBox} from \"./bottom-navigation-bar-menu-item-icon.default.box\";\n\nexport const BottomNavigationBarMenuItemIconBox = BottomNavigationBarMenuItemIconDefaultBox;\n","import styled, {css} from \"styled-components\";\n\ninterface IStickyNavigationMenuItemIconBoxProps {\n isActive: boolean;\n}\n\nexport const BottomNavigationBarMenuItemIconDefaultBox = styled.div`\n width: 2.4rem;\n height: 2.4rem;\n transition: color 0.2s ease, background-color 0.2s ease, border-bottom 0.2s ease;\n ${(props) => props.isActive ? css`\n color: ${(props) => props.theme.colors.brandPrimary};\n ` : null}\n`;\n","import React from \"react\";\nimport {observer} from \"mobx-react\";\nimport {\n BottomNavigationBarMenuItemIconBox\n} from \"./boxes/menu-item-icon/bottom-navigation-bar-menu-item-icon.box\";\nimport {ISvgIconProps} from \"../../basic-ui-components/icon/svg-icon/svg.icon\";\nimport {useServices} from \"../../react-hooks/use-services.hook\";\nimport {IMenuItemRenderer} from \"../../services/menu-items-common/renderer/menu-item.renderer.interface\";\n\ninterface BottomNavigationBarMenuItemIconComponentProps {\n menuItem: IMenuItemRenderer;\n isActive: boolean;\n}\n\nexport const BottomNavigationBarMenuItemIconComponent: React.FC = observer((props) => {\n const services = useServices();\n\n if(props.menuItem.iconSource !== \"themeIcons\" || !props.menuItem.icon) {\n return null;\n }\n\n const InternalNavIcon: React.ComponentType | undefined = services.theme.currentTheme.icons[props.menuItem.icon];\n\n if(!InternalNavIcon) {\n return null;\n }\n\n return (\n \n {InternalNavIcon ? : null}\n \n );\n});","import React from 'react';\nimport {observer} from \"mobx-react\";\nimport {MenuItemComponentProps} from \"../../services/menu-items-common/menu-item-component-props.interface\";\nimport {BottomNavigationBarMenuItemBox} from \"./boxes/menu-item/bottom-navigation-bar-menu-item.box\";\nimport {BottomNavigationBarMenuItemTextBox} from \"./boxes/menu-item-text/bottom-navigation-bar-menu-item-text.box\";\nimport {BottomNavigationBarMenuItemIconComponent} from \"./bottom-navigation-bar-menu-item-icon.component\";\nimport {ComponentServicesPick} from \"../../services/component-services-pick\";\nimport {withServices} from \"../../react-hooks/with-services\";\nimport classNames from 'classnames';\nimport {TOOLTIP_TARGET_BOTTOM_NAV_BAR_INDICATOR} from '../../services/tooltip/on-boarding-tooltip/on-boarding-tooltip-target-selectors';\n\ninterface BottomNavigationBarMenuItemComponentProps extends MenuItemComponentProps, ComponentServicesPick<'bottomNavigationBar'> {\n\n}\nconst ComponentBody: React.FC = observer((props) => {\n\n\n const menuItem = props.menuItem;\n\n const handleLinkClick = async () => {\n props.bottomNavigationBar.activeMenuItemKey = props.menuItem.key;\n await props.menuItem.execute();\n }\n\n let isActive: boolean;\n\n if (props.bottomNavigationBar.activeMenuItemKey) {\n isActive = props.menuItem.key === props.bottomNavigationBar.activeMenuItemKey;\n } else {\n isActive = props.menuItem.isMatchToCurrentUrl;\n }\n\n return (\n \n \n \n {menuItem.text}\n \n \n );\n});\n\nexport const BottomNavigationBarMenuItemComponent = withServices(ComponentBody, ['bottomNavigationBar']);","import React from 'react';\nimport {\n BottomNavigationBarMenuItemComponent\n} from \"../../../components/bottom-navigation-bar/bottom-navigation-bar-menu-item.component\";\nimport {IRenderMenuItemOptions} from \"../../menu-items-common/renderer/menu-item.renderer.interface\";\nimport {MenuItemRendererBase} from \"../../menu-items-common/renderer/menu-item-renderer-base\";\n\nexport class GenericBottomNavigationBarMenuItemRenderer extends MenuItemRendererBase {\n protected _createReactElement(options?: IRenderMenuItemOptions): React.ReactElement {\n return ();\n }\n}","import {IBottomNavigationBarService} from \"./bottom-navigation-bar.service.interface\";\nimport {ServiceBase} from \"../ServiceBase\";\nimport {IServiceFactoryExtended} from \"../service-factory-extended.interface\";\nimport {BottomNavigationBarMenuItemConfigReader} from \"./bottom-navigation-bar-menu-item-config-reader\";\nimport {MenuItemKey} from \"../configurations/config-data-sections/generated-config-const\";\nimport {IMenuItemRenderer} from \"../menu-items-common/renderer/menu-item.renderer.interface\";\nimport {\n GenericBottomNavigationBarMenuItemRenderer\n} from \"./menu-items/generic-bottom-navigation-bar-menu-item.renderer\";\nimport {makeObservable, observable, runInAction} from \"mobx\";\nimport {IMenuItemActionFactoryService} from \"../menu-item-action-factory/menu-item-action-factory.service.interface\";\n\nexport class BottomNavigationBarService extends ServiceBase implements IBottomNavigationBarService {\n constructor(services: IServiceFactoryExtended, private readonly menuItemActionFactory: IMenuItemActionFactoryService) {\n super(services);\n\n this._menuItemConfigReader = new BottomNavigationBarMenuItemConfigReader(services);\n\n /*\n //Uncomment this when we will have custom renderers for bottom navigation bar menu items\n let rendererModules = require.context('./menu-items/custom-renderers', true, /.+\\.renderer\\.(ts|tsx)$/);\n this._customMenuItems = loadCustomMenuItemsRenderers(rendererModules.keys().map(rendererModules), this._menuItemConfigReader, this.services, this.menuItemActionFactory);\n */\n\n makeObservable(this);\n\n this.reaction(() => this.services.routing.currentRoute, () => {\n this.activeMenuItemKey = null;\n });\n\n this.services.sdk.events.onSecondWebViewClose(() => {\n this.activeMenuItemKey = null;\n });\n }\n\n @observable.ref\n private _activeMenuItemKey: MenuItemKey | null = null;\n\n get activeMenuItemKey(): MenuItemKey | null {\n return this._activeMenuItemKey;\n }\n\n set activeMenuItemKey(value: MenuItemKey | null) {\n runInAction(() => {\n this._activeMenuItemKey = value;\n });\n }\n\n private readonly _menuItemConfigReader: BottomNavigationBarMenuItemConfigReader;\n private readonly _customMenuItems: Partial> = {};\n\n private _getMenuItem(key: MenuItemKey): IMenuItemRenderer {\n let customMenuItem = this.services.regulation.current.menuItems.getBottomNavBarMenuItem(key, this._menuItemConfigReader, this.menuItemActionFactory);\n if(customMenuItem) {\n return customMenuItem;\n }\n\n customMenuItem = this._customMenuItems[key]\n if(customMenuItem) {\n return customMenuItem;\n }\n\n return new GenericBottomNavigationBarMenuItemRenderer(key, this._menuItemConfigReader, this.services, this.menuItemActionFactory);\n }\n\n getMenuItems(): IMenuItemRenderer[] {\n return (this.services.configuration.data.bottomNavigationBar.menuItemsOrder || [])\n .map(key => this._getMenuItem(key))\n .filter(menuItem => menuItem.display);\n }\n\n\n get isBottomNavigationEnabled(): boolean {\n if (!this.services.mediaQuery.lAndBelow || this.services.miniOrbit.isEnabled) {\n return false;\n }\n\n if (this.services.device.hybrid.isHybrid) {\n return true;\n }\n\n if (Boolean(this.services.configuration.data.bottomNavigationBar?.isEnabledOnWebapp)) {\n return true;\n }\n\n return this.services.abTestingFeatureDataProvider.isWebappBottomNavigationAbEnabled;\n }\n}"],"names":["BottomNavigationBarMenuItemConfigReader","this","services","configuration","data","bottomNavigationBar","menuItemsOverride","category","OrbitUserFlowAnalyticsCategory","label","OrbitUserFlowAnalyticsLabel","MenuItemConfigReaderBase","BottomNavigationBarMenuItemBox","styled","props","theme","colors","text","isActive","css","textLight","type","moneyColor","BottomNavigationBarMenuItemTextBox","styledBox","BottomNavigationBarMenuItemIconBox","brandPrimary","BottomNavigationBarMenuItemIconComponent","observer","useServices","menuItem","iconSource","icon","InternalNavIcon","currentTheme","icons","size","title","iconAltText","ComponentBody","handleLinkClick","activeMenuItemKey","key","execute","isMatchToCurrentUrl","onClick","className","classNames","TOOLTIP_TARGET_BOTTOM_NAV_BAR_INDICATOR","BottomNavigationBarMenuItemComponent","withServices","GenericBottomNavigationBarMenuItemRenderer","options","MenuItemRendererBase","BottomNavigationBarService","observable","menuItemActionFactory","_menuItemConfigReader","_customMenuItems","makeObservable","reaction","routing","currentRoute","sdk","events","onSecondWebViewClose","_activeMenuItemKey","value","runInAction","customMenuItem","regulation","current","menuItems","getBottomNavBarMenuItem","menuItemsOrder","map","_getMenuItem","filter","display","mediaQuery","lAndBelow","miniOrbit","isEnabled","device","hybrid","isHybrid","Boolean","isEnabledOnWebapp","abTestingFeatureDataProvider","isWebappBottomNavigationAbEnabled","ServiceBase"],"sourceRoot":""}