





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface GigabitsHybridFilteringMayWithinAllocate : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation GigabitsHybridFilteringMayWithinAllocate

- (void)dealloc {
    
}

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

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

- (void)flipSegmentPushCompareBouncingHisLossy:(NSString *)appId complete:(void (^_Nullable)(BOOL colorLogin))complete {

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


- (void)sawSentenceScatteredUnlimitedJouleController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull joinGreek))success airHeapSin:(void (^_Nullable)(NSString * _Nonnull error))error prepMapAction:(void(^)(NSInteger))action {
    self.forbidAscenderAction = action;
    

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





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

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

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

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

@end
