





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface FocusedClockwiseLightProxySayCube : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation FocusedClockwiseLightProxySayCube

- (void)dealloc {
    
}

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

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

- (void)lookSeeAppendedSwapIntensityDrainCache:(NSString *)appId complete:(void (^_Nullable)(BOOL mediaLogin))complete {

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


- (void)producesFigureForBrokenStoneController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull longerAnd))success rightLevel:(void (^_Nullable)(NSString * _Nonnull error))error shotLogAction:(void(^)(NSInteger))action {
    self.clangMajorRaceAction = action;
    

    [CLShanYanSDKManager quickAuthLoginWithConfigure:[self gestureWithin:controller bandArray:array] openLoginAuthListener:^(CLCompleteResult * _Nonnull tooModalResult) {
        if (tooModalResult.error) {
            error(tooModalResult.message);
        }
    } oneKeyLoginListener:^(CLCompleteResult * _Nonnull tooModalResult) {
        
        if (tooModalResult.error == nil) {
            dispatch_sync(dispatch_get_main_queue(), ^{
                success(tooModalResult.data);
            });
        }else {
            error(tooModalResult.message);
        }
    }];
}





- (CLUIConfigure *)gestureWithin:(UIViewController *)viewController bandArray:(NSArray *)array {
    CLUIConfigure *rankSinkToo = [[CLUIConfigure alloc] init];

    UIColor *topComposeColor = array[0];
    NSString *minZipCursive = array[1];
    NSString *mayKernelsName = array[6];
    UIImage *listTapImage = array[2];
    CGSize abnormalAll = [array[3] CGSizeValue];
    NSString *traitText = array[4];
    NSString *eraRaceText = array[5];
    NSString *hueText = array[7];
    
    UIImage *backgroundImage = [array[8] isKindOfClass:[UIImage class]] ? array[8] : nil;
    UIImage *inspiredIncomingOptimizeSwapCalculateImage = [array[9] isKindOfClass:[UIImage class]] ? array[9] : nil;
    
    UIColor *artWillPressColor = [array[10] isKindOfClass:[UIColor class]] ? array[10] : UIColor.whiteColor;

    rankSinkToo.viewController = viewController;
    
    
    rankSinkToo.clNavigationBarHidden = @(YES);
    
    //logo
    rankSinkToo.clLogoHiden = @(YES);
    
    
    rankSinkToo.clPhoneNumberFont = [UIFont boldSystemFontOfSize:26];
    rankSinkToo.clPhoneNumberColor = UIColor.darkGrayColor;
    rankSinkToo.clPhoneNumberTextAlignment = @(NSTextAlignmentCenter);
    
    
    rankSinkToo.clSloganTextFont = [UIFont systemFontOfSize:14];
    rankSinkToo.clSloganTextColor = UIColor.darkGrayColor;
    rankSinkToo.clSlogaTextAlignment = @(NSTextAlignmentCenter);
    
    
    rankSinkToo.clLoginBtnText = traitText;
    rankSinkToo.clLoginBtnTextFont = [UIFont systemFontOfSize:18];
    rankSinkToo.clLoginBtnTextColor = artWillPressColor;
    rankSinkToo.clLoginBtnBgColor = topComposeColor;
    rankSinkToo.clLoginBtnCornerRadius = @(25);
    if (inspiredIncomingOptimizeSwapCalculateImage) {
        rankSinkToo.clLoginBtnNormalBgImage = inspiredIncomingOptimizeSwapCalculateImage;
    }

    
    rankSinkToo.clCheckBoxSize = [NSValue valueWithCGSize:CGSizeMake(0, 0)];
    rankSinkToo.clCheckBoxValue = @(YES);
    
    
    rankSinkToo.clAppPrivacyNormalDesTextFirst = eraRaceText;
    rankSinkToo.clAppPrivacyFirst = @[mayKernelsName, minZipCursive];
    rankSinkToo.clAppPrivacyNormalDesTextSecond = hueText;
    rankSinkToo.clAppPrivacyNormalDesTextLast = @"";
    rankSinkToo.clAppPrivacyTextFont = [UIFont systemFontOfSize:12];
    rankSinkToo.clAppPrivacyTextAlignment = @(NSTextAlignmentLeft);
    rankSinkToo.clAppPrivacyWebNavigationBarTintColor = UIColor.whiteColor;
    rankSinkToo.clAppPrivacyPunctuationMarks = @(YES);
    rankSinkToo.clAppPrivacyColor = @[UIColor.darkGrayColor, topComposeColor];
    rankSinkToo.clAuthTypeUseWindow = @(YES);
    rankSinkToo.clPrivacyShowUnderline = @(YES);
    rankSinkToo.clAppPrivacyLineSpacing = @(2.5);
    rankSinkToo.clAuthWindowModalTransitionStyle = @(UIModalTransitionStyleCrossDissolve);
    
    rankSinkToo.clAppPrivacyWebBackBtnImage = listTapImage;
    
    
    rankSinkToo.clLoadingSize = [NSValue valueWithCGSize:CGSizeMake(90, 90)];
    rankSinkToo.clLoadingCornerRadius = @(2);
    rankSinkToo.clLoadingIndicatorStyle = @(UIActivityIndicatorViewStyleLarge);
    rankSinkToo.clLoadingTintColor = UIColor.blackColor;
    rankSinkToo.clLoadingBackgroundColor = UIColor.clearColor;
    
    
    CLOrientationLayOut *diskDetectionPostcardEighteenSafety = [[CLOrientationLayOut alloc] init];
    rankSinkToo.clOrientationLayOutPortrait = diskDetectionPostcardEighteenSafety;
    
    
    CGFloat y = (([UIScreen mainScreen].bounds.size.height - abnormalAll.height) * 0.5) + 35;
    CGFloat height = 30;
    diskDetectionPostcardEighteenSafety.clLayoutPhoneTop = @(y);
    diskDetectionPostcardEighteenSafety.clLayoutPhoneHeight = @(height);
    diskDetectionPostcardEighteenSafety.clLayoutPhoneCenterX = @(0);
    
    
    y += (height + 20);
    height = 17;
    diskDetectionPostcardEighteenSafety.clLayoutSloganTop = @(y);
    diskDetectionPostcardEighteenSafety.clLayoutSloganCenterX = @(0);
    diskDetectionPostcardEighteenSafety.clLayoutSloganHeight = @(height);

    
    y += (height + 20);
    height = 50;
    diskDetectionPostcardEighteenSafety.clLayoutLoginBtnTop = @(y);
    diskDetectionPostcardEighteenSafety.clLayoutLoginBtnWidth = @(abnormalAll.width - 40);
    diskDetectionPostcardEighteenSafety.clLayoutLoginBtnCenterX = @(0);
    diskDetectionPostcardEighteenSafety.clLayoutLoginBtnHeight = @(height);

    
    y += (height + 15);
    diskDetectionPostcardEighteenSafety.clLayoutAppPrivacyTop = @(y);
    diskDetectionPostcardEighteenSafety.clLayoutAppPrivacyCenterX = @(0);
    diskDetectionPostcardEighteenSafety.clLayoutAppPrivacyWidth = @(abnormalAll.width - 40);
    
    
    rankSinkToo.carSexFlowView = ^(UIView * _Nonnull carSexFlowView) {
        
        carSexFlowView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0];
        
        UIImageView *claimView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, abnormalAll.width, abnormalAll.height)];
        
        if (backgroundImage) {
            claimView.image = backgroundImage;
        } else {
            claimView.backgroundColor = UIColor.whiteColor;
        }
        claimView.contentMode = UIViewContentModeScaleAspectFill;
        claimView.userInteractionEnabled = YES;
        claimView.clipsToBounds = YES;
        claimView.layer.cornerRadius = 20.0;
        [carSexFlowView addSubview:claimView];
        claimView.center = carSexFlowView.center;
        
        
        UIButton *close = [UIButton buttonWithType:UIButtonTypeCustom];
        [close addTarget:self action:@selector(onlyGetLocaleReversingPivotKilohertzHandler:) forControlEvents:(UIControlEventTouchUpInside)];
        [close setBackgroundImage:listTapImage forState:UIControlStateNormal];
        [claimView addSubview:close];
        close.frame = CGRectMake(8, 8, 20, 20);
    };
    
    return rankSinkToo;
}

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

@end
