package com.grkj.iscs_mc.view.fragment

import com.grkj.iscs_mc.R
import com.grkj.iscs_mc.databinding.FragmentMaterialManualReplacementBinding
import com.grkj.iscs_mc.extentions.navigateUp
import com.grkj.iscs_mc.view.base.BaseMvpFragment
import com.grkj.iscs_mc.view.iview.IMaterialManualReplacementView
import com.grkj.iscs_mc.view.presenter.MaterialManualReplacementPresenter
import com.zhy.adapter.recyclerview.CommonAdapter
import com.zhy.adapter.recyclerview.base.ViewHolder

/**
 * 物资更换手动操作页
 */
class MaterialManualReplacementFragment :
    BaseMvpFragment<IMaterialManualReplacementView, MaterialManualReplacementPresenter, FragmentMaterialManualReplacementBinding>() {

    override val viewBinding: FragmentMaterialManualReplacementBinding
        get() = FragmentMaterialManualReplacementBinding.inflate(layoutInflater)

    override fun initView() {
        mBinding?.cbBack?.setOnClickListener { navigateUp() }

        mBinding?.rvReplacement?.adapter = object : CommonAdapter<String>(
            requireContext(),
            R.layout.item_rv_manual_replacement,
            mutableListOf()
        ) {
            override fun convert(holder: ViewHolder, t: String, position: Int) {

            }
        }
    }

    override fun initPresenter(): MaterialManualReplacementPresenter {
        return MaterialManualReplacementPresenter()
    }
}