export class Backup implements Module { getModule ( ) { return { state : { dropboxEncrypted : localStorage . dropboxEncrypted === "true" , driveEncrypted : localStorage . driveEncrypted === "true" , oneDriveEncrypted : localStorage . oneDriveEncrypted === "true" , dropboxToken : Boolean ( localStorage . dropboxToken ) , driveToken : Boolean ( localStorage . driveToken ) , oneDriveToken : Boolean ( localStorage . oneDriveToken ) , } , mutations : { setToken ( state , args ) { switch ( args . service ) { case "dropbox" : state . dropboxToken = args . value ; break ; case "drive" : state . driveToken = args . value ; break ; case "onedrive" : state . oneDriveToken = args . value ; break ; default : break ; } } , setEnc ( state , args ) { switch ( args . service ) { case "dropbox" : state . dropboxEncrypted = args . value ; break ; case "drive" : state . driveEncrypted = args . value ; break ; case "onedrive" : state . oneDriveEncrypted = args . value ; break ; default : break ; } } , } , namespaced : true , } ; } }