package aicg.wipf.rxxn

import aicg.wipf.vzuj.Kmqp.setTrackedOnClickListener
import aicg.wipf.vzuj.Kmqp.string
import android.view.Gravity
import android.view.ViewGroup
import android.widget.PopupWindow
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.updatePadding
import com.blankj.utilcode.util.BarUtils
import com.test.basd.smartjunkcleaner.R
import com.test.basd.smartjunkcleaner.databinding.PkdbapBinding

class Ewml(private val activity: AppCompatActivity, val onClick: () -> Unit) : PopupWindow() {

    private val binding by lazy {
        PkdbapBinding.inflate(activity.layoutInflater)
    }

    override fun dismiss() {
        ތޏޞޡޚބޚގ()
        super.dismiss()
        ހބޓޗޚޟސޙ()
    }

    private fun ޞޜތލދޓޓޅ() {
        contentView = binding.root
        activity.window.decorView.post {
            binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
            BarUtils.setStatusBarLightMode(activity, false)
            fun String.ޠޥޣޤޡޓޘފ(): Boolean {
                return this == this.reversed()
            }
            val ޝޗޒޣއޣޤޘ = "ޕށވބޜޤބޢ"
            val ޡބޑގޝވޟޡ = ޝޗޒޣއޣޤޘ.ޠޥޣޤޡޓޘފ()
            println(ޡބޑގޝވޟޡ)
            showAtLocation(activity.window.decorView, Gravity.BOTTOM, 0, 100)
        }
        binding.oqxafxb.imageAssetsFolder = R.string.ވޕޔޗޠ_D.string()
        abstract class ރށޕފޣދޠޅ {
            abstract fun ރޣސޛޝޑފޡ()
        }
        class ޙއޔޕގއހޜ : ރށޕފޣދޠޅ() {
            override fun ރޣސޛޝޑފޡ() {
                println("ލބޓޔގޝބޢ")
            }
        }
        val ޘޤތފމޝޑޝ = ޙއޔޕގއހޜ()
        ޘޤތފމޝޑޝ.ރޣސޛޝޑފޡ()
        binding.oqxafxb.setAnimation(R.string.ވޚޗދޅ_D.string())
        class ޕޢގޥޞކޤވ<T>(val ޗޕޅޖދޡވހ: T, val ޔޜލޜޓހފޗ: Int) {
            constructor(ރއއޒޟމޕޞ: T) : this(ރއއޒޟމޕޞ, 2267) {
                println("ޛޝޔޤޒލޑޥ")
            }
        }
        println(ޕޢގޥޞކޤވ("ޤރޏޣޓއޣތ"))
        binding.oqxafxb.playAnimation()
        binding.fqkclxx.setTrackedOnClickListener {
            dismiss()
            onClick.invoke()
        }
        binding.iomlbzh.setTrackedOnClickListener {
            dismiss()
            onClick.invoke()
        }

    }

    private fun ޘޡބޢތޟޒޥ() {
    }

    init {
        fun ވޠފޤޓޑއތ() {
            fun ށޘއޕށޙޒކ(ޅޡސފޚޝޚޜ: Int) {
                println(ޅޡސފޚޝޚޜ)
            }
            ށޘއޕށޙޒކ(4204)
            ށޘއޕށޙޒކ(9294)
            ށޘއޕށޙޒކ(3990)
        }
        ވޠފޤޓޑއތ()
        width = ViewGroup.LayoutParams.MATCH_PARENT
        height = ViewGroup.LayoutParams.MATCH_PARENT

        isOutsideTouchable = false
        isFocusable = true
        class ޘވޣޜޙޞޔގ<T, K>(val ޑޅގޑޗޣށޜ: T, val ކޣޠވޢޏށޖ: K) {
            init {
                println("ހޜށމލޡޝޘ")
            }
        }
        val ނޜޏޤނޏޞނ = ޘވޣޜޙޞޔގ("ސޜޅށތޚރނ", 8197)
        println(ނޜޏޤނޏޞނ)
        isClippingEnabled = false
    }

    private fun ޥޅމތޗއހޜ() {
        BarUtils.setStatusBarLightMode(activity, true)
    }

    private fun ހބޓޗޚޟސޙ() {
        ޥޅމތޗއހޜ()
    }

    private fun ލޒފރޕށޓޔ() {
        fun ޙޞޒޗޔބސޢ(ޣޕޡޤޠޝގގ: Int, ޥބޚތޥޘޤދ: Int): Int {
            fun ލޡޢޖޏސޝފ(ބޟވމށޘޙލ: Int, ރޒނޣޚޓރޤ: Int): Int {
                return ބޟވމށޘޙލ + ރޒނޣޚޓރޤ
            }
            return ލޡޢޖޏސޝފ(ޣޕޡޤޠޝގގ, ޥބޚތޥޘޤދ)
        }
        val ޣޢޟޤތޑޕޤ = ޙޞޒޗޔބސޢ(3855, 3444)
        println(ޣޢޟޤތޑޕޤ)
        ޞޜތލދޓޓޅ()
    }

    fun show() {
        ލޒފރޕށޓޔ()
    }

    private fun ތޏޞޡޚބޚގ() {
        ޘޡބޢތޟޒޥ()
    }
}