package com.lukouguoji.gjc.activity

import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityGjcWeighingWbDetailBinding
import com.lukouguoji.gjc.viewModel.GjcWeighingWbDetailViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.GjcWeighingRecordBean
import com.lukouguoji.module_base.common.Constant

/**
 * 国际出港计重-运单详情页（5.5寸手机版专属页面，平板端无对应页面）
 *
 * 由计重记录列表卡片的「查看详情」进入，只读展示运单基本信息，
 * 对应设计稿 documents/5.5寸手持端设计文件/03_出港计重/detail.html。
 */
class GjcWeighingWbDetailActivity :
    BaseBindingActivity<ActivityGjcWeighingWbDetailBinding, GjcWeighingWbDetailViewModel>() {

    override fun layoutId() = R.layout.activity_gjc_weighing_wb_detail

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

    override fun initOnCreate(savedInstanceState: Bundle?) {
        setBackArrow("运单详情")
        binding.viewModel = viewModel
        viewModel.initOnCreated(intent)
    }

    companion object {
        @JvmStatic
        fun start(context: Context, bean: GjcWeighingRecordBean) {
            val starter = Intent(context, GjcWeighingWbDetailActivity::class.java)
                .putExtra(Constant.Key.BEAN, bean)
            context.startActivity(starter)
        }
    }
}
