package com.yidianling.im.session.viewholder

import android.widget.TextView
import com.yidianling.im.R
import com.yidianling.im.session.extension.CustomAttachmentPatientCheckIn
import com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter
import com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase

/**
 * Created by Ykai on 2021/11/12.
 *
 * 患者报到ui
 */
class MsgViewHolderPatientCheckIn(adapter: BaseMultiItemFetchLoadAdapter<*, *>) :
    MsgViewHolderBase(adapter) {
    private lateinit var tvContent: TextView

    override fun getContentResId(): Int {
        return R.layout.im_nim_patient_check_in_layout
    }

    override fun inflateContentView() {
        tvContent = findViewById(R.id.tv_content)
    }

    override fun bindContentView() {
        val patientCheckInAttachment = message.attachment as CustomAttachmentPatientCheckIn
        tvContent.text = patientCheckInAttachment.userContent
    }

    override fun isShowHeadImage(): Boolean {
        return false
    }

    override fun isShowBubble(): Boolean {
        return false
    }

    override fun shouldDisplayReceipt(): Boolean {
        return false
    }

    override fun isMiddleItem(): Boolean {
        return true
    }

}