package com.adealink.weparty.playmate.detail.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.playmate.databinding.LayoutPlaymateDetailLabelItemBinding
import com.adealink.weparty.playmate.detail.data.PlaymateDetailLabel

class PlaymateLabelViewBinder :
    ItemViewBinder<PlaymateDetailLabel, BindingViewHolder<LayoutPlaymateDetailLabelItemBinding>>() {

    override fun onBindViewHolder(
        holder: BindingViewHolder<LayoutPlaymateDetailLabelItemBinding>,
        item: PlaymateDetailLabel,
    ) {
        holder.binding.root.text = item.label
    }

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

}