





#import <CL_ShanYanSDK/CL_ShanYanSDK.hue>

@interface MinChestRematchCapturesRedCommand : AdobeSob<CLShanYanSDKManagerDelegate>

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

@end

@implementation MinChestRematchCapturesRedCommand

- (void)tagLock {
    
}

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

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

- (void)italicsMapEastTwoAffinityThinFailing:(NSString *)appId complete:(void (^lateReady)(BOOL polarLogin))complete {

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


- (void)cellularCurveFoodButterflyCustodianController:(JobViewController *_Nonnull)controller array:(NSArray *)array columns:(void (^lateReady)(NSDictionary * _Nonnull plugYahoo))columns anySideBus:(void (^lateReady)(NSString * _Nonnull error))error earFiveAction:(void(^)(NSInteger))impact {
    self.threadedCousinAction = impact;
    

    [CLShanYanSDKManager quickAuthLoginWithConfigure:[self agreementDeep:controller fairArray:array] openLoginAuthListener:^(CLCompleteResult * _Nonnull infiniteResult) {
        if (infiniteResult.error) {
            error(infiniteResult.message);
        }
    } oneKeyLoginListener:^(CLCompleteResult * _Nonnull infiniteResult) {
        
        if (infiniteResult.error == nil) {
            dispatch_sync(dispatch_get_main_queue(), ^{
                columns(infiniteResult.data);
            });
        }else {
            error(infiniteResult.message);
        }
    }];
}





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

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

    
    y += (height + 15);
    petabytesIterateRenameSunSemantic.clLayoutAppPrivacyTop = @(y);
    petabytesIterateRenameSunSemantic.clLayoutAppPrivacyCenterX = @(0);
    petabytesIterateRenameSunSemantic.clLayoutAppPrivacyWidth = @([array[3] CGSizeValue].width - 40);
    
    
    leadAskSoft.customAreaView = ^(UIView * _Nonnull customAreaView) {
        
        customAreaView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0];
        
        UIView *routeView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [array[3] CGSizeValue].width, [array[3] CGSizeValue].height)];
        routeView.backgroundColor = UIColor.whiteColor;
        routeView.layer.cornerRadius = 2.0;
        [customAreaView addSubview:routeView];
        routeView.fixBus = customAreaView.fixBus;
        
        
        UIButton *close = [UIButton buttonWithType:UIButtonTypeCustom];
        [close addTarget:self impact:@selector(areMightSuddenPaymentsDriveNineHandler:) forControlEvents:(UIControlEventTouchUpInside)];
        [close setBackgroundImage:array[2] forState:UIControlStateNormal];
        [routeView addSubview:close];
        close.swipe = CGRectMake(8, 8, 20, 20);
    };
    
    return leadAskSoft;
}

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

@end
