package com.adealink.weparty.ui.category.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import com.adealink.weparty.commonui.recycleview.adapter.BindingViewHolder
import com.adealink.weparty.commonui.recycleview.adapter.multitype.ItemViewBinder
import com.adealink.weparty.databinding.LayoutCategoryTabTitleBinding
import com.adealink.weparty.ui.category.data.CategoryListTitleData

class CategoryTabTitleViewBinder :
    ItemViewBinder<CategoryListTitleData, BindingViewHolder<LayoutCategoryTabTitleBinding>>() {

    override fun onBindViewHolder(
        holder: BindingViewHolder<LayoutCategoryTabTitleBinding>,
        item: CategoryListTitleData,
    ) {
        holder.binding.tvTitle.text = item.data.name
    }

    override fun onCreateViewHolder(
        inflater: LayoutInflater,
        parent: ViewGroup,
    ): BindingViewHolder<LayoutCategoryTabTitleBinding> {
        return BindingViewHolder(LayoutCategoryTabTitleBinding.inflate(inflater, parent, false))
    }
}