package com.remax.visualnovel.ui.main.managa


import com.remax.visualnovel.entity.response.Book
import com.remax.visualnovel.app.viewmodel.base.BaseViewModel
import com.remax.visualnovel.entity.response.base.Response
import com.remax.visualnovel.repository.api.ManagasRepository
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.asSharedFlow
import javax.inject.Inject



@HiltViewModel
class MangaListViewModel @Inject constructor(private val chatRepository: ManagasRepository) : BaseViewModel() {

    private val _msgStatFlow = MutableSharedFlow<Response<Book>>()
    val msgStatFlow = _msgStatFlow.asSharedFlow()

    suspend fun getMessageStat() {
        _msgStatFlow.emit(chatRepository.getBooks())
    }

}
