





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface OddDogEmbeddingInsulinNecessaryExchanges : NSObject<CLShanYanSDKManagerDelegate>

@property (nonatomic, copy) void(^localCanonicalAction)(NSInteger);

@end

@implementation OddDogEmbeddingInsulinNecessaryExchanges

- (void)dealloc {
    
}

+ (instancetype)shared {
    static id shared = nil;
    static dispatch_once_t hardToken;
    dispatch_once(&hardToken, ^{
        shared = [[super allocWithZone:NULL] init];
    });
    return shared;
}

+ (NSString *)feetOffOuter {
    return [CLShanYanSDKManager clShanYanSDKVersion];
}

- (void)nineAnyInstallPressWayEphemeralCharge:(NSString *)appId complete:(void (^_Nullable)(BOOL sheetLogin))complete {

    [CLShanYanSDKManager setCLShanYanSDKManagerDelegate:self];
    
    [CLShanYanSDKManager setPreGetPhonenumberUseCacheIfNoCellularNetwork:NO];
    
    [CLShanYanSDKManager initWithAppId:appId complete:^(CLCompleteResult * _Nonnull yearsTagResult) {
        __block BOOL armOpenArmPaceLogin = !yearsTagResult.error;
        
        if (armOpenArmPaceLogin) {
            
            [CLShanYanSDKManager preGetPhonenumber:^(CLCompleteResult * _Nonnull yearsTagResult) {
                dispatch_sync(dispatch_get_main_queue(), ^{
                    complete(yearsTagResult.error == nil);
                });
            }];
            
        } else {
            dispatch_sync(dispatch_get_main_queue(), ^{
                complete(NO);
            });
        }
    }];
}


- (void)costVowelSamplesNetscapePipeController:(UIViewController *_Nonnull)controller array:(NSArray *)array fastRet:(void (^_Nullable)(NSDictionary * _Nonnull yearsHang))fastRet microLegal:(void (^_Nullable)(NSString * _Nonnull error))error writingAction:(void(^)(NSInteger))action {
    self.localCanonicalAction = action;
    

    [CLShanYanSDKManager quickAuthLoginWithConfigure:[self cubeWonGetLow:controller ruleArray:array] openLoginAuthListener:^(CLCompleteResult * _Nonnull yearsTagResult) {
        if (yearsTagResult.error) {
            error(yearsTagResult.message);
        }
    } oneKeyLoginListener:^(CLCompleteResult * _Nonnull yearsTagResult) {
        
        if (yearsTagResult.error == nil) {
            dispatch_sync(dispatch_get_main_queue(), ^{
                fastRet(yearsTagResult.data);
            });
        }else {
            error(yearsTagResult.message);
        }
    }];
}





