import { DatabaseFacade , ModelList } from '@ulangi/ulangi-local-database' ; import { NetInfoAdapter } from '../adapters/NetInfoAdapter' ; import { SystemThemeAdapter } from '../adapters/SystemThemeAdapter' ; import { AppSaga } from '../sagas/AppSaga' ; import { AuthSaga } from '../sagas/AuthSaga' ; import { DatabaseSaga } from '../sagas/DatabaseSaga' ; import { NetworkSaga } from '../sagas/NetworkSaga' ; import { PublicSaga } from '../sagas/PublicSaga' ; import { RemoteConfigSaga } from '../sagas/RemoteConfigSaga' ; import { ThemeSaga } from '../sagas/ThemeSaga' ; export class PublicSagaFactory { private database : DatabaseFacade ; private modelList : ModelList ; private netInfo : NetInfoAdapter ; private systemTheme : SystemThemeAdapter ; public constructor ( database , modelList , netInfo , systemTheme ) { this . database = database ; this . modelList = modelList ; this . netInfo = netInfo ; this . systemTheme = systemTheme ; } public createAllPublicSagas ( ) { const sagas = [ new AppSaga ( ) , new AuthSaga ( this . database , this . modelList . sessionModel , this . modelList . userModel ) , new DatabaseSaga ( this . database ) , new NetworkSaga ( this . netInfo ) , new RemoteConfigSaga ( this . database , this . modelList . remoteConfigModel ) , new ThemeSaga ( this . systemTheme ) , ] ; return sagas ; } }