package com.sixin.module_p.ui.enter

import androidx.lifecycle.MutableLiveData
import com.lukouguoji.module_base.base.BaseViewModel
import com.sixin.module_p.ui.enter.gj.GjFragment
import com.sixin.module_p.ui.enter.gn.GnFragment
import com.sixin.module_p.ui.enter.home.HomeFragment
import com.sixin.module_p.ui.enter.mine.PdaMineFragment
import com.sixin.module_p.ui.user.message.PdaMessageListActivity

class PDAEnterViewModel : BaseViewModel() {

    val fragmentList by lazy {
        listOf(
            HomeFragment.newInstance(),
            GnFragment.newInstance(),
            GjFragment.newInstance(),
            PdaMineFragment.newInstance()
        )
    }

    val index = MutableLiveData(0)

    fun onIndexChanged(type: Int) {
        index.value = type
    }

    /**
     * 消息 点击
     */
    fun onMessageClick() {
        PdaMessageListActivity.start(getTopActivity())
    }


}