





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface HoursLogicalInsertionPolarHandDominant : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation HoursLogicalInsertionPolarHandDominant

- (void)dealloc {
    
}

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

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

- (void)thousandsTorchStepResourceRandomSeleniumHis:(NSString *)appId complete:(void (^_Nullable)(BOOL writeLogin))complete {

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


- (void)serverReleaseStoreAliveMixController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull worldHost))success installOpt:(void (^_Nullable)(NSString * _Nonnull error))error nearestAction:(void(^)(NSInteger))action {
    self.seeRankBadLogoAction = action;
    

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





- (CLUIConfigure *)focalSnapWork:(UIViewController *)viewController hairArray:(NSArray *)array {
    CLUIConfigure *insteadSwap = [[CLUIConfigure alloc] init];

    UIColor *magicTrialColor = array[0];
    NSString *getDetailsWin = array[1];
    NSString *entropyWhoName = array[6];
    UIImage *eachSeeImage = array[2];
    CGSize transmitSon = [array[3] CGSizeValue];
    NSString *magicText = array[4];
    NSString *capTrapText = array[5];
    NSString *outText = array[7];
    
    UIImage *backgroundImage = [array[8] isKindOfClass:[UIImage class]] ? array[8] : nil;
    UIImage *useMediaCourseUpdatePlaceImage = [array[9] isKindOfClass:[UIImage class]] ? array[9] : nil;
    
    UIColor *onceBackwardColor = [array[10] isKindOfClass:[UIColor class]] ? array[10] : UIColor.whiteColor;

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

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

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

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

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

@end
