package com.lukouguoji.gjj.activity

import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.google.gson.Gson
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntImpPickUpRecordDetailsBinding
import com.lukouguoji.gjj.viewModel.IntImpPickUpRecordDetailsViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.IntImpPickUpRecordBean
import com.lukouguoji.module_base.common.Constant

/**
 * 国际进港-提取详情
 */
class IntImpPickUpRecordDetailsActivity :
    BaseBindingActivity<ActivityIntImpPickUpRecordDetailsBinding, IntImpPickUpRecordDetailsViewModel>() {

    override fun layoutId() = R.layout.activity_int_imp_pick_up_record_details
    override fun viewModelClass() = IntImpPickUpRecordDetailsViewModel::class.java

    override fun initOnCreate(savedInstanceState: Bundle?) {
        setBackArrow("国际进港提取详情")
        binding.viewModel = viewModel
        viewModel.initOnCreated(intent)
    }

    companion object {
        @JvmStatic
        fun start(context: Context, bean: IntImpPickUpRecordBean) {
            val starter = Intent(context, IntImpPickUpRecordDetailsActivity::class.java)
                .putExtra(Constant.Key.DATA, Gson().toJson(bean))
            context.startActivity(starter)
        }
    }
}
