// Path: app/src/main/java/com/tassioauad/gamecheck/model/api/PlatformApi.java
// public interface PlatformApi extends AsyncService {
// 
//     void searchLasts(Integer count);
// 
//     void searchByName(String name);
// 
// }
// 
// Path: app/src/main/java/com/tassioauad/gamecheck/presenter/LastsPlatformPresenter.java
// public class LastsPlatformPresenter {
// 
//     private LastsPlatformView view;
//     private PlatformApi platformApi;
//     private final int NUMBER_OF_PLATFORMS = 20;
// 
//     public LastsPlatformPresenter(LastsPlatformView view, PlatformApi platformApi) {
//         this.view = view;
//         this.platformApi = platformApi;
//     }
// 
//     public void loadLastsPlatforms() {
//         view.showLoading();
//         platformApi.setServiceResultListener(new ApiResultListener() {
//             @Override
//             public void onResult(Object object) {
//                 view.showPlatforms((List<Platform>) object);
//                 view.dismissLoading();
//             }
// 
//             @Override
//             public void onException(Exception exception) {
//                 view.dismissLoading();
//                 view.warnCouldNotLoadPlatforms();
//             }
//         });
// 
//         platformApi.searchLasts(NUMBER_OF_PLATFORMS);
//     }
// }
// 
// Path: app/src/main/java/com/tassioauad/gamecheck/view/LastsPlatformView.java
// public interface LastsPlatformView {
//     void showLoading();
// 
//     void showPlatforms(List<Platform> platformList);
// 
//     void dismissLoading();
// 
//     void warnCouldNotLoadPlatforms();
// }
// 
// Path: app/src/main/java/com/tassioauad/gamecheck/view/fragment/LastsPlatformFragment.java
// public class LastsPlatformFragment extends Fragment implements LastsPlatformView {
// 
//     @Inject
//     LastsPlatformPresenter presenter;
// 
//     @Bind(R.id.recyclerview_platforms)
//     RecyclerView recyclerViewPlatforms;
//     @Bind(R.id.progressbar)
//     ProgressBar progressBar;
//     @Bind(R.id.textview_failuredtolistplatform)
//     TextView textViewFailuredToListPlatform;
//     @Bind(R.id.floatingactionbutton_search)
//     FloatingActionButton floatingActionButtonSearch;
// 
//     private List<Platform> platformList;
//     private final String BUNDLE_KEY_PLATFORMLIST = "bundle_key_platformlist";
//     private final int NUMBER_OF_COLUMNS = 2;
// 
//     @Nullable
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
//         View view = inflater.inflate(R.layout.fragment_lastsplatform, container, false);
//         ButterKnife.bind(this, view);
//         ((GameCatalogApplication) getActivity().getApplication()).getObjectGraph().plus(new LastsPlatformViewModule(this)).inject(this);
// 
//         textViewFailuredToListPlatform.setOnClickListener(new View.OnClickListener() {
//             @Override
//             public void onClick(View v) {
//                 presenter.loadLastsPlatforms();
//             }
//         });
// 
//         floatingActionButtonSearch.setOnClickListener(new View.OnClickListener() {
//             @Override
//             public void onClick(View v) {
//                 startActivity(SearchPlatformActivity.newInstance(getActivity()));
//             }
//         });
// 
//         if(savedInstanceState != null && savedInstanceState.getParcelableArrayList(BUNDLE_KEY_PLATFORMLIST) != null) {
//             platformList = savedInstanceState.getParcelableArrayList(BUNDLE_KEY_PLATFORMLIST);
//             showPlatforms(platformList);
//         } else {
//             presenter.loadLastsPlatforms();
//         }
// 
//         return view;
//     }
// 
//     @Override
//     public void onSaveInstanceState(Bundle outState) {
//         if(platformList != null) {
//             outState.putParcelableArrayList(BUNDLE_KEY_PLATFORMLIST, new ArrayList<Platform>(platformList));
//         }
//         super.onSaveInstanceState(outState);
//     }
// 
//     @Override
//     public void showLoading() {
//         progressBar.setVisibility(View.VISIBLE);
//         recyclerViewPlatforms.setVisibility(View.GONE);
//         textViewFailuredToListPlatform.setVisibility(View.GONE);
//     }
// 
//     @Override
//     public void showPlatforms(List<Platform> platformList) {
//         this.platformList = platformList;
//         textViewFailuredToListPlatform.setVisibility(View.GONE);
//         recyclerViewPlatforms.setVisibility(View.VISIBLE);
//         recyclerViewPlatforms.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));
//         recyclerViewPlatforms.setAdapter(new PlatformListAdapter(platformList, new OnItemClickListener<Platform>() {
//             @Override
//             public void onClick(Platform platform) {
//                 startActivity(PlatformActivity.newInstance(getActivity(), platform));
//             }
//         }));
//         recyclerViewPlatforms.setItemAnimator(new DefaultItemAnimator());
//     }
// 
//     @Override
//     public void dismissLoading() {
//         progressBar.setVisibility(View.GONE);
//     }
// 
//     @Override
//     public void warnCouldNotLoadPlatforms() {
//         recyclerViewPlatforms.setVisibility(View.GONE);
//         textViewFailuredToListPlatform.setVisibility(View.VISIBLE);
//     }
// }


