package rowedto.jockeyedto.sheetedto.atticedto.strainedto.wolfedto.furtheredto

import android.annotation.SuppressLint
import android.graphics.Color
import android.os.Environment
import androidx.activity.addCallback
import com.base.datarecovery.R
import com.base.datarecovery.databinding.VisualedtoBinding
import rowedto.jockeyedto.sheetedto.debutedto.revolutionaryedto.Dynamicedto.SCAN_AUDIOS
import rowedto.jockeyedto.sheetedto.debutedto.revolutionaryedto.Dynamicedto.SCAN_DOCUMENTS
import rowedto.jockeyedto.sheetedto.debutedto.revolutionaryedto.Dynamicedto.SCAN_PHOTOS
import rowedto.jockeyedto.sheetedto.debutedto.revolutionaryedto.Dynamicedto.SCAN_VIDEOS
import rowedto.jockeyedto.sheetedto.knewedto.economicedto.copyrightedto.Crossingedto
import rowedto.jockeyedto.sheetedto.raceedto.pavementedto.Spareedto
import rowedto.jockeyedto.sheetedto.strangeedto.pyramidedto.particlesedto.Scandaledto
import java.io.File

class Inappropriateedto : Crossingedto<VisualedtoBinding>() {

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


    @SuppressLint("SetTextI18n")
    override fun initView() {

        Spareedto.setStatusBarLightMode(this, true)
        Spareedto.setStatusBarColor(this, Color.TRANSPARENT)

        val number = intent.extras?.getInt("Number") ?: 0
        val scanType = intent.extras?.getInt("ScanType")

        binding.appetiteedto.text = number.toString()
        val type = when (scanType) {
            SCAN_PHOTOS -> if (number == 1) "Photo" else "Photos"
            SCAN_VIDEOS -> if (number == 1) "Video" else "Videos"
            SCAN_DOCUMENTS -> if (number == 1) "Document" else "Documents"
            SCAN_AUDIOS -> if (number == 1) "Audio" else "Audios"
            else -> ""
        }
        binding.dramaedto.text = type

        val appName = this.resources.getString(R.string.overchargeedto)
        val appDir = File(Environment.getExternalStorageDirectory(), appName)
        binding.dineedto.text = "Recovered in $appDir"
    }

    override fun initListener() {

        binding.conditionedto.setOnClickListener {
            onBackPressedDispatcher.onBackPressed()
        }
        onBackPressedDispatcher.addCallback {
            Scandaledto.admobMaxShowInterstitialAd(this@Inappropriateedto,false) {
                finishToMain()
            }
        }
        binding.articulateedto.setOnClickListener {
            Scandaledto.admobMaxShowInterstitialAd(this,false) {
                finish()
            }
        }
        binding.flairedto.setOnClickListener {
            onBackPressedDispatcher.onBackPressed()
        }
    }

}