package com.rc.core.ui.common

import android.content.Context
import androidx.fragment.app.FragmentManager
import androidx.recyclerview.widget.RecyclerView
import io.reactivex.disposables.Disposable

/**
 * info
 *
 * @author ReiChin_
 */
abstract class AbsUIDelegate {

    companion object {
        fun create() = UIDelegateImpl()
    }

    abstract fun showLoading(
        context: Context,
        message: String? = null,
        cancelable: Boolean = false
    )

    abstract fun dismissLoading()

    abstract fun showToast(context: Context?, message: String)

    abstract fun showNetError(context: Context?, throwable: Throwable)

    abstract fun addDisposable(disposable: Disposable)

    abstract fun clearDisposable()

    abstract fun createItemDecoration(context: Context?): RecyclerView.ItemDecoration?

}