package com.hongyegroup.cpt_parttime.adapter

import android.view.View
import com.chad.library.adapter.base.entity.node.BaseNode
import com.chad.library.adapter.base.provider.BaseNodeProvider
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.hongyegroup.cpt_parttime.R
import com.hongyegroup.cpt_parttime.bean.PartDetailAnswer

internal class AnswerNodeProvider : BaseNodeProvider() {
    override val itemViewType: Int = 1

    override val layoutId: Int = R.layout.item_part_detail_qa_a

    override fun convert(helper: BaseViewHolder, data: BaseNode) {
        // 数据类型需要自己强转
        val answer = data as PartDetailAnswer
        helper.setText(R.id.tv_detail_qa_a, answer.answer)
    }

    override fun onClick(helper: BaseViewHolder, view: View, data: BaseNode, position: Int) {
    }
}