import { HistoryInteractionEvent , interactionEvent } from '@/store/history/types' ; import { InteractionState } from './types' ; import { State } from '../../../../node_modules/vuex-class' ; enum InteractionEventType { TOGGLE_SYSTEM_VISMODE = 'toggle-system-vismode' } export const toggleSystemVisModeEvent = ( value ) : HistoryInteractionEvent => { return interactionEvent ( InteractionEventType . TOGGLE_SYSTEM_VISMODE , 'toggle VisMode' , value , { value : 'fas fa-video' } ) ; } ; const undoToggleSystemVisMode = ( state , evt ) => { state . isSystemInVisMode = ! ( evt . data as boolean ) ; } ; const redoToggleSystemVisMode = ( state , evt ) => { state . isSystemInVisMode = evt . data as boolean ; } ; export const undo = ( state , evt ) => { switch ( evt . type ) { case InteractionEventType . TOGGLE_SYSTEM_VISMODE : undoToggleSystemVisMode ( state , evt ) ; break ; } } ; export const redo = ( state , evt ) => { switch ( evt . type ) { case InteractionEventType . TOGGLE_SYSTEM_VISMODE : redoToggleSystemVisMode ( state , evt ) ; break ; } } ;