package com.p3.bewoplaner.di;

import com.bumptech.glide.Glide;
import com.p3.bewoplaner.BewoplanerApplication;
import com.p3.bewoplaner.data.AppPrefsConstants;
import com.p3.bewoplaner.data.api.ApiModule;
import com.p3.bewoplaner.data.prefs.AppPrefs;
import com.p3.bewoplaner.data.prefs.AppPrefsModule;
import com.p3.bewoplaner.data.prefs.BooleanPreference;
import com.p3.bewoplaner.data.prefs.LongPreference;
import com.p3.bewoplaner.data.prefs.StringPreference;
import com.p3.bewoplaner.data.repository.GroupRealmRepository;
import com.p3.bewoplaner.data.repository.MessageRealmRepository;
import com.p3.bewoplaner.data.repository.RealmProvider;
import com.p3.bewoplaner.data.repository.RepositoryModule;
import com.p3.bewoplaner.data.repository.UserRealmRepository;
import com.p3.bewoplaner.di.scopes.ApplicationScope;
import com.p3.bewoplaner.utils.SystemUtils;
import com.securepreferences.SecurePreferences;

import android.app.NotificationManager;
import android.content.Context;
import android.content.SharedPreferences;

import javax.inject.Named;

import dagger.Component;
import retrofit2.Retrofit;

/**
 * Created by imarneanu on 2/9/17.
 */
@ApplicationScope
@Component(modules = {ApplicationModule.class, AppPrefsModule.class, ApiModule.class, RepositoryModule.class})
public interface ApplicationComponent {
    void inject(BewoplanerApplication conferenceApplication);

    @P3DSEndpoint
    Retrofit provideP3DSRetrofit();

    @VoucherEndpoint
    Retrofit provideVoucherRetrofit();

    SystemUtils provideSystemUtils();

    @AppPrefs
    SecurePreferences provideSecuredPrefs();

    @Named(AppPrefsConstants.API_ENDPOINT)
    StringPreference provideApiEndpoint();

    @Named(AppPrefsConstants.LOGIN_TOKEN)
    StringPreference provideLoginToken();

    @Named(AppPrefsConstants.SAVE_PASSWORD)
    BooleanPreference provideSavePassword();

    @Named(AppPrefsConstants.CHAT_CODE)
    StringPreference provideChatCode();

    @Named(AppPrefsConstants.ACCOUNT_NO)
    StringPreference provideAccountNumber();

    @Named(AppPrefsConstants.USER_ID)
    LongPreference provideUserId();

    @Named(AppPrefsConstants.AVATAR)
    StringPreference provideAvatar();

    @Named(AppPrefsConstants.NAME)
    StringPreference provideProfileName();

    @Named(AppPrefsConstants.PHONE_NUMBER)
    StringPreference providePhoneNumber();

    @Named(AppPrefsConstants.CHAT_OPENED)
    BooleanPreference provideChatOpened();

    @Named(AppPrefsConstants.APP_KILLED)
    BooleanPreference provideAppKilled();

    NotificationManager provideNotificationManager();

    GroupRealmRepository provideGroupRealmRepository();

    UserRealmRepository provideUserRealmRepository();

    MessageRealmRepository provideMessageRealmRepository();

    RealmProvider provideRealmProvider();

    @AppPrefs
    SharedPreferences provideSharedPreferences();

    Glide provideGlide();

    Context provideContext();
}