// Path: app/src/main/java/com/lucilu/rxdynamicsearch/dagger/module/CountryListModule.java
// @Module
// public final class CountryListModule {
// 
//     @Provides
//     IViewHolderFactory provideViewHolderFactory(@ForActivity Context context) {
//         return new CountryListViewHolderFactory(context);
//     }
// 
//     @Provides
//     IViewHolderBinder<DisplayableItem> provideViewHolderBinder() {
//         return new CountryListViewHolderBinder();
//     }
// 
//     @Provides
//     IListItemComparator provideListItemComparator() {
//         return new CountryListItemComparator();
//     }
// }
// 
// Path: app/src/main/java/com/lucilu/rxdynamicsearch/dagger/module/SearchFragmentModule.java
// @Module
// public final class SearchFragmentModule {
// 
//     @NonNull
//     private final Observable<CharSequence> mQueryStream;
// 
//     public SearchFragmentModule(@NonNull final Observable<CharSequence> queryStream) {
//         mQueryStream = get(queryStream);
//     }
// 
//     @FragmentScope
//     @Provides
//     Observable<CharSequence> providesQueryStream() {
//         return mQueryStream;
//     }
// }
// 
// Path: app/src/main/java/com/lucilu/rxdynamicsearch/fragments/CountryListFragment.java
// public final class CountryListFragment extends BaseFragment {
// 
//     @Nullable
//     @Inject
//     CountryListViewModel mViewModel;
// 
//     @Nullable
//     private SearchView mSearchView;
// 
//     @Nullable
//     private RecyclerView mCountryList;
// 
//     @Nullable
//     @Inject
//     RecyclerViewAdapter mAdapter;
// 
//     @Nullable
//     @Override
//     public View onCreateView(final LayoutInflater inflater,
//                              @Nullable final ViewGroup container,
//                              @Nullable final Bundle savedInstanceState) {
//         return inflater.inflate(R.layout.fragment_country_list, container, false);
//     }
// 
//     @Override
//     public void onViewCreated(final View view, final Bundle savedInstanceState) {
//         super.onViewCreated(view, savedInstanceState);
// 
//         mSearchView = ViewUtils.find(view, R.id.searchView_countryName);
//         mCountryList = ViewUtils.find(view, R.id.list_country);
//     }
// 
//     @Override
//     public void onActivityCreated(@Nullable final Bundle savedInstanceState) {
//         super.onActivityCreated(savedInstanceState);
// 
//         get(mCountryList).setAdapter(mAdapter);
//         get(mCountryList).setLayoutManager(new LinearLayoutManager(getActivity()));
//     }
// 
//     @Override
//     protected void onBind(@NonNull final CompositeSubscription s) {
//         s.add(get(mViewModel).getListItemStream()
//                              .subscribeOn(Schedulers.computation())
//                              .observeOn(AndroidSchedulers.mainThread())
//                              .subscribe(get(mAdapter)::update,
//                                         e -> Timber.e(e, "Error updating adapter with model")));
//     }
// 
//     @NonNull
//     @Override
//     protected ViewModel getViewModel() {
//         return get(mViewModel);
//     }
// 
//     @Override
//     public void onInject() {
//         createComponent().inject(this);
//     }
// 
//     private CountryListComponent createComponent() {
//         MainActivity activity = (MainActivity) getActivity();
//         SearchFragmentModule searchFragmentModule = new SearchFragmentModule(getQueryStream());
// 
//         return activity.getComponent().plusSearchFragment(searchFragmentModule);
//     }
// 
//     private Observable<CharSequence> getQueryStream() {
//         return Observable.never();
//     }
// }


import com.lucilu.rxdynamicsearch.dagger.Scopes.FragmentScope;
import com.lucilu.rxdynamicsearch.dagger.module.CountryListModule;
import com.lucilu.rxdynamicsearch.dagger.module.SearchFragmentModule;
import com.lucilu.rxdynamicsearch.fragments.CountryListFragment;
import dagger.Subcomponent;
package com.lucilu.rxdynamicsearch.dagger.component;



/**
 * {@link CountryListFragment} component.
 */
