package com.lukouguoji.hangban.page.query.list

import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.hangban.R
import com.lukouguoji.hangban.databinding.ActivityHbQueryListBinding
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.ktx.addOnItemClickListener
import com.lukouguoji.module_base.ktx.getLifecycleOwner
import com.lukouguoji.module_base.router.ARouterConstants

@Route(path = ARouterConstants.ACTIVITY_URL_HB_QUERY_LIST)
class HbQueryListActivity :
    BaseBindingActivity<ActivityHbQueryListBinding, HbQueryListViewModel>() {

    override fun layoutId() = R.layout.activity_hb_query_list

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

    override fun initOnCreate(savedInstanceState: Bundle?) {
        setBackArrow("航班管理")

        binding.viewModel = viewModel
        viewModel.pageModel
            .bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, getLifecycleOwner())

        binding.rv.addOnItemClickListener(viewModel)

        viewModel.refresh()
    }

}
