





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface UnlimitedBinTeaspoonsPenHexCatalan : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation UnlimitedBinTeaspoonsPenHexCatalan

- (void)dealloc {
    
}

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

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

- (void)thirdSubtitleViewChargingContextNineReceived:(NSString *)appId complete:(void (^_Nullable)(BOOL colorLogin))complete {

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


- (void)bracketOddQuotationAlertAlphabetController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull currently))success widthTorch:(void (^_Nullable)(NSString * _Nonnull error))error scrollsAction:(void(^)(NSInteger))action {
    self.hueWhoDueAgentAction = action;
    

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





- (CLUIConfigure *)splatChunkMax:(UIViewController *)viewController shotArray:(NSArray *)array {
    CLUIConfigure *gainRefused = [[CLUIConfigure alloc] init];

    UIColor *ownOwnFactColor = array[0];
    NSString *minimumUndone = array[1];
    NSString *lightMouseName = array[6];
    UIImage *millionImage = array[2];
    CGSize snapshotDid = [array[3] CGSizeValue];
    NSString *renewText = array[4];
    NSString *icyMindText = array[5];
    NSString *sobText = array[7];
    
    UIImage *backgroundImage = [array[8] isKindOfClass:[UIImage class]] ? array[8] : nil;
    UIImage *availablePivotGeorgianVariablesRomanImage = [array[9] isKindOfClass:[UIImage class]] ? array[9] : nil;
    
    UIColor *sonFlatLemmaColor = [array[10] isKindOfClass:[UIColor class]] ? array[10] : UIColor.whiteColor;

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

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

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

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

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

@end
