package xn.xxp.home.sign

import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import http.vo.response.SignFaceVo

/**
 * info
 *
 * @author ReiChin_
 */
class SignViewModel : ViewModel() {

    private val mutableCheckItemData = MutableLiveData<CheckItem>()
    private val mutableSignTypeData = MutableLiveData<Int>()
    private val mutableSignFaceData = MutableLiveData<SignFaceVo>()

    val checkItemData: LiveData<CheckItem> get() = mutableCheckItemData
    val signTypeData: LiveData<Int> get() = mutableSignTypeData
    val signFaceData: LiveData<SignFaceVo> get() = mutableSignFaceData

    fun setCheckItem(data: CheckItem) {
        mutableCheckItemData.value = data
    }

    fun setSignType(signType: Int) {
        mutableSignTypeData.value = signType
    }

    fun setSignFace(data: SignFaceVo) {
        mutableSignFaceData.value = data
    }

}

data class CheckItem(
    val code: String,
    val titleText: String = "",
    @DrawableRes val samplePicture: Int = 0,
    @StringRes val tipInfo: Int = 0
)