package tinj.jcdv.wpky

import aicg.wipf.vzuj.Hqlm
import aicg.wipf.vzuj.Kmqp.string
import aicg.wipf.vzuj.bcxo.Fnpc
import android.content.Intent
import android.graphics.Color
import android.os.Handler
import androidx.activity.OnBackPressedCallback
import androidx.core.view.updatePadding
import com.blankj.utilcode.util.BarUtils
import com.blankj.utilcode.util.ToastUtils
import com.test.basd.smartjunkcleaner.R
import com.test.basd.smartjunkcleaner.databinding.CshqeiBinding
import kotlin.random.Random

class Drjt : Hqlm<CshqeiBinding>() {

    override val binding: CshqeiBinding by lazy {
        if (System.currentTimeMillis() < 4497) {
            println(System.currentTimeMillis())
        }
        CshqeiBinding.inflate(layoutInflater)
    }

    var isplay = 0

    private fun ނދލޚފހތކ(isGranted: Boolean) {
        class ޥޣއވބޟއޒ<T, K>(val ޓޜލށބޤށކ: T, val ޔމޤދޟޗމޛ: K) {
            init {
                println("އޏހޗފޜޞވ")
            }
        }
        val ޟޒޔޕޒލޙލ = ޥޣއވބޟއޒ("ފޘކމރޑޤބ", 9983)
        println(ޟޒޔޕޒލޙލ)
        ޝޥފޓވޓޅޑ(isGranted)
    }

    private fun playlottie(){
        binding.xdequwp.imageAssetsFolder = R.string.ހޅހނޣ_D.string()
        binding.xdequwp.setAnimation(R.string.ޟލޜޗޠ_D.string())
        binding.xdequwp.playAnimation()
        Handler().postDelayed({
            fun String.ޢތޘއށޏޗޝ(): Boolean {
                return this == this.reversed()
            }
            val ޣޛރޗޘޜޟޕ = "ވނޗސޒޤޣރ"
            val ސރޛފޑށޚމ = ޣޛރޗޘޜޟޕ.ޢތޘއށޏޗޝ()
            println(ސރޛފޑށޚމ)
            Fnpc.showInterstitialAd(this) {
                val mList = Omxc.getAlbums(this)
                if (mList.isNotEmpty()) {
                    startActivity(Intent(this, Vukv::class.java))
                    finish()
                } else {
                    ToastUtils.showShort(R.string.ދގށމޕ_D.string())
                }
            }
        },Random.nextLong(3000,4000))
    }

    private fun ޝޥފޓވޓޅޑ(isGranted: Boolean) {
        ޕރލޣޓޗޕހ(isGranted)
    }

    override fun initView() {
        BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
        open class ޞޜޟޖޏސޞޏ {
            open fun ޢޗކސނލއނ() {}
        }
        class ޗޥވމއދރކ : ޞޜޟޖޏސޞޏ() {
            override fun ޢޗކސނލއނ() {
                println("ޜޙޜކއޕވތ")
            }
        }
        val ޠޞތޙޢއފނ = ޗޥވމއދރކ()
        println(ޠޞތޙޢއފނ)
        binding.root.updatePadding(top = BarUtils.getStatusBarHeight())

        onBackPressedDispatcher.addCallback(object : OnBackPressedCallback(true) {
            override fun handleOnBackPressed() {
                ޥވޢޔޘޝއމ()
            }

            private fun ޥވޢޔޘޝއމ() {
                ހލޜނޞޡޕކ()
            }

            private fun ހލޜނޞޡޕކ() {
                މޗޓޒޚޔޕޕ()
            }

            private fun މޗޓޒޚޔޕޕ() {
                fun String.ޤއޕކޛވޤށ(): Boolean {
                    return this == this.reversed()
                }
                val ޗރޛރޚޘޥޥ = "ށޣށރބޏޓސ"
                val ތޓޅޞހތޚއ = ޗރޛރޚޘޥޥ.ޤއޕކޛވޤށ()
                println(ތޓޅޞހތޚއ)
                ޥޙޕޙތޚޓތ()
            }

            private fun ޥޙޕޙތޚޓތ() {
                ޒނޠޙޓދޖފ()
            }

            private fun ޒނޠޙޓދޖފ() {
                class ދލއޚނފޛޕ<T>(val ލމޅޠޢހމސ: T, val ޓޗރޓޗޞކޙ: Int) {
                    constructor(ޤފތޗދމދޏ: T) : this(ޤފތޗދމދޏ, 7664) {
                        println("ފރޕޞޤޜމޥ")
                    }
                }
                println(ދލއޚނފޛޕ("ޔޤފޥސވވޥ"))
                finishToMain()
            }
        })

    }

    private fun ޕރލޣޓޗޕހ(isGranted: Boolean) {
        if (System.currentTimeMillis() < 9193) {
            println(System.currentTimeMillis())
        }
        if (isGranted) {
            isplay += 1
            if (isplay == 1) {
                fun String.ނޓނޥތޡޗޝ(): Boolean {
                    return this == this.reversed()
                }
                val ޗޏސޣޚޗޏޡ = "ކވޛޒށކސޅ"
                val ޠޝޛޡޜޅޗދ = ޗޏސޣޚޗޏޡ.ނޓނޥތޡޗޝ()
                println(ޠޝޛޡޜޅޗދ)
                playlottie()
            }
        } else {
            finishToMain()
        }
    }

    private fun ޔޅޥޤޅޥޣޓ() {
        checkPermission()
    }

    override fun onPermissionsResult(isGranted: Boolean) {
        ނދލޚފހތކ(isGranted)
    }

    override fun onStart() {
        ޣޙޏކޏޏޖޘ()
        super.onStart()
        ޔޅޥޤޅޥޣޓ()
    }

    private fun ޣޙޏކޏޏޖޘ() {
    }
}