package com.easy.clean.ui.main

import com.easy.clean.R
import com.easy.clean.base.BaseFragment
import com.easy.clean.base.goToAc
import com.easy.clean.business.ads.AdsMgr
import com.easy.clean.databinding.FragmentRecoveryBinding
import com.easy.clean.ui.recovery.FileScanResultActivity
import com.easy.clean.ui.recovery.FileScanResultActivity.Companion.SCAN_AUDIOS
import com.easy.clean.ui.recovery.FileScanResultActivity.Companion.SCAN_DOCUMENTS
import com.easy.clean.ui.recovery.FileScanResultActivity.Companion.SCAN_PHOTOS
import com.easy.clean.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.llDocument.setOnClickListener {
            goToAc(FileScanResultActivity::class.java) {
                putExtra("ScanType", SCAN_AUDIOS)
            }
        }

    }
}