package com.adealink.weparty.country.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.country.data.CountryTitleItemData
import com.adealink.weparty.databinding.LayoutSelectCountryTitleBinding

class CountryTitleItemViewBinder() :
    ItemViewBinder<CountryTitleItemData, BindingViewHolder<LayoutSelectCountryTitleBinding>>() {
    override fun onCreateViewHolder(
        inflater: LayoutInflater,
        parent: ViewGroup
    ): BindingViewHolder<LayoutSelectCountryTitleBinding> {
        return BindingViewHolder(LayoutSelectCountryTitleBinding.inflate(inflater, parent, false))
    }

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

}