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