package com.hongyegroup.cpt_auths.ui

import android.content.Intent
import android.os.Bundle
import androidx.lifecycle.MutableLiveData
import com.guadou.cs_cptservices.base.activity.YYBaseVDBActivity
import com.guadou.lib_baselib.base.vm.EmptyViewModel
import com.guadou.lib_baselib.bean.DataBindingConfig
import com.guadou.lib_baselib.utils.CommUtils
import com.guadou.lib_baselib.utils.KeyboardUtils
import com.hongyegroup.cpt_auths.BR
import com.hongyegroup.cpt_auths.R
import com.hongyegroup.cpt_auths.databinding.ActivityBusinessForgotPsdEmailBinding

/**
 * 公司忘记密码 1-输入邮箱
 */
class BusinessForgotPsdEmailActivity : YYBaseVDBActivity<EmptyViewModel, ActivityBusinessForgotPsdEmailBinding>() {

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

    override fun getDataBindingConfig(): DataBindingConfig {
        return DataBindingConfig(R.layout.activity_business_forgot_psd_email)
            .addBindingParams(BR.click, ClickProxy())
    }

    override fun startObserve() {

    }

    override fun init(savedInstanceState: Bundle?) {

    }

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

        //邮箱
        val mEmailLD: MutableLiveData<String> = MutableLiveData()

        //执行提交
        fun doSubmit() {
            KeyboardUtils.hideSoftInput(mActivity)
            BusinessForgotPsdVerityActivity.startInstance("liukai2324@163.com")
        }

    }

}