package com.yidianling.im.session.viewholder

import android.widget.TextView
import androidx.constraintlayout.widget.ConstraintLayout
import com.yidianling.im.R
import com.yidianling.im.session.extension.CustomAttachmentPatientFullInfo
import com.yidianling.medical.archives.MedicalUpdateArchivesActivity
import com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter
import com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase

/**
 * 就诊人提示补充信息ui
 */
class MsgViewHolderPatientFullInfo(adapter: BaseMultiItemFetchLoadAdapter<*, *>?) : MsgViewHolderBase(adapter) {
    private lateinit var tvContent:TextView
    private lateinit var itemBean: CustomAttachmentPatientFullInfo

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

    override fun inflateContentView() {
        tvContent = findViewById(R.id.tv_content)
        tvContent.text = "根据相关政策，请完成实名认证，\n后续我将为您开具处方"
    }

    override fun bindContentView() {
        itemBean = message.attachment as CustomAttachmentPatientFullInfo
        hideItemBg()
        setAvatarRightInVisibity()
    }

    override fun onItemClick() {
        MedicalUpdateArchivesActivity.start(context,itemBean.fromPatientId,message.sessionId)
    }
}