package com.dahe.gldriver.ui.account.authteam

import android.os.Bundle
import android.view.View
import com.dahe.gldriver.R
import com.dahe.gldriver.databinding.ActivityAuthTeamBinding
import com.dahe.mylibrary.base.BaseActivity

/**
 * @ClassName AuthTeamActivity
 * @Author john
 * @Date 2024/1/25 16:44
 * @Description 个人车队认证
 */
class AuthTeamActivity : BaseActivity<ActivityAuthTeamBinding>() {
    private var checkTeamType = 0  //0代表运输公司，1代表个人车队


    override fun initView(savedInstanceState: Bundle?) {
        setStatusBarColor(R.color.white)
        setTitleBar("身份认证",true)

        binding.rgTeam.setOnCheckedChangeListener { _, i ->
            changeTeamType(if (i==binding.rbCom.id) 0 else 1)
        }
    }

    override fun initDate() {
    }

    private fun changeTeamType(type : Int){
        checkTeamType = type
        if (0==checkTeamType){
            binding.llCom.visibility = View.VISIBLE
            binding.llPerson.visibility = View.GONE
        }else{
            binding.llCom.visibility = View.GONE
            binding.llPerson.visibility = View.VISIBLE
        }
    }
}