import { MainWindowState } from '../../../../../models/mainwindow/main-window-state' ; import { NavigationState } from '../../../../../models/mainwindow/navigation/navigation-state' ; import { DuelsStateBuilderService } from '../../../../duels/duels-state-builder.service' ; import { PreferencesService } from '../../../../preferences.service' ; import { DuelsRestorePersonalDeckSummaryEvent } from '../../events/duels/duels-restore-personal-deck-summary-event' ; import { Processor } from '../processor' ; export class DuelsRestorePersonalDeckSummaryProcessor implements Processor { constructor ( private readonly duelsStateBuilder , private readonly prefs ) { } public async process ( event , currentState , stateHistory , navigationState ) { const currentPrefs = await this . prefs . getPreferences ( ) ; const newHiddenDecks = ( currentPrefs . duelsPersonalDeckHiddenDeckCodes ?? [ ] ) . filter ( ( deckCode ) => deckCode !== event . deckstring ) ; await this . prefs . setDuelsPersonalDeckHiddenDeckCodes ( newHiddenDecks ) ; return [ null , null , ] ; } }