package com.quansu.heifengwuliu.fragment

import android.view.LayoutInflater
import android.view.ViewGroup
import com.quansu.heifengwuliu.adapter.BillAdapter
import com.quansu.heifengwuliu.base.MBRFragment
import com.quansu.heifengwuliu.databinding.FragmentAccountBillBinding
import com.quansu.heifengwuliu.utils.net.NetEngine
import com.ysnows.base.base.BRRepository
import com.ysnows.base.base.BRViewModel
import com.ysnows.base.net.IResponse
import io.reactivex.Observable

class AccountBillFragment : MBRFragment<BRViewModel<BRRepository>, BillAdapter, FragmentAccountBillBinding>() {

    override fun initAdapter(): BillAdapter {
        return BillAdapter()
    }

    override fun api(): Observable<out IResponse<*>> {
        return NetEngine.service.taskList("", vm?.repository()?.autoPage()!!)
    }

    override fun binding(inflater: LayoutInflater, container: ViewGroup?): FragmentAccountBillBinding {
        return FragmentAccountBillBinding.inflate(layoutInflater, container, false)
    }

    override fun title(): String? {
        return null
    }
}