package com.hongyegroup.cpt_ewallet.mvvm

import androidx.lifecycle.LiveData
import androidx.lifecycle.SavedStateHandle
import androidx.lifecycle.liveData
import com.guadou.lib_baselib.base.vm.BaseViewModel
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow
import javax.inject.Inject


@HiltViewModel
class EWalletWithdrawViewModel @Inject constructor(
    private val savedStateHandle: SavedStateHandle
) : BaseViewModel() {

    var mAllMoney = MutableStateFlow("")
    var mWithdrawMoney = MutableStateFlow("")


    //验证支付密码
    fun verifyPassword(code: String): LiveData<Boolean> {
        return liveData {
            loadStartProgress()
            delay(1000)
            loadHideProgress()
            emit(true)
        }
    }
}