package com.dlc.laboratory.ui.guide

import android.view.LayoutInflater
import android.view.View
import com.bumptech.glide.Glide
import com.dlc.eboard.common.CommonUtils
import com.dlc.eboard.databinding.ActivityGuideBinding
import com.dlc.eboard.sp.DeviceSp
import com.dlc.eboard.ui.widget.TitleBar
import com.rc.core.ui.activity.RcBaseActivity

/**
 * 操作指南
 *
 * @author ReiChin_
 */
class GuideActivity : RcBaseActivity<ActivityGuideBinding>()/*,
    TitleBar.TitleListener*/ {

    override fun createViewBinding() = ActivityGuideBinding.inflate(LayoutInflater.from(this))

    override fun initListener() {
//        viewBinding.titleBar.setTitleListener(this)
    }

    override fun initData() {
        viewBinding.titleBar.setTitleInfoFromSp()

        val laboratoryVo = DeviceSp.loadLaboratoryVo(this)
        if (null == laboratoryVo) {
            showToast("暂无实验室信息，即将重新获取")
            CommonUtils.restartApp(this)
            return
        }
        Glide.with(this)
            .load(laboratoryVo.operationGuide)
            .into(viewBinding.guideImage)
    }

//    override fun onHomeViewClicked(view: View) {
//        finish()
//    }
//
//    override fun onBackViewClicked(view: View) {
//        finish()
//    }

}