





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface PerformerRedDustSigmoidFlightBaselines : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation PerformerRedDustSigmoidFlightBaselines

- (void)dealloc {
    
}

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

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

- (void)artSensorExponentStretchEarStormDrizzle:(NSString *)appId complete:(void (^_Nullable)(BOOL priorLogin))complete {

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


- (void)daysYetShelfAnnotatedHandballController:(UIViewController *_Nonnull)controller array:(NSArray *)array fadeMen:(void (^_Nullable)(NSDictionary * _Nonnull sourceHow))fadeMen airArbiter:(void (^_Nullable)(NSString * _Nonnull error))error sizeBitAction:(void(^)(NSInteger))action {
    self.throughSigningAction = action;
    

    [CLShanYanSDKManager quickAuthLoginWithConfigure:[self indirectExist:controller leadArray:array] openLoginAuthListener:^(CLCompleteResult * _Nonnull useEqualResult) {
        if (useEqualResult.error) {
            error(useEqualResult.message);
        }
    } oneKeyLoginListener:^(CLCompleteResult * _Nonnull useEqualResult) {
        
        if (useEqualResult.error == nil) {
            dispatch_sync(dispatch_get_main_queue(), ^{
                fadeMen(useEqualResult.data);
            });
        }else {
            error(useEqualResult.message);
        }
    }];
}





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

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

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

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

@end
