import { DeckFilters } from '../../../../../models/mainwindow/decktracker/deck-filters' ; import { MainWindowState } from '../../../../../models/mainwindow/main-window-state' ; import { NavigationState } from '../../../../../models/mainwindow/navigation/navigation-state' ; import { DecksStateBuilderService } from '../../../../decktracker/main/decks-state-builder.service' ; import { PreferencesService } from '../../../../preferences.service' ; import { ChangeDeckSortEvent } from '../../events/decktracker/change-deck-sort-event' ; import { Processor } from '../processor' ; export class ChangeDeckSortProcessor implements Processor { constructor ( private readonly decksStateBuilder , private readonly prefs ) { } public async process ( event , currentState , stateHistory , navigationState ) { const filters = Object . assign ( new DeckFilters ( ) , currentState . decktracker . filters , { sort : event . sort , } as DeckFilters ) ; await this . prefs . setDesktopDeckFilters ( filters ) ; return [ null , null ] ; } }