import { MainWindowState } from '../../../../../models/mainwindow/main-window-state' ; import { NavigationState } from '../../../../../models/mainwindow/navigation/navigation-state' ; import { PreferencesService } from '../../../../preferences.service' ; import { ShowReplaysEvent } from '../../events/replays/show-replays-event' ; import { Processor } from '../processor' ; export class ShowReplaysProcessor implements Processor { constructor ( private readonly prefs ) { } public async process ( event , currentState , stateHistory , navigationState ) { const prefs = await this . prefs . getPreferences ( ) ; this . prefs . savePreferences ( { ... prefs , replaysActiveDeckstringFilter : event . deckstring , replaysActiveGameModeFilter : event . gameMode , } ) ; return [ null , navigationState . update ( { isVisible : true , currentApp : 'replays' , text : null , image : null , } as NavigationState ) , ] ; } }