import store from '../../store' ; export default { async setUserLoggedInStatus ( status ) { await store . dispatch ( 'updateLoginStatus' , status ) ; } , getUserLoggedInStatus ( ) { return store . getters . getLoginStatus ; } , async setUsername ( username ) { await store . dispatch ( 'updateUsername' , username ) ; } , getUsername ( ) { return store . getters . getUsername ; } , async setAvatar ( avatar ) { await store . dispatch ( 'updateAvatar' , avatar ) ; } , getAvatar ( ) { return store . getters . getAvatar ; } , async setEmailVerifiedStatus ( status ) { await store . dispatch ( 'updateEmailVerifiedStatus' , status ) ; } , getEmailVerifiedStatus ( ) { return store . getters . getEmailVerifiedStatus ; } , async clearUserData ( ) { await this . setUserLoggedInStatus ( false ) ; await this . setUsername ( null ) ; await this . setAvatar ( null ) ; await this . setEmailVerifiedStatus ( false ) ; } , async setAuthenticationInvokedStatus ( status = true ) { await store . dispatch ( 'updateAuthenticationInvokedStatus' , status ) ; } , getAuthenticationInvokedStatus ( ) { return store . getters . getAuthenticationInvokedStatus ; } } ;