package com.seatel.mobilehall.ui.home.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import com.seatel.mobilehall.R
import com.seatel.mobilehall.ui.base.adapter.BaseRecyclerAdapter
import com.seatel.mobilehall.ui.home.model.PlanSubscriptionModel
import com.seatel.mobilehall.ui.home.viewholder.BaseViewHolder
import com.seatel.mobilehall.ui.home.viewholder.PlanSubscriptionViewHolder

/**
 *
 *
 * @author Noel
 * @version
 * @created on 17-Oct-18
 */
class PlanSubscriptionAdapter(mData: List<PlanSubscriptionModel>) :
    BaseRecyclerAdapter<PlanSubscriptionModel>(mData) {

    override fun onCreateViewHolder(
        parent: ViewGroup,
        viewType: Int
    ): BaseViewHolder<PlanSubscriptionModel> {
        return PlanSubscriptionViewHolder(
            LayoutInflater.from(parent.context)
                .inflate(R.layout.layout_plan_subscription_item, parent, false)
        )
    }

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