package com.dahe.gldriver.ui.account

import android.os.Bundle
import com.dahe.gldriver.R
import com.dahe.gldriver.base.AppConfig
import com.dahe.gldriver.databinding.ActivityAuthSuccBinding
import com.dahe.gldriver.ui.HomeActivity
import com.dahe.gldriver.ui.account.authperson.AuthDrivingActivity
import com.dahe.gldriver.ui.mine.activity.CarsManActivity
import com.dahe.mylibrary.base.BaseActivity
import com.dahe.mylibrary.utils.ActivityUtils
import com.dahe.mylibrary.utils.BaseUtils
import com.dahe.mylibrary.utils.TimeUtil

/**
 * @ClassName AuthSuccActivity
 * @Author john
 * @Date 2024/3/8 15:13
 * @Description TODO
 */
class AuthSuccActivity : BaseActivity<ActivityAuthSuccBinding>() {
    override fun initView(savedInstanceState: Bundle?) {
        setStatusBarColor(R.color.white)
        val type = intent.extras?.getInt(AppConfig.SUCCESS_TYPE)
        setTitleBar("提交成功", true)

        binding.run {
            btnLeft.setOnClickListener {
                goLeftOrRight(type, true)
            }
            btnRight.setOnClickListener {
                goLeftOrRight(type, false)
            }

        }
    }

    override fun initDate() {

    }


    /*
    *
    * */
    private fun goLeftOrRight(type: Int?, isLeft: Boolean) {
        if (isLeft) {
            ActivityUtils.finishToActivity(HomeActivity::class.java, false)
        } else {
            ActivityUtils.finishToActivityAndGoNew(mContext,CarsManActivity::class.java,AuthDrivingActivity::class.java,false)
        }
    }
}