package pxds.etmo.lexn.ylyy

import android.app.Activity
import android.content.Intent
import com.test.basd.supercleanermax.R
import fsir.tqqe.Ausa
import pxds.apch.ldfl.lijc.Xxkn
import pxds.etmo.Ffhe
import pxds.etmo.Fjda
import pxds.etmo.Jmut
import pxds.etmo.Jmyh
import pxds.etmo.Mzvb
import pxds.etmo.Ngma
import pxds.etmo.Ousa
import pxds.etmo.Ozev
import pxds.etmo.Vryl
import pxds.lmmd.zmwf.Khko.string
import pxds.lmmd.zmwf.Uawv
import pxds.lmmd.zmwf.Wspd
import pxds.vazp.Uenj.Companion.ID_APP_MANAGER
import pxds.vazp.Uenj.Companion.ID_CHARGE
import pxds.vazp.Uenj.Companion.ID_CLEAN_NOTIFICATION
import pxds.vazp.Uenj.Companion.ID_INSTALL_PACKAGE_PUSH
import pxds.vazp.Uenj.Companion.ID_JUNK_CLEAN_PUSH
import pxds.vazp.Uenj.Companion.ID_LARGE_FILE_PUSH
import pxds.vazp.Uenj.Companion.ID_LOW_BATTERY_PUSH
import pxds.vazp.Uenj.Companion.ID_NETWORK_TRAFFIC
import pxds.vazp.Uenj.Companion.ID_PHOTO_COMPRESS
import pxds.vazp.Uenj.Companion.ID_RECENT_USE_APP
import pxds.vazp.Uenj.Companion.ID_SIMILAR_IMAGE
import pxds.vazp.Uenj.Companion.ID_UNINSTALL_PACKAGE_PUSH

object Rbpc {

    fun jumpNextPage(context: Activity) {

        var jumpType = context.intent.getIntExtra(R.string.ޥޚޅރޤ_D.string(), 0)

        if (jumpType == 0) {
            val uri = context.intent.data
            val str = (uri?.getQueryParameter(R.string.ޥޚޅރޤ_D.string()) ?: "0")
            jumpType = str.toIntOrNull() ?: 0
            if (jumpType != 0) {
                Wspd.event(R.string.ޣޏޔށދ_D.string(), R.string.ބލޘއޠ_D.string((jumpType).toString()))
            }
        }
        when (jumpType) {

            ID_JUNK_CLEAN_PUSH -> {
                context.startActivity(Intent(context, Vryl::class.java))
            }

            ID_LARGE_FILE_PUSH -> {
                context.startActivity(Intent(context, Ozev::class.java))
            }

            ID_PHOTO_COMPRESS -> {
                context.startActivity(Intent(context, Ausa::class.java))
            }

            ID_APP_MANAGER -> {
                context.startActivity(Intent(context, Jmyh::class.java))
            }

            ID_NETWORK_TRAFFIC -> {
                context.startActivity(Intent(context, Ffhe::class.java))
            }

            ID_CLEAN_NOTIFICATION -> {
                context.startActivity(Intent(context, Xxkn::class.java))
            }

            ID_RECENT_USE_APP -> {
                context.startActivity(Intent(context, Ngma::class.java))
            }

            ID_SIMILAR_IMAGE -> {
                context.startActivity(Intent(context, Fjda::class.java))
            }

            ID_INSTALL_PACKAGE_PUSH -> {
                context.startActivity(Intent(context, Vryl::class.java))
            }

            ID_UNINSTALL_PACKAGE_PUSH -> {
                context.startActivity(Intent(context, Vryl::class.java))
            }

            ID_CHARGE -> {
                context.startActivity(Intent(context, Jmut::class.java))
            }

            ID_LOW_BATTERY_PUSH -> {
                context.startActivity(Intent(context, Jmut::class.java))
            }

            else -> {
                val isHotLaunch = context.intent?.extras?.getBoolean(R.string.ދޢޘޏއ_D.string(), false) ?: false
                if (!isHotLaunch) {
                    if (!Uawv.ifGuest) {
                        Uawv.ifGuest = true
                        context.startActivity(Intent(context, Ousa::class.java))
                    } else {
                        context.startActivity(Intent(context, Mzvb::class.java))
                    }

                }
            }
        }
        context.finish()
    }
}