import { Options } from '@ulangi/react-native-navigation' ; import { EventBus } from '@ulangi/ulangi-event' ; import { Observer } from '@ulangi/ulangi-observable' ; import { ContainerProps } from '../Container' ; import { DialogDelegate } from '../delegates/dialog/DialogDelegate' ; import { LinkingDelegate } from '../delegates/linking/LinkingDelegate' ; import { NavigatorDelegate } from '../delegates/navigator/NavigatorDelegate' ; import { RootScreenDelegate } from '../delegates/root/RootScreenDelegate' ; import { SetSelectionMenuDelegate } from '../delegates/set/SetSelectionMenuDelegate' ; export class ScreenFactory { protected props : ContainerProps ; protected eventBus : EventBus ; protected observer : Observer ; public constructor ( props , eventBus , observer ) { this . props = props ; this . eventBus = eventBus ; this . observer = observer ; } public createRootScreenDelegate ( ) { return new RootScreenDelegate ( this . props . rootStore . themeStore ) ; } public createNavigatorDelegate ( ) { return new NavigatorDelegate ( this . props . componentId , this . props . screenType , this . props . observableLightBox , this . props . rootStore . themeStore ) ; } public createDialogDelegate ( styles ) { return new DialogDelegate ( this . props . observableLightBox , this . createNavigatorDelegate ( ) , styles ) ; } public createLinkingDelegate ( styles ) { return new LinkingDelegate ( this . createDialogDelegate ( styles ) ) ; } public createSetSelectionMenuDelegate ( styles ) { return new SetSelectionMenuDelegate ( this . eventBus , this . props . rootStore . setStore , this . createNavigatorDelegate ( ) , styles ) ; } }