package com.ux.video.file.filerecovery.documents

import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import com.ux.video.file.filerecovery.base.BaseAdapter
import com.ux.video.file.filerecovery.databinding.DocumentsScanResultAdapterBinding
import com.ux.video.file.filerecovery.photo.ResultPhotos

class DocumentsScanResultAdapter(mContext: Context) :
    BaseAdapter<ResultPhotos, DocumentsScanResultAdapterBinding>(mContext) {
    override fun getViewBinding(parent: ViewGroup): DocumentsScanResultAdapterBinding =
        DocumentsScanResultAdapterBinding.inflate(
            LayoutInflater.from(parent.context),
            parent,
            false
        )

    override fun bindItem(
        holder: VHolder<DocumentsScanResultAdapterBinding>,
        item: ResultPhotos
    ) {

        holder.vb.run {
            item.run {
                tvDirName.text = dirName
                tvFileCount.text = allFiles.size.toString()
            }

        }
    }
}