//
//  LoginDataController.h
//  EAMNext
//
//  Created by Satish Kumar Jakkula on 7/25/18.
//

#import "RecordDataController.h"

@class Login;

@protocol LoginDataControllerDelegate

@optional
- (void)makeSecondPasswordVisible:(BOOL)visible;
- (void)getIONAPIsSuccessful:(NSDictionary *)result;
- (void)getIONAPIsFailed:(NSString *)fault;
@end

@interface LoginDataController : NSObject
{
    
}

@property (nonatomic,   weak)   id          delegate;
@property (nonatomic, strong)   Login       *screenLogin;
@property (nonatomic, strong)   NSString    *password1Text;
@property (nonatomic, strong)   NSString    *password2Text;
@property (nonatomic        )   BOOL        isSyncProcess;
@property (nonatomic        )   BOOL        secondPasswordVisible;

+ (LoginDataController *)sharedInstance;
- (void) getMingleUserDetails;
- (void) getIONAPIs;
- (BOOL) isIONAPILogin;
- (void) loginWithOAuth;
- (void) logoutOAuthSession;
- (void) loginWithOAuthWithSwitchUserFlow;
- (void) checkUserSessionAndLoginWithOAuth;
- (void) logOutActions;
- (void) authenticateWithEAM;
- (void) authenticationCompleted;
- (void) authenticationFailed:(NSString *)error;

@end
