package com.lukouguoji.aerologic.page.flight.query.details

import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.aerologic.R
import com.lukouguoji.aerologic.databinding.ActivityFlightQueryDetailsBinding

import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants

@Route(path = ARouterConstants.ACTIVITY_URL_FLIGHT_QUERY_DETAILS)
class FlightQueryDetailsActivity :
    BaseBindingActivity<ActivityFlightQueryDetailsBinding, FlightQueryDetailsViewModel>() {

    override fun layoutId() = R.layout.activity_flight_query_details

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

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

    companion object {
        @JvmStatic
        fun start(context: Context, fid: String) {
            val starter = Intent(context, FlightQueryDetailsActivity::class.java)
                .putExtra(Constant.Key.ID, fid)
            context.startActivity(starter)
        }
    }

}