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KiE,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\";\r\nimport {MenuItemsConfiguration} from \"../configurations/config-data-sections/menu-items.configuration\";\r\nimport {\r\n MenuItemAnalyticsCategoryAndLabel\r\n} from \"../menu-items-common/menu-item-config-reader/menu-item-config-reader.interface\";\r\nimport {OrbitUserFlowAnalyticsCategory, OrbitUserFlowAnalyticsLabel} from \"../analytics/analytics.service.interface\";\r\n\r\n\r\nexport class BottomNavigationBarMenuItemConfigReader extends MenuItemConfigReaderBase {\r\n\r\n protected _getMenuItemsConfigOverrides(): MenuItemsConfiguration | undefined {\r\n return this.services.configuration.data.bottomNavigationBar.menuItemsOverride;\r\n }\r\n\r\n protected _getAnalyticsCategoryAndLabel(): MenuItemAnalyticsCategoryAndLabel {\r\n return {\r\n category: OrbitUserFlowAnalyticsCategory.Navigation,\r\n label: OrbitUserFlowAnalyticsLabel.BottomNavigationBar\r\n }\r\n }\r\n}","import {BottomNavigationBarMenuItemDefaultBox} from \"./bottom-navigation-bar-menu-item.default.box\";\r\n\r\n\r\nexport const BottomNavigationBarMenuItemBox = BottomNavigationBarMenuItemDefaultBox;\r\n","import styled, {css} from \"styled-components\";\r\n\r\ninterface IStickyNavigationMenuItemBoxProps {\r\n type: string;\r\n isActive: boolean;\r\n}\r\n\r\nexport const BottomNavigationBarMenuItemDefaultBox = styled.div`\r\n position: relative;\r\n flex: auto;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n text-align: center;\r\n text-transform: uppercase;\r\n font-size: 1rem;\r\n color: ${props => props.theme.colors.text};\r\n transition: color 0.2s ease;\r\n\r\n ${props => props.isActive && css`\r\n color: ${props => props.theme.colors.textLight};\r\n `}\r\n \r\n\r\n ${props => props.type === \"deposit\" && css`\r\n color: ${props => props.theme.colors.moneyColor};\r\n `}\r\n`;\r\n","import {styledBox} from \"../../../../themes/architecture/styled-box\";\r\n\r\nexport const BottomNavigationBarMenuItemTextBox = styledBox(\"BottomNavigationBarMenuItemTextBox\");\r\n","import {BottomNavigationBarMenuItemIconDefaultBox} from \"./bottom-navigation-bar-menu-item-icon.default.box\";\r\n\r\nexport const BottomNavigationBarMenuItemIconBox = BottomNavigationBarMenuItemIconDefaultBox;\r\n","import styled, {css} from \"styled-components\";\r\n\r\ninterface IStickyNavigationMenuItemIconBoxProps {\r\n isActive: boolean;\r\n}\r\n\r\nexport const BottomNavigationBarMenuItemIconDefaultBox = styled.div`\r\n width: 2.4rem;\r\n height: 2.4rem;\r\n transition: color 0.2s ease, background-color 0.2s ease, border-bottom 0.2s ease;\r\n ${(props) => props.isActive ? css`\r\n color: ${(props) => props.theme.colors.brandPrimary};\r\n ` : null}\r\n`;\r\n","import React from \"react\";\r\nimport {observer} from \"mobx-react\";\r\nimport {\r\n BottomNavigationBarMenuItemIconBox\r\n} from \"./boxes/menu-item-icon/bottom-navigation-bar-menu-item-icon.box\";\r\nimport {ISvgIconProps} from \"../../basic-ui-components/icon/svg-icon/svg.icon\";\r\nimport {useServices} from \"../../react-hooks/use-services.hook\";\r\nimport {IMenuItemRenderer} from \"../../services/menu-items-common/renderer/menu-item.renderer.interface\";\r\n\r\ninterface BottomNavigationBarMenuItemIconComponentProps {\r\n menuItem: IMenuItemRenderer;\r\n isActive: boolean;\r\n}\r\n\r\nexport const BottomNavigationBarMenuItemIconComponent: React.FC = observer((props) => {\r\n const services = useServices();\r\n\r\n if(props.menuItem.iconSource !== \"themeIcons\" || !props.menuItem.icon) {\r\n return null;\r\n }\r\n\r\n const InternalNavIcon: React.ComponentType | undefined = services.theme.currentTheme.icons[props.menuItem.icon];\r\n\r\n if(!InternalNavIcon) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n {InternalNavIcon ? : null}\r\n \r\n );\r\n});","import React from 'react';\r\nimport {observer} from \"mobx-react\";\r\nimport {MenuItemComponentProps} from \"../../services/menu-items-common/menu-item-component-props.interface\";\r\nimport {BottomNavigationBarMenuItemBox} from \"./boxes/menu-item/bottom-navigation-bar-menu-item.box\";\r\nimport {BottomNavigationBarMenuItemTextBox} from \"./boxes/menu-item-text/bottom-navigation-bar-menu-item-text.box\";\r\nimport {BottomNavigationBarMenuItemIconComponent} from \"./bottom-navigation-bar-menu-item-icon.component\";\r\nimport {ComponentServicesPick} from \"../../services/component-services-pick\";\r\nimport {withServices} from \"../../react-hooks/with-services\";\r\nimport classNames from 'classnames';\r\nimport {TOOLTIP_TARGET_BOTTOM_NAV_BAR_INDICATOR} from '../../services/tooltip/on-boarding-tooltip/on-boarding-tooltip-target-selectors';\r\n\r\ninterface BottomNavigationBarMenuItemComponentProps extends MenuItemComponentProps, ComponentServicesPick<'bottomNavigationBar'> {\r\n\r\n}\r\nconst ComponentBody: React.FC = observer((props) => {\r\n\r\n\r\n const menuItem = props.menuItem;\r\n\r\n const handleLinkClick = async () => {\r\n props.bottomNavigationBar.activeMenuItemKey = props.menuItem.key;\r\n await props.menuItem.execute();\r\n }\r\n\r\n let isActive: boolean;\r\n\r\n if (props.bottomNavigationBar.activeMenuItemKey) {\r\n isActive = props.menuItem.key === props.bottomNavigationBar.activeMenuItemKey;\r\n } else {\r\n isActive = props.menuItem.isMatchToCurrentUrl;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {menuItem.text}\r\n \r\n \r\n );\r\n});\r\n\r\nexport const BottomNavigationBarMenuItemComponent = withServices(ComponentBody, ['bottomNavigationBar']);","import React from 'react';\r\nimport {\r\n BottomNavigationBarMenuItemComponent\r\n} from \"../../../components/bottom-navigation-bar/bottom-navigation-bar-menu-item.component\";\r\nimport {IRenderMenuItemOptions} from \"../../menu-items-common/renderer/menu-item.renderer.interface\";\r\nimport {MenuItemRendererBase} from \"../../menu-items-common/renderer/menu-item-renderer-base\";\r\n\r\nexport class GenericBottomNavigationBarMenuItemRenderer extends MenuItemRendererBase {\r\n protected _createReactElement(options?: IRenderMenuItemOptions): React.ReactElement {\r\n return ();\r\n }\r\n}","import {IBottomNavigationBarService} from \"./bottom-navigation-bar.service.interface\";\r\nimport {ServiceBase} from \"../ServiceBase\";\r\nimport {IServiceFactoryExtended} from \"../service-factory-extended.interface\";\r\nimport {BottomNavigationBarMenuItemConfigReader} from \"./bottom-navigation-bar-menu-item-config-reader\";\r\nimport {MenuItemKey} from \"../configurations/config-data-sections/generated-config-const\";\r\nimport {IMenuItemRenderer} from \"../menu-items-common/renderer/menu-item.renderer.interface\";\r\nimport {\r\n GenericBottomNavigationBarMenuItemRenderer\r\n} from \"./menu-items/generic-bottom-navigation-bar-menu-item.renderer\";\r\nimport {makeObservable, observable, runInAction} from \"mobx\";\r\nimport {IMenuItemActionFactoryService} from \"../menu-item-action-factory/menu-item-action-factory.service.interface\";\r\n\r\nexport class BottomNavigationBarService extends ServiceBase implements IBottomNavigationBarService {\r\n constructor(services: IServiceFactoryExtended, private readonly menuItemActionFactory: IMenuItemActionFactoryService) {\r\n super(services);\r\n\r\n this._menuItemConfigReader = new BottomNavigationBarMenuItemConfigReader(services);\r\n\r\n /*\r\n //Uncomment this when we will have custom renderers for bottom navigation bar menu items\r\n let rendererModules = require.context('./menu-items/custom-renderers', true, /.+\\.renderer\\.(ts|tsx)$/);\r\n this._customMenuItems = loadCustomMenuItemsRenderers(rendererModules.keys().map(rendererModules), this._menuItemConfigReader, this.services, this.menuItemActionFactory);\r\n */\r\n\r\n makeObservable(this);\r\n\r\n this.reaction(() => this.services.routing.currentRoute, () => {\r\n this.activeMenuItemKey = null;\r\n });\r\n\r\n this.services.sdk.events.onSecondWebViewClose(() => {\r\n this.activeMenuItemKey = null;\r\n });\r\n }\r\n\r\n @observable.ref\r\n private _activeMenuItemKey: MenuItemKey | null = null;\r\n\r\n get activeMenuItemKey(): MenuItemKey | null {\r\n return this._activeMenuItemKey;\r\n }\r\n\r\n set activeMenuItemKey(value: MenuItemKey | null) {\r\n runInAction(() => {\r\n this._activeMenuItemKey = value;\r\n });\r\n }\r\n\r\n private readonly _menuItemConfigReader: BottomNavigationBarMenuItemConfigReader;\r\n private readonly _customMenuItems: Partial> = {};\r\n\r\n private _getMenuItem(key: MenuItemKey): IMenuItemRenderer {\r\n let customMenuItem = this.services.regulation.current.menuItems.getBottomNavBarMenuItem(key, this._menuItemConfigReader, this.menuItemActionFactory);\r\n if(customMenuItem) {\r\n return customMenuItem;\r\n }\r\n\r\n customMenuItem = this._customMenuItems[key]\r\n if(customMenuItem) {\r\n return customMenuItem;\r\n }\r\n\r\n return new GenericBottomNavigationBarMenuItemRenderer(key, this._menuItemConfigReader, this.services, this.menuItemActionFactory);\r\n }\r\n\r\n getMenuItems(): IMenuItemRenderer[] {\r\n return (this.services.configuration.data.bottomNavigationBar.menuItemsOrder || [])\r\n .map(key => this._getMenuItem(key))\r\n .filter(menuItem => menuItem.display);\r\n }\r\n\r\n\r\n get isBottomNavigationEnabled(): boolean {\r\n if (!this.services.mediaQuery.lAndBelow || this.services.miniOrbit.isEnabled) {\r\n return false;\r\n }\r\n\r\n if (this.services.device.hybrid.isHybrid) {\r\n return true;\r\n }\r\n\r\n if (Boolean(this.services.configuration.data.bottomNavigationBar?.isEnabledOnWebapp)) {\r\n return true;\r\n }\r\n\r\n return this.services.abTestingFeatureDataProvider.isWebappBottomNavigationAbEnabled;\r\n }\r\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":""}