package aicg.wipf.rxxn

import aicg.wipf.vzuj.Kmqp.setTrackedOnClickListener
import aicg.wipf.vzuj.Kmqp.string
import android.content.Context
import android.text.SpannableString
import android.text.Spanned
import android.text.style.ForegroundColorSpan
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.appcompat.app.AlertDialog
import androidx.core.content.ContextCompat
import com.test.basd.smartjunkcleaner.R
import com.test.basd.smartjunkcleaner.databinding.ClvzdfBinding

object Xbey {

    private fun Context.ނދރޖތޗޒވ(click: () -> Unit) {
        val binding = ClvzdfBinding.inflate(LayoutInflater.from(this))
        val dialog = AlertDialog.Builder(this).setView(binding.root).create()

        class ޏހޘޟށޤޖޘ {
            inner class ޖޏޓޕޏފހޗ {
                fun ޗކޗލރތކޏ() {
                    println("ޥއޛޚލޢހގ")
                }
            }
        }
        val ސޣޚޜޏޞބޑ = ޏހޘޟށޤޖޘ().ޖޏޓޕޏފހޗ()
        ސޣޚޜޏޞބޑ.ޗކޗލރތކޏ()
        dialog.setContentView(binding.root)
        fun ޔޥޖހވޤޞޑ(އޛފއޕޤޛޅ: Int, ޜޜޤތފޓޒޔ: Int): Int {
            fun ޙކއޝއޟގޜ(ޖގޝޝލއޑޖ: Int, ޚދލޢޒޓޒޠ: Int): Int {
                return ޖގޝޝލއޑޖ + ޚދލޢޒޓޒޠ
            }
            return ޙކއޝއޟގޜ(އޛފއޕޤޛޅ, ޜޜޤތފޓޒޔ)
        }
        val ތރރބޣދޕގ = ޔޥޖހވޤޞޑ(7948, 1053)
        println(ތރރބޣދޕގ)
        dialog.setCanceledOnTouchOutside(true)
        dialog.show()

        fun ޤމޑދދނށޛ(ޤނޏޞޓހގށ: String) {
            println("tag, $ޤނޏޞޓހގށ!")
        }
        ޤމޑދދނށޛ("ޚޣޏޛހމޢތ")
        val lp = dialog.window?.attributes
        lp?.width = this.resources.getDimensionPixelOffset(R.dimen.ޓގޛތޏ)
        lp?.height = ViewGroup.LayoutParams.WRAP_CONTENT
        class ޤވޅޡޞޅޕޔ {
            fun ޜއޠމފބމހ() {
                println("ޑފގޤވޙޝޓ")
            }
        }
        ޤވޅޡޞޅޕޔ().ޜއޠމފބމހ()
        dialog.window?.attributes = lp
        dialog.window?.setBackgroundDrawableResource(android.R.color.transparent)

        val text = R.string.ޑށށޖޙ_D.string()
        val spannableString = SpannableString(text)
        class ރޅޓކމކޚޥ {
            inner class ހޤޕޒޅޙޚޑ {
                fun ޠޥޗޏރޞޏފ() {
                    println("ޙޅޒޞޑށޢޞ")
                }
            }
        }
        val ޥލޛޘގޡޥޖ = ރޅޓކމކޚޥ().ހޤޕޒޅޙޚޑ()
        ޥލޛޘގޡޥޖ.ޠޥޗޏރޞޏފ()
        val start = text.indexOf(R.string.އއޅފޕ_D.string())
        if (start != -1) {
            val end = start + R.string.ޜޔޏޚހ_D.string().length
            class ބލޖޞޛމޅޖ<T, K>(val ކޗރގޣޟބޒ: T, val ޕކސދއޒޤލ: K) {
                init {
                    println("ޘޞނޛފގޝރ")
                }
            }
            val ސޢރޜޠކތޞ = ބލޖޞޛމޅޖ("ޚފޅޒޜޒޞޠ", 2867)
            println(ސޢރޜޠކތޞ)
            val colorSpan = ForegroundColorSpan(ContextCompat.getColor(this, R.color.ގނޢލބ))
            spannableString.setSpan(colorSpan, start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
        }

        binding.evddava.text = spannableString
        binding.zrlichi.setTrackedOnClickListener {
            fun ޔޠޑޕތޥޖޒ(ބދޏރޛދޞލ: Int, ޔޒށވނޗވޕ: Int): Int {
                fun ޟޑހކޙޏޢޖ(ފޚޤޜޅޟޤޣ: Int, ޘށޠޒލޝޢޒ: Int): Int {
                    return ފޚޤޜޅޟޤޣ + ޘށޠޒލޝޢޒ
                }
                return ޟޑހކޙޏޢޖ(ބދޏރޛދޞލ, ޔޒށވނޗވޕ)
            }
            val ޥކޔސކށދޣ = ޔޠޑޕތޥޖޒ(969, 5414)
            println(ޥކޔސކށދޣ)
            dialog.dismiss()
            click.invoke()
        }
        val ޖޒޕކޔޛޘނ = 7645..7645 + 10
        println(ޖޒޕކޔޛޘނ.random())
        binding.uekzwps.setTrackedOnClickListener {
            dialog.dismiss()
        }
    }

    fun Context.showFileDeleteDialog(click: () -> Unit) {
        if (System.currentTimeMillis() < 57) {
            println(System.currentTimeMillis())
        }
        ނދރޖތޗޒވ(click)
    }
}