package com.lukouguoji.gjc.fragment

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.databinding.DataBindingUtil
import androidx.fragment.app.Fragment
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.FragmentGjcQueryWaybillBinding
import com.lukouguoji.gjc.viewModel.GjcQueryDetailsViewModel

/**
 * 国际出港查询详情 - 运单信息Fragment
 */
class GjcQueryWaybillFragment : Fragment() {

    private lateinit var binding: FragmentGjcQueryWaybillBinding
    private lateinit var viewModel: GjcQueryDetailsViewModel

    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        binding = DataBindingUtil.inflate(
            inflater,
            R.layout.fragment_gjc_query_waybill,
            container,
            false
        )
        binding.lifecycleOwner = viewLifecycleOwner
        binding.viewModel = viewModel
        return binding.root
    }

    companion object {
        @JvmStatic
        fun newInstance(vm: GjcQueryDetailsViewModel) =
            GjcQueryWaybillFragment().apply {
                viewModel = vm
            }
    }
}
