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.ActivityIntImpPickUpChargeEditBinding
import com.lukouguoji.gjj.viewModel.IntImpPickUpChargeEditViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.IntImpPickUpRecordBean
import com.lukouguoji.module_base.common.Constant

/**
 * 国际进港-费用修改
 */
class IntImpPickUpChargeEditActivity :
    BaseBindingActivity<ActivityIntImpPickUpChargeEditBinding, IntImpPickUpChargeEditViewModel>() {

    override fun layoutId() = R.layout.activity_int_imp_pick_up_charge_edit
    override fun viewModelClass() = IntImpPickUpChargeEditViewModel::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, IntImpPickUpChargeEditActivity::class.java)
                .putExtra(Constant.Key.DATA, Gson().toJson(bean))
            context.startActivity(starter)
        }
    }
}
