//package com.base.appzxhy.ui.recyclebin
//
//import androidx.core.view.isVisible
//import androidx.lifecycle.lifecycleScope
//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.FragmentRecycleBinBinding
//import com.base.appzxhy.ui.main.MainActivity
//import kotlinx.coroutines.flow.collectLatest
//import kotlinx.coroutines.launch
//
//class RecycleBinFragment : BaseFragment<FragmentRecycleBinBinding>(FragmentRecycleBinBinding::inflate) {
//
//    private val adapter = RecycleBinAdapter()
//    override fun initView() {
//        super.initView()
//        AdsMgr.showNative(binding.flAd, R.layout.layout_admob_native_custom)
//        binding.rv.adapter = adapter
//
//        lifecycleScope.launch {
//            (requireActivity() as MainActivity).viewModel.recycleBinFileFlow.collectLatest {
//                binding.llEmpty.isVisible = it.isEmpty()
//                adapter.submitList(it)
//            }
//        }
//    }
//
//    override fun initListener() {
//        super.initListener()
//        adapter.clickAction = {
//            RecycleBinDetailActivity.recycleBinFile = it
//            goToAc(RecycleBinDetailActivity::class.java)
//        }
//    }
//
//}