package com.kaixed.kchat.viewmodel

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.kaixed.kchat.model.register.Register
import com.kaixed.kchat.model.user.UserList
import com.kaixed.kchat.repository.UserRepo

/**
 * @Author: kaixed
 * @Date: 2024/10/23 20:14
 */
class UserViewModel : ViewModel() {
    private val userRepo: UserRepo = UserRepo()

    fun getUserListByNickname(username: String): MutableLiveData<UserList?> =
        userRepo.getUserListByNickname(username)

    fun register(
        username: String,
        password: String,
        nickname: String,
        avatarUrl: String,
        signature: String,
    ): MutableLiveData<Register?> =
        userRepo.register(username, password, nickname, avatarUrl, signature)

}
