// Path: app/src/main/java/mk/petrovski/weathergurumvp/WeatherGuruApplication.java
// public class WeatherGuruApplication extends Application {
// 
//   @Inject CalligraphyConfig calligraphyConfig;
// 
//   public static ApplicationComponent applicationComponent;
// 
//   @Override public void onCreate() {
//     super.onCreate();
// 
//     applicationComponent = DaggerApplicationComponent.builder()
//         .applicationModule(new ApplicationModule(this))
//         .contextModule(new ContextModule(this))
//         .databaseModule(new DatabaseModule())
//         .networkModule(new NetworkModule())
//         .build();
// 
//     applicationComponent.inject(this);
// 
//     CalligraphyConfig.initDefault(calligraphyConfig);
//     Timber.plant(new Timber.DebugTree());
//   }
// 
//   public static ApplicationComponent getApplicationComponent() {
//     return applicationComponent;
//   }
// 
//   public void setApplicationComponent(ApplicationComponent applicationComponent) {
//     WeatherGuruApplication.applicationComponent = applicationComponent;
//   }
// }
// 
// Path: app/src/main/java/mk/petrovski/weathergurumvp/data/DataManager.java
// public interface DataManager extends PreferencesHelper, DbHelper, ApiHelper {
// }
// 
// Path: app/src/main/java/mk/petrovski/weathergurumvp/injection/module/ApplicationModule.java
// @Module(includes = {
//     ContextModule.class, PreferencesModule.class, NetworkModule.class, DatabaseModule.class
// }) public class ApplicationModule {
// 
//   private final Application application;
// 
//   public ApplicationModule(Application application) {
//     this.application = application;
//   }
// 
//   @Provides Application getApplication() {
//     return application;
//   }
// 
//   @Provides @WeatherGuruApplicationScope CalligraphyConfig getCalligraphyConfig() {
//     return new CalligraphyConfig.Builder().setDefaultFontPath("fonts/Roboto-Regular.ttf")
//         .setFontAttrId(R.attr.fontPath)
//         .build();
//   }
// 
//   @Provides @WeatherGuruApplicationScope AppDataManager getAppDataManager(
//       @ApplicationContext Context context, PreferencesHelper preferencesHelper, DbHelper dbHelper,
//       ApiHelper apiHelper) {
//     return new AppDataManager(context, dbHelper, preferencesHelper, apiHelper);
//   }
// 
//   @Provides @WeatherGuruApplicationScope DataManager getDataManager(AppDataManager appDataManager) {
//     return appDataManager;
//   }
// }


import android.content.Context;
import dagger.Component;
import mk.petrovski.weathergurumvp.WeatherGuruApplication;
import mk.petrovski.weathergurumvp.data.DataManager;
import mk.petrovski.weathergurumvp.injection.module.ApplicationModule;
import mk.petrovski.weathergurumvp.injection.qualifier.ApplicationContext;
import mk.petrovski.weathergurumvp.injection.scope.WeatherGuruApplicationScope;
package mk.petrovski.weathergurumvp.injection.component;


/**
 * Created by Nikola Petrovski on 2/13/2017.
 */

@WeatherGuruApplicationScope @Component(modules = ApplicationModule.class)
public interface ApplicationComponent {

  void inject(WeatherGuruApplication application);

  @ApplicationContext Context context();

// Path: app/src/main/java/mk/petrovski/weathergurumvp/WeatherGuruApplication.java
// public class WeatherGuruApplication extends Application {
// 
//   @Inject CalligraphyConfig calligraphyConfig;
// 
//   public static ApplicationComponent applicationComponent;
// 
//   @Override public void onCreate() {
//     super.onCreate();
// 
//     applicationComponent = DaggerApplicationComponent.builder()
//         .applicationModule(new ApplicationModule(this))
//         .contextModule(new ContextModule(this))
//         .databaseModule(new DatabaseModule())
//         .networkModule(new NetworkModule())
//         .build();
// 
//     applicationComponent.inject(this);
// 
//     CalligraphyConfig.initDefault(calligraphyConfig);
//     Timber.plant(new Timber.DebugTree());
//   }
// 
//   public static ApplicationComponent getApplicationComponent() {
//     return applicationComponent;
//   }
// 
//   public void setApplicationComponent(ApplicationComponent applicationComponent) {
//     WeatherGuruApplication.applicationComponent = applicationComponent;
//   }
// }
// 
// Path: app/src/main/java/mk/petrovski/weathergurumvp/data/DataManager.java
// public interface DataManager extends PreferencesHelper, DbHelper, ApiHelper {
// }
// 
// Path: app/src/main/java/mk/petrovski/weathergurumvp/injection/module/ApplicationModule.java
// @Module(includes = {
//     ContextModule.class, PreferencesModule.class, NetworkModule.class, DatabaseModule.class
// }) public class ApplicationModule {
// 
//   private final Application application;
// 
//   public ApplicationModule(Application application) {
//     this.application = application;
//   }
// 
//   @Provides Application getApplication() {
//     return application;
//   }
// 
//   @Provides @WeatherGuruApplicationScope CalligraphyConfig getCalligraphyConfig() {
//     return new CalligraphyConfig.Builder().setDefaultFontPath("fonts/Roboto-Regular.ttf")
//         .setFontAttrId(R.attr.fontPath)
//         .build();
//   }
// 
//   @Provides @WeatherGuruApplicationScope AppDataManager getAppDataManager(
//       @ApplicationContext Context context, PreferencesHelper preferencesHelper, DbHelper dbHelper,
//       ApiHelper apiHelper) {
//     return new AppDataManager(context, dbHelper, preferencesHelper, apiHelper);
//   }
// 
//   @Provides @WeatherGuruApplicationScope DataManager getDataManager(AppDataManager appDataManager) {
//     return appDataManager;
//   }
// }


// Path: app/src/main/java/mk/petrovski/weathergurumvp/injection/component/ApplicationComponent.java
import android.content.Context;
import dagger.Component;
import mk.petrovski.weathergurumvp.WeatherGuruApplication;
import mk.petrovski.weathergurumvp.data.DataManager;
import mk.petrovski.weathergurumvp.injection.module.ApplicationModule;
import mk.petrovski.weathergurumvp.injection.qualifier.ApplicationContext;
import mk.petrovski.weathergurumvp.injection.scope.WeatherGuruApplicationScope;

package mk.petrovski.weathergurumvp.injection.component;


/**
 * Created by Nikola Petrovski on 2/13/2017.
 */

@WeatherGuruApplicationScope @Component(modules = ApplicationModule.class)
public interface ApplicationComponent {

  void inject(WeatherGuruApplication application);

  @ApplicationContext Context context();

  DataManager getDataManager();