package com.zj365.health.act.binddevice

import android.view.View
import androidx.core.content.ContextCompat
import com.xty.common.event.BindDevEvent
import com.zj365.health.R
import com.zj365.health.vm.BindDeviceVm
import org.greenrobot.eventbus.EventBus

/**
 * 绑定体脂秤
 */
class BodyFatDeviceBindAct: BaseDeviceBindAct<BindDeviceVm>() {

    override fun initView() {
        super.initView()
        binding.title.mTvTitle.text="绑定体脂秤"
        binding.tvSnName.text="体脂秤SN号"
        binding.title.mTvRight.apply {
            text = "设备"
            setTextColor(ContextCompat.getColor(this@BodyFatDeviceBindAct, R.color.col_02c))
            setOnClickListener {

            }
        }

        binding.tvHintOne.visibility = View.GONE
        binding.tvHintTwo.visibility = View.VISIBLE
    }

    override fun liveObserver() {
        mViewModel.bindDev.observe(this){
            EventBus.getDefault().post(BindDevEvent())
        }
    }
}