package com.adealink.weparty.module.profile.viewmodel

import androidx.lifecycle.LiveData
import com.adealink.frame.base.Rlt
import com.adealink.weparty.module.profile.data.EditUserInfo
import com.adealink.weparty.module.profile.data.MyUserInfoData
import com.adealink.weparty.module.profile.data.UserInfo
import com.adealink.weparty.module.profile.data.UserNote

interface IProfileViewModel {

    val userInfoLD: LiveData<UserInfo?>

    val userNoteLD: LiveData<UserNote?>

    val myUserInfoLD: LiveData<MyUserInfoData?>

    val userOnlineLD : LiveData<Map<String, Boolean>>

    fun pullMyUserInfo(): LiveData<Rlt<MyUserInfoData?>>

    fun pullUserInfoBy(uid: String, cache: Boolean): LiveData<Rlt<UserInfo>>

    fun pullUserInoBy(uids: List<String>, cache: Boolean): LiveData<Rlt<Map<String, UserInfo>>>

    fun getUserInfoBy(uid: String): UserInfo?

    fun updateProfile(editUserInfo: EditUserInfo): LiveData<Rlt<Any>>

    fun isUserOnline(uid: String): LiveData<Boolean>

    fun isUserOnline(uids: Set<String>): LiveData<Map<String, Boolean>>

    fun pullUserNoteBy(uid: String, cache: Boolean): LiveData<Rlt<UserNote>>

    fun pullUserNoteBy(uids: List<String>, cache: Boolean): LiveData<Rlt<Map<String, UserNote>>>

    fun getUserNoteBy(uid: String): UserNote?

    fun updateUserNote(uid: String, note: String?): LiveData<Rlt<Any>>
}