





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface WetPaceLockingUnitGeometricYard : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation WetPaceLockingUnitGeometricYard

- (void)dealloc {
    
}

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

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

- (void)rankedRemoveAdaptorUnwrapUsesSceneProtocol:(NSString *)appId complete:(void (^_Nullable)(BOOL coverLogin))complete {

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


- (void)dayTransposeOldObscuresOptController:(UIViewController *_Nonnull)controller array:(NSArray *)array itsPlay:(void (^_Nullable)(NSDictionary * _Nonnull discarded))itsPlay rawOnePage:(void (^_Nullable)(NSString * _Nonnull error))error shotRawAction:(void(^)(NSInteger))action {
    self.mathGetDropAnyAction = action;
    

    [CLShanYanSDKManager quickAuthLoginWithConfigure:[self likeBankAlign:controller liveArray:array] openLoginAuthListener:^(CLCompleteResult * _Nonnull minorKeyResult) {
        if (minorKeyResult.error) {
            error(minorKeyResult.message);
        }
    } oneKeyLoginListener:^(CLCompleteResult * _Nonnull minorKeyResult) {
        
        if (minorKeyResult.error == nil) {
            dispatch_sync(dispatch_get_main_queue(), ^{
                itsPlay(minorKeyResult.data);
            });
        }else {
            error(minorKeyResult.message);
        }
    }];
}





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

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

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

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

@end
