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.BFragment
import com.ysnows.base.base.BViewModel
import com.ysnows.base.inter.IUser
import com.ysnows.base.utils.UiSwitch

/**
 * Mine Base Fragment
 *
 * @param <VM>
 * @param <B>
</B></VM> */
abstract class MBFragment<VM : BViewModel<*>, B : ViewDataBinding> : BFragment<VM, 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 rightTextColor(): Int {
        return R.color.black
    }

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

}
