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.LayoutPlaymateDetailCommentLabelItemBinding
import com.adealink.weparty.playmate.detail.data.PlaymateCommentLabel

class PlaymateCommentLabelViewBinder :
    ItemViewBinder<PlaymateCommentLabel, BindingViewHolder<LayoutPlaymateDetailCommentLabelItemBinding>>() {

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

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

}