package com.hongyegroup.cpt_ewallet.mvvm

import android.annotation.SuppressLint
import androidx.lifecycle.SavedStateHandle
import com.guadou.cs_cptservices.binding.BaseDataBindingAdapter
import com.guadou.lib_baselib.base.vm.BaseViewModel
import com.hongyegroup.cpt_ewallet.R
import com.hongyegroup.cpt_ewallet.BR
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

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

    var mHistoryDatas = mutableListOf<String>()
    val mAdapter by lazy { BaseDataBindingAdapter(R.layout.item_ewallet_history, BR.item, mHistoryDatas) }


    @SuppressLint("NotifyDataSetChanged")
    fun setupDataes() {
        mHistoryDatas.clear()
        mHistoryDatas.add("1")
        mHistoryDatas.add("1")
        mHistoryDatas.add("1")

        mAdapter.notifyDataSetChanged()
    }

}