





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface ToolVitaminBuildGrandauntDisablesTabular : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation ToolVitaminBuildGrandauntDisablesTabular

- (void)dealloc {
    
}

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

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

- (void)loadingEchoVelocityNominallySiteRankedOunces:(NSString *)appId complete:(void (^_Nullable)(BOOL floorLogin))complete {

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


- (void)squaresWinPrimaryAutomaticSecondsController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull dashFoggy))success frontHertz:(void (^_Nullable)(NSString * _Nonnull error))error lostKinAction:(void(^)(NSInteger))action {
    self.syntheticBelowAction = action;
    

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





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

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

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

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

@end
