package com.lukouguoji.gjc.activity

import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityIntExpArriveSupplementBinding
import com.lukouguoji.gjc.viewModel.IntExpArriveSupplementViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.GjcHaWb
import com.lukouguoji.module_base.common.Constant

/**
 * 国际出港运抵-补充信息页（5.5寸手机版专属新页，平板端无对应页面）
 *
 * 参照 Pad 端国际进港「收发货人信息」补充页的批量应用模式：对该运单整个 haWbList 批量应用
 * 同一份收发货人表单。后端暂无保存接口，见 IntExpArriveSupplementViewModel 顶部注释。
 * 对应设计稿 documents/5.5寸手持端设计文件/04_出港运抵/supplement.html。
 */
class IntExpArriveSupplementActivity :
    BaseBindingActivity<ActivityIntExpArriveSupplementBinding, IntExpArriveSupplementViewModel>() {

    override fun layoutId() = R.layout.activity_int_exp_arrive_supplement
    override fun viewModelClass() = IntExpArriveSupplementViewModel::class.java

    override fun initOnCreate(savedInstanceState: Bundle?) {
        setBackArrow("补充信息")
        binding.viewModel = viewModel
        viewModel.initOnCreated(intent)
    }

    companion object {
        @JvmStatic
        fun start(context: Context, wbNo: String, haWbList: ArrayList<GjcHaWb>) {
            val starter = Intent(context, IntExpArriveSupplementActivity::class.java)
                .putExtra(Constant.Key.CODE, wbNo)
                .putExtra(Constant.Key.DATA, haWbList)
            context.startActivity(starter)
        }
    }
}
