package com.remax.visualnovel.ui.main.actor


import com.remax.visualnovel.app.viewmodel.base.BaseViewModel
import com.remax.visualnovel.entity.request.ParamActorList
import com.remax.visualnovel.entity.request.ParamActorTag
import com.remax.visualnovel.entity.response.basenew.ResponseNew
import com.remax.visualnovel.entity.response.ActorBean
import com.remax.visualnovel.repository.api.ActorsRepository
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.asSharedFlow
import javax.inject.Inject



@HiltViewModel
class ActorsViewModel @Inject constructor(private val mActorsRepository: ActorsRepository) : BaseViewModel() {

    private val _actorsStatFlow = MutableSharedFlow<ResponseNew<List<ActorBean>>>()
    val actorsStatFlow = _actorsStatFlow.asSharedFlow()

    suspend fun getActorList(param: ParamActorList) = mActorsRepository.getActorList(param)

    suspend fun getActorTags(param: ParamActorTag) = mActorsRepository.getActorTags(param)

}
