// Path: app/src/main/java/com/wiseass/profiler/data/auth/AuthSource.java
// public interface AuthSource {
// 
//     Completable createAccount(Credentials cred);
// 
//     Completable attemptLogin(Credentials cred);
// 
//     Completable deleteUser();
// 
//     Maybe<User> getUser();
// 
//     Completable logUserOut();
// 
//     Completable reauthenticateUser(String password);
// 
//     void setReturnFail(boolean bool);
// }
// 
// Path: app/src/main/java/com/wiseass/profiler/data/auth/Credentials.java
// public class Credentials {
//     private String password;
//     private String username;
//     private String email;
// 
//     public Credentials(String password, String username, String email) {
//         this.password = password;
//         this.username = username;
//         this.email = email;
//     }
// 
//     public String getPassword() {
//         return password;
//     }
// 
//     public void setPassword(String password) {
//         this.password = password;
//     }
// 
//     public String getUsername() {
//         return username;
//     }
// 
//     public void setUsername(String username) {
//         this.username = username;
//     }
// 
//     public String getEmail() {
//         return email;
//     }
// 
//     public void setEmail(String email) {
//         this.email = email;
//     }
// }
// 
// Path: app/src/main/java/com/wiseass/profiler/data/auth/User.java
// public class User {
//     private String email;
//     private String userId;
// 
//     public User(String email, String userId) {
//         this.email = email;
//         this.userId = userId;
//     }
// 
//     public String getEmail() {
//         return email;
//     }
// 
//     public void setEmail(String email) {
//         this.email = email;
//     }
// 
//     public String getUserId() {
//         return userId;
//     }
// 
//     public void setUserId(String userId) {
//         this.userId = userId;
//     }
// }
// 
// Path: app/src/main/java/com/wiseass/profiler/util/BaseSchedulerProvider.java
// public interface BaseSchedulerProvider {
// 
//     Scheduler computation();
// 
//     Scheduler io();
// 
//     Scheduler ui();
// }


import com.wiseass.profiler.R;
import com.wiseass.profiler.data.auth.AuthSource;
import com.wiseass.profiler.data.auth.Credentials;
import com.wiseass.profiler.data.auth.User;
import com.wiseass.profiler.util.BaseSchedulerProvider;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.observers.DisposableCompletableObserver;
import io.reactivex.observers.DisposableMaybeObserver;
package com.wiseass.profiler.login;



/**
 * Responsibilities:
 * The Presenter makes decisions based on input from both the View (Fragment), and the Model (
 * DatabaseService or AuthService)
 */
public class LoginPresenter implements LoginContract.Presenter {
    private AuthSource authSource;
    private LoginContract.View view;
    private CompositeDisposable compositeDisposable;
    private BaseSchedulerProvider schedulerProvider;

    public LoginPresenter (AuthSource authSource,
                           LoginContract.View view,
                           BaseSchedulerProvider schedulerProvider){
        this.authSource = authSource;
        this.view = view;
// Path: app/src/main/java/com/wiseass/profiler/data/auth/AuthSource.java
// public interface AuthSource {
// 
//     Completable createAccount(Credentials cred);
// 
//     Completable attemptLogin(Credentials cred);
// 
//     Completable deleteUser();
// 
//     Maybe<User> getUser();
// 
//     Completable logUserOut();
// 
//     Completable reauthenticateUser(String password);
// 
//     void setReturnFail(boolean bool);
// }
// 
// Path: app/src/main/java/com/wiseass/profiler/data/auth/Credentials.java
// public class Credentials {
//     private String password;
//     private String username;
//     private String email;
// 
//     public Credentials(String password, String username, String email) {
//         this.password = password;
//         this.username = username;
//         this.email = email;
//     }
// 
//     public String getPassword() {
//         return password;
//     }
// 
//     public void setPassword(String password) {
//         this.password = password;
//     }
// 
//     public String getUsername() {
//         return username;
//     }
// 
//     public void setUsername(String username) {
//         this.username = username;
//     }
// 
//     public String getEmail() {
//         return email;
//     }
// 
//     public void setEmail(String email) {
//         this.email = email;
//     }
// }
// 
// Path: app/src/main/java/com/wiseass/profiler/data/auth/User.java
// public class User {
//     private String email;
//     private String userId;
// 
//     public User(String email, String userId) {
//         this.email = email;
//         this.userId = userId;
//     }
// 
//     public String getEmail() {
//         return email;
//     }
// 
//     public void setEmail(String email) {
//         this.email = email;
//     }
// 
//     public String getUserId() {
//         return userId;
//     }
// 
//     public void setUserId(String userId) {
//         this.userId = userId;
//     }
// }
// 
// Path: app/src/main/java/com/wiseass/profiler/util/BaseSchedulerProvider.java
// public interface BaseSchedulerProvider {
// 
//     Scheduler computation();
// 
//     Scheduler io();
// 
//     Scheduler ui();
// }


// Path: app/src/main/java/com/wiseass/profiler/login/LoginPresenter.java
import com.wiseass.profiler.R;
import com.wiseass.profiler.data.auth.AuthSource;
import com.wiseass.profiler.data.auth.Credentials;
import com.wiseass.profiler.data.auth.User;
import com.wiseass.profiler.util.BaseSchedulerProvider;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.observers.DisposableCompletableObserver;
import io.reactivex.observers.DisposableMaybeObserver;

package com.wiseass.profiler.login;



/**
 * Responsibilities:
 * The Presenter makes decisions based on input from both the View (Fragment), and the Model (
 * DatabaseService or AuthService)
 */
public class LoginPresenter implements LoginContract.Presenter {
    private AuthSource authSource;
    private LoginContract.View view;
    private CompositeDisposable compositeDisposable;
    private BaseSchedulerProvider schedulerProvider;

    public LoginPresenter (AuthSource authSource,
                           LoginContract.View view,
                           BaseSchedulerProvider schedulerProvider){
        this.authSource = authSource;
        this.view = view;
        this.schedulerProvider = schedulerProvider;