package com.base.datarecovery.activity.repeat

import android.content.Intent
import android.widget.Toast
import androidx.activity.addCallback
import com.base.datarecovery.ads.AdmobMaxHelper
import com.base.datarecovery.ads.admob.AdmobInterstitialUtils
import com.base.datarecovery.ads.max.AdMaxInterstitialUtils
import com.base.datarecovery.databinding.ActivityRepeatAnimationBinding
import com.base.datarecovery.help.BaseActivity
import com.base.datarecovery.help.ConfigHelper
import kotlin.random.Random

class RepeatAnimationActivity : BaseActivity<ActivityRepeatAnimationBinding>() {

    override val binding: ActivityRepeatAnimationBinding by lazy {
        ActivityRepeatAnimationBinding.inflate(layoutInflater)
    }


    override fun initView() {
        binding.root.postDelayed({
            AdmobMaxHelper.admobMaxShowInterstitialAd(this){
                startActivity(Intent(this, RepeatActivity::class.java))
                finish()
            }
        }, Random.nextLong(3000, 4500))
    }

    override fun initListener() {
        onBackPressedDispatcher.addCallback {
            Toast.makeText(this@RepeatAnimationActivity, "wait a moment", Toast.LENGTH_SHORT).show()
        }
    }

}