





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface ChamberBouncingPinGaspGetInherited : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation ChamberBouncingPinGaspGetInherited

- (void)dealloc {
    
}

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

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

- (void)axialMethodSecondLightPolicyCombiningUnplugged:(NSString *)appId complete:(void (^_Nullable)(BOOL leakyLogin))complete {

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


- (void)immutableCountedCompoundBarDrawingController:(UIViewController *_Nonnull)controller array:(NSArray *)array wayDeep:(void (^_Nullable)(NSDictionary * _Nonnull busPascal))wayDeep prefersCat:(void (^_Nullable)(NSString * _Nonnull error))error friendsAction:(void(^)(NSInteger))action {
    self.redRaceFunSoloAction = action;
    

    [CLShanYanSDKManager quickAuthLoginWithConfigure:[self eventRearDown:controller sentArray:array] openLoginAuthListener:^(CLCompleteResult * _Nonnull velocityResult) {
        if (velocityResult.error) {
            error(velocityResult.message);
        }
    } oneKeyLoginListener:^(CLCompleteResult * _Nonnull velocityResult) {
        
        if (velocityResult.error == nil) {
            dispatch_sync(dispatch_get_main_queue(), ^{
                wayDeep(velocityResult.data);
            });
        }else {
            error(velocityResult.message);
        }
    }];
}





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

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

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

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

@end
