export default (configuration, adapter) => {
  return `
package ${configuration.packageName}.adapters

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import ${configuration.packageName}.databinding.ItemNotificationBinding
import ${configuration.packageName}.extensions.loadImageFromUrl
import ${configuration.packageName}.extensions.show
import ${configuration.packageName}.model.${adapter.modelUppercase}Response


class ${adapter.nameUppercase}Adapter :
    RecyclerView.Adapter<${adapter.nameUppercase}Adapter.ViewHolder>() {

    private val list: ArrayList<${adapter.modelUppercase}Response.Data.${adapter.modelUppercase}> = ArrayList()

    inner class ViewHolder(val binding: ItemNotificationBinding) :
        RecyclerView.ViewHolder(binding.root)

    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
        val itemView =
            ItemNotificationBinding.inflate(LayoutInflater.from(parent.context), parent, false)
        return ViewHolder(itemView)
    }

    override fun getItemCount(): Int {
        return list.size
    }

    fun refresh(newList: ArrayList<${adapter.modelUppercase}Response.Data.${adapter.modelUppercase}>?) {
        list.clear()
        list.addAll(newList ?: ArrayList())
        notifyDataSetChanged()
    }
}
  `;
};
