package de.beyondsoft.ownchat.di;

import com.bumptech.glide.Glide;
import de.beyondsoft.ownchat.BewoplanerApplication;
import de.beyondsoft.ownchat.data.AppPrefsConstants;
import de.beyondsoft.ownchat.data.api.ApiModule;
import de.beyondsoft.ownchat.data.prefs.AppPrefs;
import de.beyondsoft.ownchat.data.prefs.AppPrefsModule;
import de.beyondsoft.ownchat.data.prefs.BooleanPreference;
import de.beyondsoft.ownchat.data.prefs.LongPreference;
import de.beyondsoft.ownchat.data.prefs.StringPreference;
import de.beyondsoft.ownchat.data.repository.GroupRealmRepository;
import de.beyondsoft.ownchat.data.repository.MessageRealmRepository;
import de.beyondsoft.ownchat.data.repository.RealmProvider;
import de.beyondsoft.ownchat.data.repository.RepositoryModule;
import de.beyondsoft.ownchat.data.repository.UserRealmRepository;
import de.beyondsoft.ownchat.di.scopes.ApplicationScope;
import de.beyondsoft.ownchat.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();

    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.LAST_ACCOUNT_NO)
    StringPreference provideLastAccountNumber();

    @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();

    @Named(AppPrefsConstants.UPLOAD_MAX_SIZE)
    LongPreference provideUploadMaxSize();

    @Named(AppPrefsConstants.IS_EMPLOYEE)
    BooleanPreference provideIsEmployee();

    @Named(AppPrefsConstants.SHOW_LOGIN_AGAIN)
    BooleanPreference provideShowLoginAgain();

    @Named(AppPrefsConstants.USER_NAME)
    StringPreference provideUserName();

    @Named(AppPrefsConstants.VERIFY_CHAT_CODE_ERROR_MESSAGE)
    StringPreference provideVerifyChatCodeErrorMessage();

    @Named(AppPrefsConstants.USER_PASSWORD)
    StringPreference providePassword();

    @Named(AppPrefsConstants.PATH_TO_FILE_TO_SHARE)
    StringPreference providePathToFileToShare();

    @Named(AppPrefsConstants.IS_COMING_FROM_SHARING_ACTIVITY)
    BooleanPreference provideIsComingFromSharingActivity();

    @Named(AppPrefsConstants.IS_FILE)
    BooleanPreference provideIsFile();

    NotificationManager provideNotificationManager();

    GroupRealmRepository provideGroupRealmRepository();

    UserRealmRepository provideUserRealmRepository();

    MessageRealmRepository provideMessageRealmRepository();

    RealmProvider provideRealmProvider();

    @AppPrefs
    SharedPreferences provideSharedPreferences();

    Glide provideGlide();

    Context provideContext();
}