package rowedto.jockeyedto.sheetedto.meadowedto.naturaledto.idealedto

import android.annotation.SuppressLint
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView.ViewHolder
import com.base.datarecovery.R
import com.base.datarecovery.databinding.TaxedtoBinding
import com.bumptech.glide.Glide
import rowedto.jockeyedto.sheetedto.balsamedto.formaledto.orientationedto.Ambitionedto.inflate
import rowedto.jockeyedto.sheetedto.raceedto.pavementedto.Dishedto

class Rightedto : RecyclerView.Adapter<Rightedto.FFF>() {

    private val beanList = arrayListOf<String>()
    private val TAG = "FileGridAdapter"

    inner class FFF(view: View) : ViewHolder(view)

    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): FFF {
        return FFF(R.layout.taxedto.inflate(parent))
    }

    override fun getItemCount(): Int {
        return beanList.size
    }

    override fun onBindViewHolder(holder: FFF, position: Int) {
        val binding = TaxedtoBinding.bind(holder.itemView)
        val context = holder.itemView.context
        val data = beanList[position]
        Dishedto.logDebug(TAG, data)
        Glide.with(context).load(data).centerCrop().into(binding.shiftedto)
    }

    @SuppressLint("NotifyDataSetChanged")
    fun setData(list: List<String>) {
        beanList.clear()
        beanList.addAll(list)
        notifyDataSetChanged()
    }
}