import { AchievementsState } from '../../../../../models/mainwindow/achievements-state' ; import { MainWindowState } from '../../../../../models/mainwindow/main-window-state' ; import { NavigationState } from '../../../../../models/mainwindow/navigation/navigation-state' ; import { AchievementsInitEvent } from '../../events/achievements/achievements-init-event' ; import { Processor } from '../processor' ; export class AchievementsInitProcessor implements Processor { public async process ( event , currentState ) { const newAchievements = currentState . achievements . update ( { categories : event . categories , } as AchievementsState ) ; const result = Object . assign ( new MainWindowState ( ) , currentState , { achievements : newAchievements , } as MainWindowState ) ; return [ result , null ] ; } }