import com.tassioauad.gamecheck.model.api.PlatformApi;
import com.tassioauad.gamecheck.presenter.LastsPlatformPresenter;
import com.tassioauad.gamecheck.view.LastsPlatformView;
import com.tassioauad.gamecheck.view.fragment.LastsPlatformFragment;
import dagger.Module;
import dagger.Provides;
package com.tassioauad.gamecheck.dagger;



@Module(includes = ApiModule.class, injects = LastsPlatformFragment.class, library = true)
public class LastsPlatformViewModule {

    private LastsPlatformView view;

// Path: app/src/main/java/com/tassioauad/gamecheck/model/api/PlatformApi.java
// public interface PlatformApi extends AsyncService {
// 
//     void searchLasts(Integer count);
// 
//     void searchByName(String name);
// 
// }
// 
// Path: app/src/main/java/com/tassioauad/gamecheck/presenter/LastsPlatformPresenter.java
// public class LastsPlatformPresenter {
// 
//     private LastsPlatformView view;
//     private PlatformApi platformApi;
//     private final int NUMBER_OF_PLATFORMS = 20;
// 
//     public LastsPlatformPresenter(LastsPlatformView view, PlatformApi platformApi) {
//         this.view = view;
//         this.platformApi = platformApi;
//     }
// 
//     public void loadLastsPlatforms() {
//         view.showLoading();
//         platformApi.setServiceResultListener(new ApiResultListener() {
//             @Override
//             public void onResult(Object object) {
//                 view.showPlatforms((List<Platform>) object);
//                 view.dismissLoading();
//             }
// 
//             @Override
//             public void onException(Exception exception) {
//                 view.dismissLoading();
//                 view.warnCouldNotLoadPlatforms();
//             }
//         });
// 
//         platformApi.searchLasts(NUMBER_OF_PLATFORMS);
//     }
// }
// 
// Path: app/src/main/java/com/tassioauad/gamecheck/view/LastsPlatformView.java
// public interface LastsPlatformView {
//     void showLoading();
// 
//     void showPlatforms(List<Platform> platformList);
// 
//     void dismissLoading();
// 
//     void warnCouldNotLoadPlatforms();
// }
// 
// Path: app/src/main/java/com/tassioauad/gamecheck/view/fragment/LastsPlatformFragment.java
// public class LastsPlatformFragment extends Fragment implements LastsPlatformView {
// 
//     @Inject
//     LastsPlatformPresenter presenter;
// 
//     @Bind(R.id.recyclerview_platforms)
//     RecyclerView recyclerViewPlatforms;
//     @Bind(R.id.progressbar)
//     ProgressBar progressBar;
//     @Bind(R.id.textview_failuredtolistplatform)
//     TextView textViewFailuredToListPlatform;
//     @Bind(R.id.floatingactionbutton_search)
//     FloatingActionButton floatingActionButtonSearch;
// 
//     private List<Platform> platformList;
//     private final String BUNDLE_KEY_PLATFORMLIST = "bundle_key_platformlist";
//     private final int NUMBER_OF_COLUMNS = 2;
// 
//     @Nullable
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
//         View view = inflater.inflate(R.layout.fragment_lastsplatform, container, false);
//         ButterKnife.bind(this, view);
//         ((GameCatalogApplication) getActivity().getApplication()).getObjectGraph().plus(new LastsPlatformViewModule(this)).inject(this);
// 
//         textViewFailuredToListPlatform.setOnClickListener(new View.OnClickListener() {
//             @Override
//             public void onClick(View v) {
//                 presenter.loadLastsPlatforms();
//             }
//         });
// 
//         floatingActionButtonSearch.setOnClickListener(new View.OnClickListener() {
//             @Override
//             public void onClick(View v) {
//                 startActivity(SearchPlatformActivity.newInstance(getActivity()));
//             }
//         });
// 
//         if(savedInstanceState != null && savedInstanceState.getParcelableArrayList(BUNDLE_KEY_PLATFORMLIST) != null) {
//             platformList = savedInstanceState.getParcelableArrayList(BUNDLE_KEY_PLATFORMLIST);
//             showPlatforms(platformList);
//         } else {
//             presenter.loadLastsPlatforms();
//         }
// 
//         return view;
//     }
// 
//     @Override
//     public void onSaveInstanceState(Bundle outState) {
//         if(platformList != null) {
//             outState.putParcelableArrayList(BUNDLE_KEY_PLATFORMLIST, new ArrayList<Platform>(platformList));
//         }
//         super.onSaveInstanceState(outState);
//     }
// 
//     @Override
//     public void showLoading() {
//         progressBar.setVisibility(View.VISIBLE);
//         recyclerViewPlatforms.setVisibility(View.GONE);
//         textViewFailuredToListPlatform.setVisibility(View.GONE);
//     }
// 
//     @Override
//     public void showPlatforms(List<Platform> platformList) {
//         this.platformList = platformList;
//         textViewFailuredToListPlatform.setVisibility(View.GONE);
//         recyclerViewPlatforms.setVisibility(View.VISIBLE);
//         recyclerViewPlatforms.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));
//         recyclerViewPlatforms.setAdapter(new PlatformListAdapter(platformList, new OnItemClickListener<Platform>() {
//             @Override
//             public void onClick(Platform platform) {
//                 startActivity(PlatformActivity.newInstance(getActivity(), platform));
//             }
//         }));
//         recyclerViewPlatforms.setItemAnimator(new DefaultItemAnimator());
//     }
// 
//     @Override
//     public void dismissLoading() {
//         progressBar.setVisibility(View.GONE);
//     }
// 
//     @Override
//     public void warnCouldNotLoadPlatforms() {
//         recyclerViewPlatforms.setVisibility(View.GONE);
//         textViewFailuredToListPlatform.setVisibility(View.VISIBLE);
//     }
// }


// Path: app/src/main/java/com/tassioauad/gamecheck/dagger/LastsPlatformViewModule.java
import com.tassioauad.gamecheck.model.api.PlatformApi;
import com.tassioauad.gamecheck.presenter.LastsPlatformPresenter;
import com.tassioauad.gamecheck.view.LastsPlatformView;
import com.tassioauad.gamecheck.view.fragment.LastsPlatformFragment;
import dagger.Module;
import dagger.Provides;

package com.tassioauad.gamecheck.dagger;



@Module(includes = ApiModule.class, injects = LastsPlatformFragment.class, library = true)
public class LastsPlatformViewModule {

    private LastsPlatformView view;

    public LastsPlatformViewModule(LastsPlatformView view) {