package com.zj365.mime.act

import com.alibaba.android.arouter.facade.annotation.Route
import com.xty.base.act.IBaseAct
import com.xty.common.Const
import com.xty.common.arouter.ARouterUrl
import com.xty.common.arouter.RouteManager
import com.zj365.mime.R
import com.zj365.mime.databinding.ActAgreementBinding

/**
 * 用户隐私协议列表
 */
@Route(path = ARouterUrl.AGREEMENT_LIST)
class AgreementAct : IBaseAct() {
    val binding by lazy { ActAgreementBinding.inflate(layoutInflater) }
    override fun setLayout() = binding.root

    override fun initData() {
        super.initData()
        isDarkBar = true
    }

    override fun initView() {
        super.initView()
        statusBar(binding.title.mView)
        binding.title.mIvBack.setOnClickListener { finish() }
        binding.title.mTvTitle.text = getString(R.string.see_prev)
        binding.mTvAgree1.setOnClickListener {
            bundle.clear()
            bundle.putString("title", "用户协议")
            bundle.putInt("type", Const.AGREEMENT_1)
            bundle.putBoolean("isAgree", false)
            RouteManager.goAct(ARouterUrl.RICH_TEXT, bundle)
        }
        binding.mTvAgree2.setOnClickListener {
            bundle.clear()
            bundle.putString("title", "隐私政策")
            bundle.putBoolean("isAgree", false)
            bundle.putString("url","https://auprty.com/app/static/app/privacy.html")
            RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle)
        }



    }
}