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.R
import com.gamedog.vididin.databinding.DialogWithdrawWatchAdBinding as ViewBinding


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

    private var mWithdrawCashNum: Float = 0F

    init {
        build()
    }


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

        mBinding.run {
            progressBar.setBarColor(R.color.blue_ba, R.color.blue_ff)

            setOnClickBatch(flAction, ivClose) {
                when (this) {
                    ivClose ->  {
                        dismiss()
                    }

                    flAction ->  {
                        gotoWatchVideo()
                        dismiss()
                    }
                }
            }
        }
    }


    private fun gotoWatchVideo() {
        // TODO -
        //Router.Withdraw.startActivity(mActivity)

        WithdrawFailDialog(mActivity).show()
        WithdrawSuccessDialog(mActivity).show()
    }




}

