package com.khmer9.yuki.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.gdtlib.lib.adapter.BaseListAdapter
import com.khmer9.yuki.R
import com.khmer9.yuki.screen.main.MainModuleViewHolder

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

    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
        return MainModuleViewHolder(
            LayoutInflater.from(parent.context).inflate(
                R.layout.layout_main_module,
                parent,
                false
            ), detailButtonListener
        )
    }
}