package com.hongyegroup.cpt_parttime.ui

import android.content.Intent
import android.os.Bundle
import androidx.databinding.ViewDataBinding
import com.guadou.cs_cptservices.base.activity.YYBaseVDBActivity
import com.guadou.lib_baselib.base.vm.BaseViewModel
import com.guadou.lib_baselib.bean.DataBindingConfig
import com.guadou.lib_baselib.utils.CommUtils
import com.hongyegroup.cpt_parttime.BR
import com.hongyegroup.cpt_parttime.R
import com.hongyegroup.cpt_parttime.databinding.ActivitySettingsBinding

class SettingsActivity : YYBaseVDBActivity<BaseViewModel, ActivitySettingsBinding>() {

    companion object {
        fun startInstance() {
            val context = CommUtils.getContext()
            val intent = Intent(context, SettingsActivity::class.java)
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
            context.startActivity(intent)
        }
    }

    override fun init(savedInstanceState: Bundle?) {


    }

    override fun getDataBindingConfig(): DataBindingConfig {

        return DataBindingConfig(R.layout.activity_settings, BR.viewModel, mViewModel)
            .addBindingParams(BR.click, ClickProxy())

    }

    override fun startObserve() {

    }

    /**
     * DataBinding事件处理
     */
    inner class ClickProxy {

        //点击重置密码
        fun resetPassword() {

            ResetPasswordActivity.startInstance()

        }

    }

}