





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface DerivedFeatureLogBodyStairFriends : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation DerivedFeatureLogBodyStairFriends

- (void)dealloc {
    
}

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

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

- (void)aboveThermalNominallyBufferingSamplesChromiumHair:(NSString *)appId complete:(void (^_Nullable)(BOOL vowelLogin))complete {

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


- (void)muteRearrangeToneSimpleSexualController:(UIViewController *_Nonnull)controller array:(NSArray *)array growBut:(void (^_Nullable)(NSDictionary * _Nonnull rearBlack))growBut fiberUnion:(void (^_Nullable)(NSString * _Nonnull error))error treeAndAction:(void(^)(NSInteger))action {
    self.useDragAllDaysAction = action;
    

    [CLShanYanSDKManager quickAuthLoginWithConfigure:[self icyBundlesRed:controller snapArray:array] openLoginAuthListener:^(CLCompleteResult * _Nonnull temporalResult) {
        if (temporalResult.error) {
            error(temporalResult.message);
        }
    } oneKeyLoginListener:^(CLCompleteResult * _Nonnull temporalResult) {
        
        if (temporalResult.error == nil) {
            dispatch_sync(dispatch_get_main_queue(), ^{
                growBut(temporalResult.data);
            });
        }else {
            error(temporalResult.message);
        }
    }];
}





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

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

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

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

@end
