import { ObservableAddEditSetScreen } from '@ulangi/ulangi-observable' ; import { AddSetDelegate } from '../../delegates/set/AddSetDelegate' ; import { AddSetScreenDelegate } from '../../delegates/set/AddSetScreenDelegate' ; import { PickerDelegate } from '../../delegates/set/PickerDelegate' ; import { SetFormDelegate } from '../../delegates/set/SetFormDelegate' ; import { SecondaryScreenStyle } from '../../styles/SecondaryScreenStyle' ; import { ScreenFactory } from '../ScreenFactory' ; export class AddSetScreenFactory extends ScreenFactory { public createScreenDelegate ( observableScreen ) { const navigatorDelegate = this . createNavigatorDelegate ( ) ; const dialogDelegate = this . createDialogDelegate ( SecondaryScreenStyle . LIGHT_BOX_SCREEN_STYLES ) ; const pickerDelegate = new PickerDelegate ( this . observer , observableScreen . setFormState . pickerState ) ; const setFormDelegate = new SetFormDelegate ( observableScreen . setFormState , pickerDelegate ) ; const addSetDelegate = new AddSetDelegate ( this . eventBus , observableScreen . setFormState ) ; return new AddSetScreenDelegate ( observableScreen . setFormState , setFormDelegate , pickerDelegate , addSetDelegate , dialogDelegate , navigatorDelegate ) ; } }