import { Options } from '@ulangi/react-native-navigation' ; import { ScreenName , Theme } from '@ulangi/ulangi-common/enums' ; import { ObservableForgotPasswordScreen , ObservableTitleTopBar , } from '@ulangi/ulangi-observable' ; import { observer } from 'mobx-react' ; import * as React from 'react' ; import { Container , ContainerPassedProps } from '../../Container' ; import { ForgotPasswordScreenFactory } from '../../factories/auth/ForgotPasswordScreenFactory' ; import { ForgotPasswordScreen } from './ForgotPasswordScreen' ; import { ForgotPasswordScreenStyle } from './ForgotPasswordScreenContainer.style' ; @ observer export class ForgotPasswordScreenContainer extends Container { public static options ( props ) { return props . theme === Theme . LIGHT ? ForgotPasswordScreenStyle . SCREEN_FULL_LIGHT_STYLES : ForgotPasswordScreenStyle . SCREEN_FULL_DARK_STYLES ; } private screenFactory = new ForgotPasswordScreenFactory ( this . props , this . eventBus , this . observer ) ; protected observableScreen = new ObservableForgotPasswordScreen ( '' , this . props . componentId , ScreenName . FORGOT_PASSWORD_SCREEN , new ObservableTitleTopBar ( 'Forgot Password' , null , null ) ) ; private navigatorDelegate = this . screenFactory . createNavigatorDelegate ( ) ; private screenDelegate = this . screenFactory . createScreenDelegate ( this . observableScreen ) ; protected onThemeChanged ( theme ) { this . navigatorDelegate . mergeOptions ( theme === Theme . LIGHT ? ForgotPasswordScreenStyle . SCREEN_LIGHT_STYLES_ONLY : ForgotPasswordScreenStyle . SCREEN_DARK_STYLES_ONLY ) ; } public render ( ) { return ( < ForgotPasswordScreen themeStore = { this . props . rootStore . themeStore } observableScreen = { this . observableScreen } screenDelegate = { this . screenDelegate } / > ) ; } }