package com.lukouguoji.gjc.activity

import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityGjcHandoverBinding
import com.lukouguoji.gjc.viewModel.GjcHandoverViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants

/**
 * 国际出港货物交接单页面
 */
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_HANDOVER)
class GjcHandoverActivity :
    BaseBindingActivity<ActivityGjcHandoverBinding, GjcHandoverViewModel>() {

    override fun layoutId() = R.layout.activity_gjc_handover

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

    override fun initOnCreate(savedInstanceState: Bundle?) {
        setBackArrow("国际出港货物交接单")

        binding.viewModel = viewModel

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

    companion object {
        @JvmStatic
        fun start(context: Context, maWbId: Long) {
            val starter = Intent(context, GjcHandoverActivity::class.java)
                .putExtra(Constant.Key.MAWB_ID, maWbId)
            context.startActivity(starter)
        }
    }
}
