package com.base.filerecoveryrecyclebin.activity.photomanager

import android.content.Intent
import android.widget.Toast
import androidx.activity.addCallback
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.databinding.ActivityScreenShotAnimationBinding
import com.base.filerecoveryrecyclebin.help.BaseActivity
import kotlin.random.Random

class PhotoManagerAnimationActivity : BaseActivity<ActivityScreenShotAnimationBinding>() {

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

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

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

}