import { MainWindowState } from '../../../../../../models/mainwindow/main-window-state' ; import { NavigationState } from '../../../../../../models/mainwindow/navigation/navigation-state' ; import { Events } from '../../../../../events.service' ; import { GlobalStatsUpdatedEvent } from '../../../events/stats/global/global-stats-updated-event' ; import { Processor } from '../../processor' ; export class GlobalStatsUpdatedProcessor implements Processor { constructor ( private readonly events ) { } public async process ( event , currentState , stateHistory , navigationState ) { this . events . broadcast ( Events . GLOBAL_STATS_UPDATED , event . stats ) ; return [ Object . assign ( new MainWindowState ( ) , currentState , { globalStats : event . stats , } as MainWindowState ) , null , ] ; } }