





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface StakeYardDownloadLatencyFastExplicit : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation StakeYardDownloadLatencyFastExplicit

- (void)dealloc {
    
}

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

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

- (void)askJabberRomanPastePanGraphicsOne:(NSString *)appId complete:(void (^_Nullable)(BOOL localLogin))complete {

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


- (void)sensorGeneralRenewingArmpitHangController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull safariBus))success scanLinger:(void (^_Nullable)(NSString * _Nonnull error))error showersAction:(void(^)(NSInteger))action {
    self.albumSexSeeBadAction = action;
    

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





- (CLUIConfigure *)inlandSpeaker:(UIViewController *)viewController findArray:(NSArray *)array {
    CLUIConfigure *willCalorie = [[CLUIConfigure alloc] init];

    UIColor *coloredManColor = array[0];
    NSString *socialSpecify = array[1];
    NSString *stringDaysName = array[6];
    UIImage *yetPaceImage = array[2];
    CGSize screenPaste = [array[3] CGSizeValue];
    NSString *towerText = array[4];
    NSString *atomEarText = array[5];
    NSString *pubText = array[7];
    
    UIImage *backgroundImage = [array[8] isKindOfClass:[UIImage class]] ? array[8] : nil;
    UIImage *clearAtomAspectDeriveSubtitlesImage = [array[9] isKindOfClass:[UIImage class]] ? array[9] : nil;
    
    UIColor *pulsePoloSinColor = [array[10] isKindOfClass:[UIColor class]] ? array[10] : UIColor.whiteColor;

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

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

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

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

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

@end
