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.ActivityIntImpLoadingListEditBinding
import com.lukouguoji.gjj.viewModel.IntImpLoadingListEditViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.GjjManifest
import com.lukouguoji.module_base.common.Constant

/**
 * 国际进港-装机单编辑页面
 */
class IntImpLoadingListEditActivity :
    BaseBindingActivity<ActivityIntImpLoadingListEditBinding, IntImpLoadingListEditViewModel>() {

    override fun layoutId() = R.layout.activity_int_imp_loading_list_edit
    override fun viewModelClass() = IntImpLoadingListEditViewModel::class.java

    override fun initOnCreate(savedInstanceState: Bundle?) {
        setBackArrow("装机单编辑")
        binding.viewModel = viewModel
        viewModel.initOnCreated(intent)
    }

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