// Path: library/src/main/java/eu/inloop/viewmodel/IView.java
// public interface IView {
//     /**
//      * This method is used for Data Binding to bind correct layout and variable automatically
//      * Can return null value in case that Data Binding is not used.
//      *
//      * @return defined ViewModelBinding Config for a specific screen.
//      */
//     @Nullable
//     ViewModelBindingConfig getViewModelBindingConfig();
// 
//     /**
//      * Implement this method to remove the ViewModel associated with the Fragment or Activity.
//      * This is usually implemented by calling {@link ViewModelHelper#removeViewModel(Activity)},
//      * see {@link ViewModelBaseActivity#removeViewModel()} and {@link ViewModelBaseFragment#removeViewModel()}.
//      */
//     void removeViewModel();
// }


import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;
import android.util.Log;
import android.view.ViewGroup;
import eu.inloop.viewmodel.BuildConfig;
import eu.inloop.viewmodel.IView;
package eu.inloop.viewmodel.support;



/**
 * This class extends {@link FragmentStatePagerAdapter}. It removes the ViewModel once the
 * pager item is destroyed ({@link #destroyItem(ViewGroup, int, Object)}). The ViewModel state
 * is stored and then restored once you return back to this pager item and {@link #instantiateItem(ViewGroup, int)}
 * is called.
 */
public abstract class ViewModelStatePagerAdapter extends FragmentStatePagerAdapter {

    public ViewModelStatePagerAdapter(@NonNull final FragmentManager fm) {
        super(fm);
    }

    @Override
    public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
        super.destroyItem(container, position, object);
        final Fragment fragment = (Fragment) object;

// Path: library/src/main/java/eu/inloop/viewmodel/IView.java
// public interface IView {
//     /**
//      * This method is used for Data Binding to bind correct layout and variable automatically
//      * Can return null value in case that Data Binding is not used.
//      *
//      * @return defined ViewModelBinding Config for a specific screen.
//      */
//     @Nullable
//     ViewModelBindingConfig getViewModelBindingConfig();
// 
//     /**
//      * Implement this method to remove the ViewModel associated with the Fragment or Activity.
//      * This is usually implemented by calling {@link ViewModelHelper#removeViewModel(Activity)},
//      * see {@link ViewModelBaseActivity#removeViewModel()} and {@link ViewModelBaseFragment#removeViewModel()}.
//      */
//     void removeViewModel();
// }


// Path: library/src/main/java/eu/inloop/viewmodel/support/ViewModelStatePagerAdapter.java
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;
import android.util.Log;
import android.view.ViewGroup;
import eu.inloop.viewmodel.BuildConfig;
import eu.inloop.viewmodel.IView;

package eu.inloop.viewmodel.support;



/**
 * This class extends {@link FragmentStatePagerAdapter}. It removes the ViewModel once the
 * pager item is destroyed ({@link #destroyItem(ViewGroup, int, Object)}). The ViewModel state
 * is stored and then restored once you return back to this pager item and {@link #instantiateItem(ViewGroup, int)}
 * is called.
 */
public abstract class ViewModelStatePagerAdapter extends FragmentStatePagerAdapter {

    public ViewModelStatePagerAdapter(@NonNull final FragmentManager fm) {
        super(fm);
    }

    @Override
    public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
        super.destroyItem(container, position, object);
        final Fragment fragment = (Fragment) object;

        if (fragment instanceof IView) {