package com.dumpster.cleaner.ui.main

import com.dumpster.cleaner.R
import com.dumpster.cleaner.base.BaseFragment
import com.dumpster.cleaner.base.goToAc
import com.dumpster.cleaner.business.ads.AdsMgr
import com.dumpster.cleaner.databinding.FragmentRecoveryBinding
import com.dumpster.cleaner.ui.recovery.FileScanResultActivity
import com.dumpster.cleaner.ui.recovery.FileScanResultActivity.Companion.SCAN_AUDIOS
import com.dumpster.cleaner.ui.recovery.FileScanResultActivity.Companion.SCAN_DOCUMENTS
import com.dumpster.cleaner.ui.recovery.FileScanResultActivity.Companion.SCAN_PHOTOS
import com.dumpster.cleaner.ui.recovery.FileScanResultActivity.Companion.SCAN_VIDEOS

class RecoveryFragment : BaseFragment<FragmentRecoveryBinding>(FragmentRecoveryBinding::inflate) {


    override fun initView() {
        super.initView()
        AdsMgr.showNative(binding.flAd, R.layout.layout_admob_native_custom)
    }

    override fun initListener() {
        super.initListener()
        binding.llPhoto.setOnClickListener {
            goToAc(FileScanResultActivity::class.java) {
                putExtra("ScanType", SCAN_PHOTOS)
            }
        }
        binding.llVideo.setOnClickListener {
            goToAc(FileScanResultActivity::class.java) {
                putExtra("ScanType", SCAN_VIDEOS)
            }
        }
        binding.llDocument.setOnClickListener {
            goToAc(FileScanResultActivity::class.java) {
                putExtra("ScanType", SCAN_DOCUMENTS)
            }
        }
        binding.llAudio.setOnClickListener {
            goToAc(FileScanResultActivity::class.java) {
                putExtra("ScanType", SCAN_AUDIOS)
            }
        }

    }
}