package com.khmer9.sbcmain.screen.main

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.gdtlib.lib.adapter.BaseListAdapter
import com.khmer9.sbcmain.R

class MainAdapter() : BaseListAdapter() {
    var printButtonListener: ((String, String, String, String, String, String) -> Unit)? = null
    var detailButtonListener: ((String, String) -> Unit)? = null

    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder =
        MainListViewHolder(
            LayoutInflater.from(parent.context).inflate(
                R.layout.item_table_holder,
                parent,
                false
            ), printButtonListener, detailButtonListener
        )
}