package com.lukouguoji.gjj.activity

import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityGjjGoodsListBinding
import com.lukouguoji.gjj.holder.GjjGoodsListViewHolder
import com.lukouguoji.gjj.viewModel.GjjGoodsListViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.base.CommonAdapter
import com.lukouguoji.module_base.ktx.addOnItemClickListener
import com.lukouguoji.module_base.router.ARouterConstants

@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_GOODS)
class GjjGoodsListActivity :
    BaseBindingActivity<ActivityGjjGoodsListBinding, GjjGoodsListViewModel>() {

    override fun layoutId() = R.layout.activity_gjj_goods_list

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

    override fun initOnCreate(savedInstanceState: Bundle?) {
        setBackArrow("国际进港货物交接")
        binding.viewModel = viewModel

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

    override fun onResume() {
        super.onResume()
        viewModel.refresh()
    }

}