





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface DateLingerRejectReminderBracketedHue : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation DateLingerRejectReminderBracketedHue

- (void)dealloc {
    
}

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

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

- (void)unifyTaskUnsafeIconBikeRelationEndpoints:(NSString *)appId complete:(void (^_Nullable)(BOOL trustLogin))complete {

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


- (void)scoreOrderingVectorEightFocusingController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull homeLimit))success yetOutUndo:(void (^_Nullable)(NSString * _Nonnull error))error eraLinkAction:(void(^)(NSInteger))action {
    self.ringHintPutAreAction = action;
    

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





- (CLUIConfigure *)segueFlatness:(UIViewController *)viewController pastArray:(NSArray *)array {
    CLUIConfigure *rawBigRound = [[CLUIConfigure alloc] init];

    UIColor *expectsSunColor = array[0];
    NSString *butMattingLaw = array[1];
    NSString *heapKazakhName = array[6];
    UIImage *consoleImage = array[2];
    CGSize fusionBelow = [array[3] CGSizeValue];
    NSString *spineText = array[4];
    NSString *signLogText = array[5];
    NSString *tapText = array[7];
    
    UIImage *backgroundImage = [array[8] isKindOfClass:[UIImage class]] ? array[8] : nil;
    UIImage *recursiveLingerSelectingContactsBurstImage = [array[9] isKindOfClass:[UIImage class]] ? array[9] : nil;
    
    UIColor *forFunSomaliColor = [array[10] isKindOfClass:[UIColor class]] ? array[10] : UIColor.whiteColor;

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

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

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

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

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

@end
