package com.lukouguoji.gjc.activity

import android.content.Context
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityGjcUnLoadListBinding
import com.lukouguoji.gjc.viewModel.GjcUnLoadListViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.ktx.addOnItemClickListener
import com.lukouguoji.module_base.ktx.noNull

class GjcUnLoadListActivity :
    BaseBindingActivity<ActivityGjcUnLoadListBinding, GjcUnLoadListViewModel>() {

    override fun layoutId() = R.layout.activity_gjc_un_load_list

    override fun viewModelClass() = GjcUnLoadListViewModel::class.java

    override fun initOnCreate(savedInstanceState: Bundle?) {
        setBackArrow("国际出港待装信息")
        binding.viewModel = viewModel

        viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
        binding.rv.addOnItemClickListener(viewModel)

        viewModel.refresh()
    }

    companion object {
        @JvmStatic
        fun start(context: Context) {
            val starter = Intent(context, GjcUnLoadListActivity::class.java)
            context.startActivity(starter)
        }
    }
}