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 javax.inject.Inject

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

    var mFirstPassword: String = ""

    //设置支付密码
    fun setPaymentPassword(code: String): LiveData<Boolean> {

        return liveData {
            loadStartProgress()
            delay(1000)
            loadHideProgress()
            emit(true)
        }

    }

    //验证支付密码
    fun validPaymentPassword(code: String): LiveData<Boolean> {

        return liveData {
            loadStartProgress()
            delay(1000)
            loadHideProgress()
            emit(true)
        }

    }

}