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.ActivityIntArrAirManifestDetailsBinding
import com.lukouguoji.gjj.viewModel.IntArrAirManifestDetailsViewModel
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_AIR_MANIFEST_DETAILS)
class IntArrAirManifestDetailsActivity :
    BaseBindingActivity<ActivityIntArrAirManifestDetailsBinding, IntArrAirManifestDetailsViewModel>() {

    override fun layoutId() = R.layout.activity_int_arr_air_manifest_details
    override fun viewModelClass() = IntArrAirManifestDetailsViewModel::class.java

    override fun initOnCreate(savedInstanceState: Bundle?) {
        setBackArrow("原始舱单详情")
        binding.viewModel = viewModel

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

    companion object {
        @JvmStatic
        fun start(context: Context, manifest: GjjImportManifest) {
            val starter = Intent(context, IntArrAirManifestDetailsActivity::class.java)
                .putExtra(Constant.Key.DATA, manifest)
            context.startActivity(starter)
        }
    }
}
