package com.wdkl.app.ncs.callingbed.fragment

import com.enation.javashop.net.engine.model.NetState
import com.wdkl.app.ncs.callingbed.R
import com.wdkl.app.ncs.callingbed.databinding.DoctorOrderViewBinding
import com.wdkl.app.ncs.callingbed.launch.CallingbedLaunch
import com.wdkl.ncs.android.lib.base.BaseFragment
import com.wdkl.ncs.android.lib.utils.debugLog
import com.wdkl.ncs.android.lib.utils.errorLog
import com.wdkl.ncs.android.lib.utils.showMessage
import com.wdkl.ncs.android.lib.vo.filter
import com.wdkl.ncs.android.middleware.logic.contract.callingbed.DoctorOrderFragmentContract
import com.wdkl.ncs.android.middleware.logic.presenter.callingbed.DoctorOrderFragmentPresenter

class DoctorOrderFragment: BaseFragment<DoctorOrderFragmentPresenter, DoctorOrderViewBinding>(), DoctorOrderFragmentContract.View{
    val TAG = "DoctorOrderFragment"

    override fun getLayId(): Int {
        return R.layout.doctor_order_view
    }

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

    override fun init() {
        //
    }

    override fun bindEvent() {
        debugLog(TAG,"bindEvent")
    }

    override fun destory() {
        debugLog(TAG,"destory")
    }

    override fun showData(data: ArrayList<Any>) {
        debugLog(TAG,"showData")
    }

    override fun onError(message: String, type: Int) {
        getUtils().dismissDialog()
        errorLog("error",message)
        showMessage(message)
    }

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

    override fun start() {
        getUtils().showDialog()
    }

    override fun networkMonitor(state: NetState) {
        state.filter(onWifi = {

        },onMobile = {

        },offline = {

        })
    }
}