package com.adealink.weparty.account.login.manager

import com.adealink.frame.base.Rlt
import com.adealink.frame.frame.IBaseFrame
import com.adealink.frame.network.data.Res
import com.adealink.weparty.account.login.data.LoginResult
import com.adealink.weparty.module.account.ILoginListener
import com.adealink.weparty.module.account.data.UserKickReason

interface ILoginManager : IBaseFrame<ILoginListener> {
    var uid: String
    var token: String
    var isLogin: Boolean
    suspend fun googleLogin(
        token: String,
    ): Rlt<Res<LoginResult>>

    suspend fun phoneLogin(region: String, number: String, verify: String): Rlt<Res<LoginResult>>

    suspend fun testLogin(): Rlt<Res<LoginResult>>

    fun logout(toLogin: Boolean? = true)
    fun onKickedOffline(reason: UserKickReason)
    fun onTokenExpire()
    fun notifyLogin()
    fun notifyLogout()

    fun refreshToken()

    fun checkRemoteVirtualAppConfig()

    fun getLoginDeviceId(): String

}