package com.casic.br.view

import com.casic.br.R
import com.casic.br.extensions.initLayoutImmersionBar
import com.gyf.immersionbar.ImmersionBar
import com.pengxh.kt.lite.base.KotlinBaseActivity
import com.pengxh.kt.lite.extensions.navigatePageTo
import kotlinx.android.synthetic.main.activity_add_device.*
import kotlinx.android.synthetic.main.include_left_back_title.*

class AddDeviceActivity : KotlinBaseActivity() {


    override fun initLayoutView(): Int = R.layout.activity_add_device

    override fun observeRequestState() {

    }

    override fun setupTopBarLayout() {
        ImmersionBar.with(this).statusBarDarkFont(true).init()
        initLayoutImmersionBar(rootView)
        leftBackView.setOnClickListener { finish() }
        titleView.text = "添加设备"
    }

    override fun initData() {

    }

    override fun initEvent() {
        iotDevice.setOnClickListener {
            //IoT设备首先需要先配置网络
            navigatePageTo<SelectWiFiActivity>()
        }

        notIotDevice.setOnClickListener {
            navigatePageTo<AddNoIotDeviceActivity>()
        }
    }
}