@FragmentScope
@Subcomponent(modules = {SearchFragmentModule.class, CountryListModule.class})
public interface CountryListComponent {

// Path: app/src/main/java/com/lucilu/rxdynamicsearch/dagger/module/CountryListModule.java
// @Module
// public final class CountryListModule {
// 
//     @Provides
//     IViewHolderFactory provideViewHolderFactory(@ForActivity Context context) {
//         return new CountryListViewHolderFactory(context);
//     }
// 
//     @Provides
//     IViewHolderBinder<DisplayableItem> provideViewHolderBinder() {
//         return new CountryListViewHolderBinder();
//     }
// 
//     @Provides
//     IListItemComparator provideListItemComparator() {
//         return new CountryListItemComparator();
//     }
// }
// 
// Path: app/src/main/java/com/lucilu/rxdynamicsearch/dagger/module/SearchFragmentModule.java
// @Module
// public final class SearchFragmentModule {
// 
//     @NonNull
//     private final Observable<CharSequence> mQueryStream;
// 
//     public SearchFragmentModule(@NonNull final Observable<CharSequence> queryStream) {
//         mQueryStream = get(queryStream);
//     }
// 
//     @FragmentScope
//     @Provides
//     Observable<CharSequence> providesQueryStream() {
//         return mQueryStream;
//     }
// }
// 
// Path: app/src/main/java/com/lucilu/rxdynamicsearch/fragments/CountryListFragment.java
// public final class CountryListFragment extends BaseFragment {
// 
//     @Nullable
//     @Inject
//     CountryListViewModel mViewModel;
// 
//     @Nullable
//     private SearchView mSearchView;
// 
//     @Nullable
//     private RecyclerView mCountryList;
// 
//     @Nullable
//     @Inject
//     RecyclerViewAdapter mAdapter;
// 
//     @Nullable
//     @Override
//     public View onCreateView(final LayoutInflater inflater,
//                              @Nullable final ViewGroup container,
//                              @Nullable final Bundle savedInstanceState) {
//         return inflater.inflate(R.layout.fragment_country_list, container, false);
//     }
// 
//     @Override
//     public void onViewCreated(final View view, final Bundle savedInstanceState) {
//         super.onViewCreated(view, savedInstanceState);
// 
//         mSearchView = ViewUtils.find(view, R.id.searchView_countryName);
//         mCountryList = ViewUtils.find(view, R.id.list_country);
//     }
// 
//     @Override
//     public void onActivityCreated(@Nullable final Bundle savedInstanceState) {
//         super.onActivityCreated(savedInstanceState);
// 
//         get(mCountryList).setAdapter(mAdapter);
//         get(mCountryList).setLayoutManager(new LinearLayoutManager(getActivity()));
//     }
// 
//     @Override
//     protected void onBind(@NonNull final CompositeSubscription s) {
//         s.add(get(mViewModel).getListItemStream()
//                              .subscribeOn(Schedulers.computation())
//                              .observeOn(AndroidSchedulers.mainThread())
//                              .subscribe(get(mAdapter)::update,
//                                         e -> Timber.e(e, "Error updating adapter with model")));
//     }
// 
//     @NonNull
//     @Override
//     protected ViewModel getViewModel() {
//         return get(mViewModel);
//     }
// 
//     @Override
//     public void onInject() {
//         createComponent().inject(this);
//     }
// 
//     private CountryListComponent createComponent() {
//         MainActivity activity = (MainActivity) getActivity();
//         SearchFragmentModule searchFragmentModule = new SearchFragmentModule(getQueryStream());
// 
//         return activity.getComponent().plusSearchFragment(searchFragmentModule);
//     }
// 
//     private Observable<CharSequence> getQueryStream() {
//         return Observable.never();
//     }
// }


// Path: app/src/main/java/com/lucilu/rxdynamicsearch/dagger/component/CountryListComponent.java
import com.lucilu.rxdynamicsearch.dagger.Scopes.FragmentScope;
import com.lucilu.rxdynamicsearch.dagger.module.CountryListModule;
import com.lucilu.rxdynamicsearch.dagger.module.SearchFragmentModule;
import com.lucilu.rxdynamicsearch.fragments.CountryListFragment;
import dagger.Subcomponent;

package com.lucilu.rxdynamicsearch.dagger.component;



/**
 * {@link CountryListFragment} component.
 */
@FragmentScope
@Subcomponent(modules = {SearchFragmentModule.class, CountryListModule.class})
public interface CountryListComponent {

    void inject(CountryListFragment fragment);