package com.quansu.heifengwuliu.base

import androidx.databinding.ViewDataBinding
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.quansu.heifengwuliu.R
import com.quansu.heifengwuliu.activity.OneLoginActivity
import com.quansu.heifengwuliu.model.User
import com.ysnows.base.base.BRActivity
import com.ysnows.base.base.BRViewModel
import com.ysnows.base.inter.IUser
import com.ysnows.base.utils.UiSwitch

/**
 * Mine Base BRView Activity
 *
 * @param <VM>
 * @param <A>
 * @param <B>
</B></A></VM> */
abstract class MBRActivity<VM : BRViewModel<*>, A : BaseQuickAdapter<*, out BaseViewHolder>, B : ViewDataBinding> : BRActivity<VM, A, B>() {
    override fun toLogin() {
        super.toLogin()
        UiSwitch.single(context(), OneLoginActivity::class.java)
//     toast(R.string.please_login)
    }

    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 backDrawable(): Int {
        return R.drawable.ic_back_black
    }

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


}
