package com.wdkl.ncs.android.component.hello.activity

import android.app.Activity
import android.graphics.Color
import android.os.Bundle
import com.enation.javashop.android.jrouter.external.annotation.Router
import com.enation.javashop.net.engine.model.NetState
import com.wdkl.ncs.android.component.hello.R
import com.wdkl.ncs.android.component.hello.databinding.HelloActLayBinding
import com.wdkl.ncs.android.component.hello.launch.HelloLaunch
import com.wdkl.ncs.android.lib.base.BaseActivity
import com.wdkl.ncs.android.lib.base.BaseContract
import com.wdkl.ncs.android.lib.utils.AppTool
import com.wdkl.ncs.android.middleware.logic.contract.hello.HelloActivityContract
import com.wdkl.ncs.android.middleware.logic.presenter.hello.HelloActivityPresenter
import com.wdkl.ncs.android.middleware.model.ChildCategoryShell
import kotlinx.android.synthetic.main.hello_act_lay.*

@Router(path = "/hello/main")
class HelloActivity : BaseActivity<HelloActivityPresenter, HelloActLayBinding>(), HelloActivityContract.View {
    override fun getLayId(): Int {
        return R.layout.hello_act_lay
    }

    override fun bindDagger() {
        HelloLaunch.component.inject(this)
    }

    override fun init() {
        AppTool.SystemUI.showNavigationBar(this,false)
        AppTool.SystemUI.ImmersiveWithBottomBarColor(this, Color.BLACK)
        presenter.loadData(0)
    }

    override fun bindEvent() {
    }

    override fun destory() {
    }

    override fun onError(message: String, type: Int) {
    }

    override fun complete(message: String, type: Int) {
    }

    override fun start() {
    }

    override fun networkMonitor(state: NetState) {
    }

    override fun showData(categoryList: ArrayList<ChildCategoryShell>) {
        hello_api_data.setText(categoryList[0].toString())
    }
}
