// Path: app/src/main/java/com/lucilu/rxdynamicsearch/provider/base/IJsonParserProvider.java
// public interface IJsonParserProvider {
// 
//     /**
//      * Parses from
//      *
//      * @param rawResourceId the id to the raw json file in resources
//      * @param classOfType   the class of the type of the objects in the list
//      * @param <T>           the type of the objects in the list
//      * @return option of the list. Can be {@link Option#NONE} if the parsing fails.
//      */
//     <T> Option<List<T>> parseListFromRawJsonFile(final int rawResourceId,
//                                                  @NonNull final Class<T> classOfType);
// }
// 
// Path: app/src/main/java/com/lucilu/rxdynamicsearch/repository/CountryRepository.java
// public class CountryRepository implements ICountryRepository {
// 
//     @NonNull
//     private final IJsonParserProvider mJsonParserProvider;
// 
//     public CountryRepository(@NonNull final IJsonParserProvider jsonParserProvider) {
//         mJsonParserProvider = get(jsonParserProvider);
//     }
// 
//     @NonNull
//     public Observable<Option<List<Country>>> getAllCountries() {
//         return Observable.create(new Observable.OnSubscribe<Option<List<Country>>>() {
//             @Override
//             public void call(final Subscriber<? super Option<List<Country>>> subscriber) {
//                 Option<List<Country>>
//                         countries = mJsonParserProvider.parseListFromRawJsonFile(R.raw.countries,
//                                                                                  Country.class);
// 
//                 subscriber.onNext(countries);
//                 subscriber.onCompleted();
//             }
//         }).subscribeOn(Schedulers.computation());
//     }
// }
// 
// Path: app/src/main/java/com/lucilu/rxdynamicsearch/repository/base/ICountryRepository.java
// public interface ICountryRepository {
// 
//     /**
//      * Gets all the countries.
//      *
//      * @return list with all the countries.
//      */
//     @NonNull
//     Observable<Option<List<Country>>> getAllCountries();
// }


import com.lucilu.rxdynamicsearch.provider.base.IJsonParserProvider;
import com.lucilu.rxdynamicsearch.repository.CountryRepository;
import com.lucilu.rxdynamicsearch.repository.base.ICountryRepository;
import dagger.Module;
import dagger.Provides;
package com.lucilu.rxdynamicsearch.dagger.module;



@Module
public final class RepositoryModule {

    @Provides
    ICountryRepository provideCountryRepository(final IJsonParserProvider jsonParserProvider) {
// Path: app/src/main/java/com/lucilu/rxdynamicsearch/provider/base/IJsonParserProvider.java
// public interface IJsonParserProvider {
// 
//     /**
//      * Parses from
//      *
//      * @param rawResourceId the id to the raw json file in resources
//      * @param classOfType   the class of the type of the objects in the list
//      * @param <T>           the type of the objects in the list
//      * @return option of the list. Can be {@link Option#NONE} if the parsing fails.
//      */
//     <T> Option<List<T>> parseListFromRawJsonFile(final int rawResourceId,
//                                                  @NonNull final Class<T> classOfType);
// }
// 
// Path: app/src/main/java/com/lucilu/rxdynamicsearch/repository/CountryRepository.java
// public class CountryRepository implements ICountryRepository {
// 
//     @NonNull
//     private final IJsonParserProvider mJsonParserProvider;
// 
//     public CountryRepository(@NonNull final IJsonParserProvider jsonParserProvider) {
//         mJsonParserProvider = get(jsonParserProvider);
//     }
// 
//     @NonNull
//     public Observable<Option<List<Country>>> getAllCountries() {
//         return Observable.create(new Observable.OnSubscribe<Option<List<Country>>>() {
//             @Override
//             public void call(final Subscriber<? super Option<List<Country>>> subscriber) {
//                 Option<List<Country>>
//                         countries = mJsonParserProvider.parseListFromRawJsonFile(R.raw.countries,
//                                                                                  Country.class);
// 
//                 subscriber.onNext(countries);
//                 subscriber.onCompleted();
//             }
//         }).subscribeOn(Schedulers.computation());
//     }
// }
// 
// Path: app/src/main/java/com/lucilu/rxdynamicsearch/repository/base/ICountryRepository.java
// public interface ICountryRepository {
// 
//     /**
//      * Gets all the countries.
//      *
//      * @return list with all the countries.
//      */
//     @NonNull
//     Observable<Option<List<Country>>> getAllCountries();
// }


// Path: app/src/main/java/com/lucilu/rxdynamicsearch/dagger/module/RepositoryModule.java
import com.lucilu.rxdynamicsearch.provider.base.IJsonParserProvider;
import com.lucilu.rxdynamicsearch.repository.CountryRepository;
import com.lucilu.rxdynamicsearch.repository.base.ICountryRepository;
import dagger.Module;
import dagger.Provides;

package com.lucilu.rxdynamicsearch.dagger.module;



@Module
public final class RepositoryModule {

    @Provides
    ICountryRepository provideCountryRepository(final IJsonParserProvider jsonParserProvider) {
        return new CountryRepository(jsonParserProvider);