import { ObservableQuizWritingScreen } from '@ulangi/ulangi-observable' ; import { QuizSettingsDelegate } from '../../delegates/quiz/QuizSettingsDelegate' ; import { QuizWritingScreenDelegate } from '../../delegates/quiz/QuizWritingScreenDelegate' ; import { WritingFormDelegate } from '../../delegates/writing/WritingFormDelegate' ; import { WritingQuestionIterator } from '../../iterators/WritingQuestionIterator' ; import { ScreenFactory } from '../ScreenFactory' ; export class QuizWritingScreenFactory extends ScreenFactory { public createQuizSettingsDelegate ( ) { return new QuizSettingsDelegate ( this . eventBus , this . props . rootStore . setStore ) ; } public createScreenDelegate ( questionIterator , observableScreen , startWritingQuiz ) { const navigatorDelegate = this . createNavigatorDelegate ( ) ; const writingFormDelegate = new WritingFormDelegate ( this . observer , observableScreen . writingFormState , observableScreen . writingResult ) ; return new QuizWritingScreenDelegate ( this . observer , questionIterator , observableScreen , writingFormDelegate , navigatorDelegate , startWritingQuiz ) ; } }