package com.base.appzxhy.ui.main

import com.base.appzxhy.R
import com.base.appzxhy.base.BaseFragment
import com.base.appzxhy.base.goToAc
import com.base.appzxhy.business.ads.AdsMgr
import com.base.appzxhy.databinding.FragmentRecoveryBinding
import com.base.appzxhy.ui.recovery.FileScanResultActivity
import com.base.appzxhy.ui.recovery.FileScanResultActivity.Companion.SCAN_AUDIOS
import com.base.appzxhy.ui.recovery.FileScanResultActivity.Companion.SCAN_DOCUMENTS
import com.base.appzxhy.ui.recovery.FileScanResultActivity.Companion.SCAN_PHOTOS
import com.base.appzxhy.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)
            }
        }

    }
}