package com.lukouguoji.gjj.activity

import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntArrSupplementInfoBinding
import com.lukouguoji.gjj.viewModel.IntArrSupplementInfoViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.GjjImportManifest
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants

/**
 * 国际进港补充信息（收发货人信息）
 */
@Route(path = ARouterConstants.ACTIVITY_URL_INT_ARR_SUPPLEMENT_INFO)
class IntArrSupplementInfoActivity :
    BaseBindingActivity<ActivityIntArrSupplementInfoBinding, IntArrSupplementInfoViewModel>() {

    override fun layoutId() = R.layout.activity_int_arr_supplement_info
    override fun viewModelClass() = IntArrSupplementInfoViewModel::class.java

    override fun initOnCreate(savedInstanceState: Bundle?) {
        setBackArrow("收发货人信息")
        binding.viewModel = viewModel

        // 初始化数据
        viewModel.initOnCreated(intent)
    }

    companion object {
        @JvmStatic
        fun start(context: Context, manifestList: ArrayList<GjjImportManifest>) {
            val starter = Intent(context, IntArrSupplementInfoActivity::class.java)
                .putExtra(Constant.Key.DATA, manifestList)
            context.startActivity(starter)
        }
    }
}
