package com.gamedog.vididin.features.withdraw


import android.app.Activity
import com.ama.core.architecture.util.setOnClickBatch
import com.ama.core.architecture.widget.BindingDialog
import com.gamedog.vididin.databinding.DialogWithdrawFailBinding as ViewBinding
import com.gamedog.vididin.router.Router


class WithdrawFailDialog(context: Activity) : BindingDialog<ViewBinding>(context, ViewBinding::inflate) {

    init {
        build()
    }


    private fun build() {
        with()
        setCenter()
        setMaskValue(0.8f)
        setCanCancel(false)

        mBinding.run {
            setOnClickBatch(tvActionFeedback, tvActionConfirm, ivClose) {
                when (this) {
                    ivClose ->  {
                        dismiss()
                    }

                    tvActionFeedback ->  {
                        gotoFeedback()
                    }

                    tvActionConfirm ->  {
                        dismiss()
                    }
                }
            }
        }
    }
    

    private fun gotoFeedback() {
        Router.Feedback.startActivity(mActivity)
    }



}

