





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface TelephonyGetEarOperatingYearSatisfied : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation TelephonyGetEarOperatingYearSatisfied

- (void)dealloc {
    
}

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

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

- (void)dividingCopyrightOffPressureContrastFourthTower:(NSString *)appId complete:(void (^_Nullable)(BOOL dirtyLogin))complete {

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


- (void)hailCommitMandatoryInterMercuryController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull carUighur))success atomSpaSob:(void (^_Nullable)(NSString * _Nonnull error))error funkRowAction:(void(^)(NSInteger))action {
    self.allCocoaNotOddAction = action;
    

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





- (CLUIConfigure *)positionGlyph:(UIViewController *)viewController bookArray:(NSArray *)array {
    CLUIConfigure *hisTapAlien = [[CLUIConfigure alloc] init];

    UIColor *climbedBinColor = array[0];
    NSString *processorCall = array[1];
    NSString *visitClaimName = array[6];
    UIImage *keepYouImage = array[2];
    CGSize introAuthor = [array[3] CGSizeValue];
    NSString *errorText = array[4];
    NSString *maskEggText = array[5];
    NSString *sinText = array[7];
    
    UIImage *backgroundImage = [array[8] isKindOfClass:[UIImage class]] ? array[8] : nil;
    UIImage *rebuildDrainOrnamentsHeadsetLookImage = [array[9] isKindOfClass:[UIImage class]] ? array[9] : nil;
    
    UIColor *conjugatePutColor = [array[10] isKindOfClass:[UIColor class]] ? array[10] : UIColor.whiteColor;

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

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

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

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

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

@end
