package com.adealink.weparty.profile.manager

import com.adealink.frame.base.Rlt
import com.adealink.frame.frame.IBaseFrame
import com.adealink.weparty.module.profile.data.UserConfigType
import com.adealink.weparty.module.profile.data.UserInfo
import com.adealink.weparty.module.profile.listener.IProfileListener

interface IProfileManager : IBaseFrame<IProfileListener> {
    fun getMyUid(): String

    fun getMyUserInfo(): UserInfo?

    suspend fun pullMyUserInfo(): Rlt<UserInfo?>

    fun setMyUserInfo(userInfo: UserInfo, attrSet: Set<UserConfigType>?)

    fun updateMyUserCountryInfo(country: String, region: String, countryFlag: String)

    fun getCacheUserInfo(uid: String): UserInfo?

    fun updateCacheUserInfo(userInfo: UserInfo)

    suspend fun getUserInfoByUid(
        uid: String,
        cache: Boolean = true,
        attrSet: Set<UserConfigType>? = setOf(UserConfigType.USER_ATTR_BASIC),
    ): Rlt<UserInfo>

    suspend fun getUsersInfoByUid(
        uidSet: Set<String>,
        cache: Boolean = true,
        attrSet: Set<UserConfigType>? = setOf(UserConfigType.USER_ATTR_BASIC),
    ): Rlt<Map<String, UserInfo>>

}