package foamyic

import androidx.activity.addCallback
import com.easy.clean.R
import tooic.fatalityic.jittersic.Reinstateic
import autonomyic.polemicalic.congestionic.Unwindic
import com.easy.clean.databinding.PlushicBinding

class Friskic : Reinstateic<PlushicBinding>(PlushicBinding::inflate) {

    override fun initView() {
        super.initView()

    }

    override fun initListener() {
        super.initListener()
        changeNative()
        binding.dragic.setOnClickListener {
            binding.insigniaic.isSelected = !binding.insigniaic.isSelected
            changeNative()
        }
        binding.agonizeic.setOnClickListener {
            binding.moistureic.isSelected = !binding.moistureic.isSelected
            changeNative()
        }

        binding.fixedic.setOnClickListener {
            binding.stairwayic.isSelected = !binding.stairwayic.isSelected
            changeNative()
        }

        binding.crimeic.setOnClickListener {
            binding.lifesaveric.isSelected = !binding.lifesaveric.isSelected
            changeNative()
        }

        onBackPressedDispatcher.addCallback {
            finishToMain()
        }

        binding.alleviateic.setOnClickListener {
            goToAc(Onlyic::class.java)
            finish()
        }
    }

    private fun changeNative() {
        Unwindic.showNative(binding.protectic, R.layout.explanatoryic)
    }
}