import { ObservableReflexScreen } from '@ulangi/ulangi-observable' ; import { FetchVocabularyDelegate } from '../../delegates/reflex/FetchVocabularyDelegate' ; import { ReflexScreenDelegate } from '../../delegates/reflex/ReflexScreenDelegate' ; import { TimerDelegate } from '../../delegates/reflex/TimerDelegate' ; import { ReflexQuestionIterator } from '../../iterators/ReflexQuestionIterator' ; import { reflexStyles } from '../../styles/ReflexStyles' ; import { ScreenFactory } from '../ScreenFactory' ; export class ReflexScreenFactory extends ScreenFactory { public createScreenDelegate ( observableScreen , questionIterator ) { const navigatorDelegate = this . createNavigatorDelegate ( ) ; const dialogDelegate = this . createDialogDelegate ( reflexStyles . getLightBoxScreenStyles ( ) ) ; const fetchVocabularyDelegate = new FetchVocabularyDelegate ( this . eventBus , this . props . rootStore . setStore , observableScreen , questionIterator ) ; const timerDelegate = new TimerDelegate ( this . observer , observableScreen ) ; return new ReflexScreenDelegate ( this . observer , this . props . observableLightBox , observableScreen , questionIterator , fetchVocabularyDelegate , timerDelegate , dialogDelegate , navigatorDelegate ) ; } }