import { ObservableAtomPlayScreen } from '@ulangi/ulangi-observable' ; import { AtomAnswerDelegate } from '../../delegates/atom/AtomAnswerDelegate' ; import { AtomArcDelegate } from '../../delegates/atom/AtomArcDelegate' ; import { AtomOriginDelegate } from '../../delegates/atom/AtomOriginDelegate' ; import { AtomParticleDelegate } from '../../delegates/atom/AtomParticleDelegate' ; import { AtomPlayScreenDelegate } from '../../delegates/atom/AtomPlayScreenDelegate' ; import { AtomSettingsDelegate } from '../../delegates/atom/AtomSettingsDelegate' ; import { AtomShellDelegate } from '../../delegates/atom/AtomShellDelegate' ; import { FetchVocabularyDelegate } from '../../delegates/atom/FetchVocabularyDelegate' ; import { AtomQuestionIterator } from '../../iterators/AtomQuestionIterator' ; import { atomStyles } from '../../styles/AtomStyles' ; import { ScreenFactory } from '../ScreenFactory' ; export class AtomPlayScreenFactory extends ScreenFactory { public createAtomSettingsDelegate ( ) { return new AtomSettingsDelegate ( ) ; } public createScreenDelegate ( observableScreen , questionIterator , startGame ) { const navigatorDelegate = this . createNavigatorDelegate ( ) ; const dialogDelegate = this . createDialogDelegate ( atomStyles . getLightBoxScreenStyles ( ) ) ; const fetchVocabularyDelegate = new FetchVocabularyDelegate ( this . eventBus ) ; const originDelegate = new AtomOriginDelegate ( observableScreen ) ; const shellDelegate = new AtomShellDelegate ( observableScreen ) ; const particleDelegate = new AtomParticleDelegate ( this . observer , observableScreen ) ; const answerDelegate = new AtomAnswerDelegate ( observableScreen , particleDelegate ) ; const arcDelegate = new AtomArcDelegate ( this . observer , observableScreen , answerDelegate ) ; return new AtomPlayScreenDelegate ( this . observer , this . props . observableLightBox , observableScreen , questionIterator , fetchVocabularyDelegate , originDelegate , particleDelegate , shellDelegate , arcDelegate , answerDelegate , dialogDelegate , navigatorDelegate , startGame ) ; } }