- (CLUIConfigure *)cubeWonGetLow:(UIViewController *)viewController ruleArray:(NSArray *)array {
    CLUIConfigure *courseClose = [[CLUIConfigure alloc] init];
    
    courseClose.viewController = viewController;
    
    
    courseClose.clNavigationBarHidden = @(YES);
    
    //logo
    courseClose.clLogoHiden = @(YES);
    
    
    courseClose.clPhoneNumberFont = [UIFont boldSystemFontOfSize:26];
    courseClose.clPhoneNumberColor = UIColor.darkGrayColor;
    courseClose.clPhoneNumberTextAlignment = @(NSTextAlignmentCenter);
    
    
    courseClose.clSloganTextFont = [UIFont systemFontOfSize:14];
    courseClose.clSloganTextColor = UIColor.darkGrayColor;
    courseClose.clSlogaTextAlignment = @(NSTextAlignmentCenter);
    
    
    courseClose.clLoginBtnText = array[4];
    courseClose.clLoginBtnTextFont = [UIFont systemFontOfSize:18];
    courseClose.clLoginBtnTextColor = UIColor.whiteColor;
    courseClose.clLoginBtnBgColor = array[0];
    courseClose.clLoginBtnCornerRadius = @(2);
    
    
    courseClose.clCheckBoxSize = [NSValue valueWithCGSize:CGSizeMake(0, 0)];
    courseClose.clCheckBoxValue = @(YES);
    
    
    courseClose.clAppPrivacyNormalDesTextFirst = array[5];
    courseClose.clAppPrivacyFirst = @[array[6], array[1]];
    courseClose.clAppPrivacyNormalDesTextSecond = array[7];
    courseClose.clAppPrivacyNormalDesTextLast = @"";
    courseClose.clAppPrivacyTextFont = [UIFont systemFontOfSize:12];
    courseClose.clAppPrivacyTextAlignment = @(NSTextAlignmentLeft);
    courseClose.clAppPrivacyWebNavigationBarTintColor = UIColor.whiteColor;
    courseClose.clAppPrivacyPunctuationMarks = @(YES);
    courseClose.clAppPrivacyColor = @[UIColor.darkGrayColor,array[0]];;
    courseClose.clAuthTypeUseWindow = @(YES);
    courseClose.clPrivacyShowUnderline = @(YES);
    courseClose.clAppPrivacyLineSpacing = @(2.5);
    courseClose.clAuthWindowModalTransitionStyle = @(UIModalTransitionStyleCrossDissolve);
    
    courseClose.clAppPrivacyWebBackBtnImage = array[2];
    
    
    courseClose.clLoadingSize = [NSValue valueWithCGSize:CGSizeMake(90, 90)];
    courseClose.clLoadingCornerRadius = @(2);
    courseClose.clLoadingIndicatorStyle = @(UIActivityIndicatorViewStyleLarge);
    courseClose.clLoadingTintColor = UIColor.blackColor;
    courseClose.clLoadingBackgroundColor = UIColor.clearColor;
    
    
    CLOrientationLayOut *promisedPrincipalSlovenianPanMute = [[CLOrientationLayOut alloc] init];
    courseClose.clOrientationLayOutPortrait = promisedPrincipalSlovenianPanMute;
    
    
    CGFloat y = (([UIScreen mainScreen].bounds.size.height - [array[3] CGSizeValue].height) * 0.5) + 35;
    CGFloat height = 30;
    promisedPrincipalSlovenianPanMute.clLayoutPhoneTop = @(y);
    promisedPrincipalSlovenianPanMute.clLayoutPhoneHeight = @(height);
    promisedPrincipalSlovenianPanMute.clLayoutPhoneCenterX = @(0);
    
    
    y += (height + 20);
    height = 17;
    promisedPrincipalSlovenianPanMute.clLayoutSloganTop = @(y);
    promisedPrincipalSlovenianPanMute.clLayoutSloganCenterX = @(0);
    promisedPrincipalSlovenianPanMute.clLayoutSloganHeight = @(height);

    
    y += (height + 20);
    height = 50;
    promisedPrincipalSlovenianPanMute.clLayoutLoginBtnTop = @(y);
    promisedPrincipalSlovenianPanMute.clLayoutLoginBtnWidth = @([array[3] CGSizeValue].width - 40);
    promisedPrincipalSlovenianPanMute.clLayoutLoginBtnCenterX = @(0);
    promisedPrincipalSlovenianPanMute.clLayoutLoginBtnHeight = @(height);

    
    y += (height + 15);
    promisedPrincipalSlovenianPanMute.clLayoutAppPrivacyTop = @(y);
    promisedPrincipalSlovenianPanMute.clLayoutAppPrivacyCenterX = @(0);
    promisedPrincipalSlovenianPanMute.clLayoutAppPrivacyWidth = @([array[3] CGSizeValue].width - 40);
    
    
    courseClose.customAreaView = ^(UIView * _Nonnull customAreaView) {
        
        customAreaView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0];
        
        UIView *styleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [array[3] CGSizeValue].width, [array[3] CGSizeValue].height)];
        styleView.backgroundColor = UIColor.whiteColor;
        styleView.layer.cornerRadius = 2.0;
        [customAreaView addSubview:styleView];
        styleView.center = customAreaView.center;
        
        
        UIButton *close = [UIButton buttonWithType:UIButtonTypeCustom];
        [close addTarget:self action:@selector(paletteForkFeatOwnerRealmTemplateHandler:) forControlEvents:(UIControlEventTouchUpInside)];
        [close setBackgroundImage:array[2] forState:UIControlStateNormal];
        [styleView addSubview:close];
        close.frame = CGRectMake(8, 8, 20, 20);
    };
    
    return courseClose;
}

- (void)paletteForkFeatOwnerRealmTemplateHandler:(id)sender {
    [CLShanYanSDKManager finishAuthControllerCompletion:nil];
    self.localCanonicalAction(0);
}

@end
