package com.zswc.creativity.base

import androidx.databinding.ViewDataBinding
import com.zswc.creativity.R
import com.zswc.creativity.activity.OneLoginActivity
import com.zswc.creativity.model.User
import com.ysnows.base.base.BTabActivity
import com.ysnows.base.base.BViewModel
import com.ysnows.base.inter.IUser
import com.ysnows.base.utils.UiSwitch

/**
 * Mine Base Activity
 *
 * @param <VM>
 * @param <B>
</B></VM> */
abstract class MBTabActivity<VM : BViewModel<*>, B : ViewDataBinding> : BTabActivity<VM, B>() {
    override fun toLogin() {
        super.toLogin()
//        toast(R.string.please_login)
        UiSwitch.single(context(), OneLoginActivity::class.java)
    }

    override fun user(): IUser? {
        return User.get()
    }

    override fun bgColor(): Int {
        return R.color.white
    }

    override fun titleColor(): Int {
        return R.color.black
    }

    override fun rightTextColor(): Int {
        return R.color.black
    }

    override fun backDrawable(): Int {
        return R.drawable.ic_back_black
    }
}
