





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface StepchildCommitBalanceFailureDisposePermitted : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation StepchildCommitBalanceFailureDisposePermitted

- (void)dealloc {
    
}

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

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

- (void)dolbySuperiorsConstantsLocallyMobileParallelCalories:(NSString *)appId complete:(void (^_Nullable)(BOOL ownerLogin))complete {

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


- (void)committedIconOwnContainCommentsController:(UIViewController *_Nonnull)controller array:(NSArray *)array useMole:(void (^_Nullable)(NSDictionary * _Nonnull waxBetter))useMole lossyQuery:(void (^_Nullable)(NSString * _Nonnull error))error animateAction:(void(^)(NSInteger))action {
    self.rateGlobalWordAction = action;
    

    [CLShanYanSDKManager quickAuthLoginWithConfigure:[self lowercaseEcho:controller warnArray:array] openLoginAuthListener:^(CLCompleteResult * _Nonnull ropeBitsResult) {
        if (ropeBitsResult.error) {
            error(ropeBitsResult.message);
        }
    } oneKeyLoginListener:^(CLCompleteResult * _Nonnull ropeBitsResult) {
        
        if (ropeBitsResult.error == nil) {
            dispatch_sync(dispatch_get_main_queue(), ^{
                useMole(ropeBitsResult.data);
            });
        }else {
            error(ropeBitsResult.message);
        }
    }];
}





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

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

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

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

@end
