import { getStoreAccessors , Handler } from "../../../../" ; import { State as RootState } from "../state" ; import { SystemState } from "./systemState" ; export class SystemModuleHandlers { @ Handler public setUserLogin ( state , login ) { state . userLogin = login ; } } export const systemModuleHandlers = new SystemModuleHandlers ( ) ; export const system = { namespaced : true , state : { userLogin : null , } , mutations : { setUserLogin : systemModuleHandlers . setUserLogin , } , } ; const { commit } = getStoreAccessors < SystemState , RootState > ( "system" ) ; export const commitSetUserLogin = commit ( systemModuleHandlers . setUserLogin ) ;