package aicg.wipf.keyu.bzsb.ttlt

import aicg.wipf.Cyzi
import aicg.wipf.vzuj.Kmqp.setTrackedOnClickListener
import aicg.wipf.vzuj.Kmqp.string
import aicg.wipf.vzuj.Npaq
import aicg.wipf.vzuj.Opze
import android.app.Activity
import android.content.Intent
import android.net.Uri
import android.text.SpannableString
import android.text.Spanned
import android.text.style.UnderlineSpan
import androidx.core.view.isVisible
import com.test.basd.smartjunkcleaner.R
import com.test.basd.smartjunkcleaner.databinding.JeapxsBinding

class Mdte {

    private val binding: JeapxsBinding

    private val context: Activity

    private val listener: onUserPrivacyAggreementListener

    private fun ގޅއޛޖޜޔނ() {
        ނމޛޗހފޞގ()
    }

    interface onUserPrivacyAggreementListener {
        fun onAgreePrivacy()
    }

    private fun ނމޛޗހފޞގ() {
        val ޢޓލހޑޜޢޢ = { ޛޡޘވޑފވޝ: String -> println(ޛޡޘވޑފވޝ) }
        ޢޓލހޑޜޢޢ("ޙވވޢޚޑޒޜ!")
        ތޙށދޑޢނޢ()
    }

    private fun ތޙށދޑޢނޢ() {
        ޤޙޔޒޅޓޏޏ()
    }

    private fun ކބޠސނޚޢޓ() {
        ގޅއޛޖޜޔނ()
    }

    private fun initView() {
        ކބޠސނޚޢޓ()
    }

    constructor(binding: JeapxsBinding, context: Activity, listener: onUserPrivacyAggreementListener) {
        this.binding = binding
        this.context = context
        this.listener = listener
        initView()
    }

    private fun ޤޙޔޒޅޓޏޏ() {

        fun ޝޙބޟސހހޓ(ސރޕގޠޢއޙ: Int, މހޗމޢޜއސ: Int): Int {
            fun ޕސޞބމޛޗޘ(ގހޅބޟދވވ: Int, ޏޥޙޑޤޏޠޘ: Int): Int {
                return ގހޅބޟދވވ + ޏޥޙޑޤޏޠޘ
            }
            return ޕސޞބމޛޗޘ(ސރޕގޠޢއޙ, މހޗމޢޜއސ)
        }
        val ޟޝޘޓޔޓޕލ = ޝޙބޟސހހޓ(2674, 1643)
        println(ޟޝޘޓޔޓޕލ)
        val spannableString = SpannableString(R.string.ފޠބމޟ_D.string())
        val މނޅޛޜޑޢޠ = 5710..5710 + 10
        println(މނޅޛޜޑޢޠ.random())
        spannableString.setSpan(
            UnderlineSpan(), 0, spannableString.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
        )
        binding.czuftjy.text = spannableString

        binding.czuftjy.setTrackedOnClickListener {
            val ޣޥޘއޏޘޠއ = 8488
            val ފޘޡޤޖޟފޏ = 3810
            val ޛނޜޑޥރޑތ = ޣޥޘއޏޘޠއ * ފޘޡޤޖޟފޏ * ފޘޡޤޖޟފޏ
            println(ޛނޜޑޥރޑތ)
            val intent = Intent(
                Intent.ACTION_VIEW, Uri.parse(R.string.ޔސނލޜ_D.string())
            )
            context.startActivity(intent)
        }

        binding.inxxtys.setTrackedOnClickListener {
            binding.inxxtys.isVisible = false
            binding.motcvno.isVisible = true
            val ޥޒޏޑޔޔސޢ = 4273
            val ޔޚޞޚޓޞޟޛ = 3689
            val ޤފޗގގޕޑތ = ޥޒޏޑޔޔސޢ * ޔޚޞޚޓޞޟޛ * ޔޚޞޚޓޞޟޛ
            println(ޤފޗގގޕޑތ)
            binding.itarzfu.isVisible = false
            Npaq.ifAgreePrivacy = true
            class ޚޙތތޑސޑޗ {
                inner class ޤޓޜޥޓޕޑޞ {
                    fun ޜހޟޑގޟޏގ() {
                        println("ޥޔނޒޞލޠސ")
                    }
                }
            }
            val ޛދހޡބޟޟޔ = ޚޙތތޑސޑޗ().ޤޓޜޥޓޕޑޞ()
            ޛދހޡބޟޟޔ.ޜހޟޑގޟޏގ()
            (context.application as Cyzi).initApp()
            Opze.event(R.string.ދނޖޢއ_D.string())
            Opze.event(R.string.ޞޛޥޢރ_D.string((javaClass.simpleName).toString()))
            listener.onAgreePrivacy()
        }
    }
}