// Path: rojak-ui-app/RojakAndroid/app/src/main/java/id/artificialintelligence/rojak/RojakBaseApplication.java
// public class RojakBaseApplication extends Application {
//     @Inject
//     EventBus mEventBus;
//     private Scheduler mScheduler;
//     private ApplicationComponent mApplicationComponent;
// 
//     public static RojakBaseApplication get(Context context) {
//         return (RojakBaseApplication) context.getApplicationContext();
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
// 
//         boolean isDebuggable = (0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE));
// 
//         if (isDebuggable) {
//             Timber.plant(new Timber.DebugTree());
//         }
// 
//         mApplicationComponent = DaggerApplicationComponent.builder().applicationModule(new ApplicationModule(this)).build();
// 
//         mApplicationComponent.inject(this);
//         mEventBus.register(this);
//     }
// 
//     public ApplicationComponent getApplicationComponent() {
//         return mApplicationComponent;
//     }
// 
//     @VisibleForTesting
//     public void setApplicationComponent(ApplicationComponent applicationComponent) {
//         this.mApplicationComponent = applicationComponent;
//     }
// 
//     public Scheduler getSubscribeScheduler() {
//         if (mScheduler == null) {
//             mScheduler = Schedulers.io();
//         }
//         return mScheduler;
//     }
// 
//     @Override
//     public void onLowMemory() {
//         super.onLowMemory();
//         Timber.e("########## onLowMemory ##########");
//     }
// 
//     @Override
//     public void onTerminate() {
//         mEventBus.unregister(this);
//         super.onTerminate();
//     }
// 
//     @Subscribe
//     public void onEvent(AuthenticationErrorEvent event) {
//         Timber.e("Unauthorized! Redirect to Signin Activity..!.");
//     }
// 
// }


import android.content.Context;
import org.greenrobot.eventbus.EventBus;
import javax.inject.Singleton;
import dagger.Component;
import id.artificialintelligence.rojak.RojakBaseApplication;
import id.artificialintelligence.rojak.data.local.PreferencesHelper;
import id.artificialintelligence.rojak.data.remote.ApiService;
import id.artificialintelligence.rojak.data.remote.UnauthorisedInterceptor;
import id.artificialintelligence.rojak.di.module.ApplicationModule;
import id.artificialintelligence.rojak.di.module.NetworkModule;
package id.artificialintelligence.rojak.di.component;





@Singleton
@Component(modules = {
        ApplicationModule.class,
        NetworkModule.class
})
public interface ApplicationComponent {

    void inject(RojakBaseApplication baseApplication);

    void inject(UnauthorisedInterceptor unauthorisedInterceptor);

    Context context();

// Path: rojak-ui-app/RojakAndroid/app/src/main/java/id/artificialintelligence/rojak/RojakBaseApplication.java
// public class RojakBaseApplication extends Application {
//     @Inject
//     EventBus mEventBus;
//     private Scheduler mScheduler;
//     private ApplicationComponent mApplicationComponent;
// 
//     public static RojakBaseApplication get(Context context) {
//         return (RojakBaseApplication) context.getApplicationContext();
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
// 
//         boolean isDebuggable = (0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE));
// 
//         if (isDebuggable) {
//             Timber.plant(new Timber.DebugTree());
//         }
// 
//         mApplicationComponent = DaggerApplicationComponent.builder().applicationModule(new ApplicationModule(this)).build();
// 
//         mApplicationComponent.inject(this);
//         mEventBus.register(this);
//     }
// 
//     public ApplicationComponent getApplicationComponent() {
//         return mApplicationComponent;
//     }
// 
//     @VisibleForTesting
//     public void setApplicationComponent(ApplicationComponent applicationComponent) {
//         this.mApplicationComponent = applicationComponent;
//     }
// 
//     public Scheduler getSubscribeScheduler() {
//         if (mScheduler == null) {
//             mScheduler = Schedulers.io();
//         }
//         return mScheduler;
//     }
// 
//     @Override
//     public void onLowMemory() {
//         super.onLowMemory();
//         Timber.e("########## onLowMemory ##########");
//     }
// 
//     @Override
//     public void onTerminate() {
//         mEventBus.unregister(this);
//         super.onTerminate();
//     }
// 
//     @Subscribe
//     public void onEvent(AuthenticationErrorEvent event) {
//         Timber.e("Unauthorized! Redirect to Signin Activity..!.");
//     }
// 
// }


// Path: rojak-ui-app/RojakAndroid/app/src/main/java/id/artificialintelligence/rojak/di/component/ApplicationComponent.java
import android.content.Context;
import org.greenrobot.eventbus.EventBus;
import javax.inject.Singleton;
import dagger.Component;
import id.artificialintelligence.rojak.RojakBaseApplication;
import id.artificialintelligence.rojak.data.local.PreferencesHelper;
import id.artificialintelligence.rojak.data.remote.ApiService;
import id.artificialintelligence.rojak.data.remote.UnauthorisedInterceptor;
import id.artificialintelligence.rojak.di.module.ApplicationModule;
import id.artificialintelligence.rojak.di.module.NetworkModule;

package id.artificialintelligence.rojak.di.component;





@Singleton
@Component(modules = {
        ApplicationModule.class,
        NetworkModule.class
})
public interface ApplicationComponent {

    void inject(RojakBaseApplication baseApplication);

    void inject(UnauthorisedInterceptor unauthorisedInterceptor);

    Context context();

    ApiService apiService();