import { MainWindowState } from '../../../../../models/mainwindow/main-window-state' ; import { NavigationMercenaries } from '../../../../../models/mainwindow/navigation/navigation-mercenaries' ; import { NavigationState } from '../../../../../models/mainwindow/navigation/navigation-state' ; import { CardsFacadeService } from '../../../../cards-facade.service' ; import { MercenariesHeroSelectedEvent } from '../../events/mercenaries/mercenaries-hero-selected-event' ; import { Processor } from '../processor' ; export class MercenariesHeroSelectedProcessor implements Processor { constructor ( private readonly allCards ) { } public async process ( event , currentState , history , navigationState ) { const nav = navigationState . update ( { navigationMercenaries : navigationState . navigationMercenaries . update ( { selectedCategoryId : `mercenaries-meta-hero-details` , selectedHeroId : event . heroId , menuDisplayType : 'breadcrumbs' , } as NavigationMercenaries ) , text : this . allCards . getCard ( event . heroId ) ?. name ?? event . heroId , } as NavigationState ) ; return [ null , nav ] ; } }