





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface AudienceRowChargeRowYetAfter : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation AudienceRowChargeRowYetAfter

- (void)dealloc {
    
}

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

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

- (void)tertiaryResignMetricTemporalTopPortFix:(NSString *)appId complete:(void (^_Nullable)(BOOL threeLogin))complete {

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


- (void)plateDigitReviewCellDaughterController:(UIViewController *_Nonnull)controller array:(NSArray *)array unsaved:(void (^_Nullable)(NSDictionary * _Nonnull niacinLog))unsaved teamMidWas:(void (^_Nullable)(NSString * _Nonnull error))error dustWhoAction:(void(^)(NSInteger))action {
    self.tibetanEarlierAction = action;
    

    [CLShanYanSDKManager quickAuthLoginWithConfigure:[self roomResponder:controller dashArray:array] openLoginAuthListener:^(CLCompleteResult * _Nonnull chunkOptResult) {
        if (chunkOptResult.error) {
            error(chunkOptResult.message);
        }
    } oneKeyLoginListener:^(CLCompleteResult * _Nonnull chunkOptResult) {
        
        if (chunkOptResult.error == nil) {
            dispatch_sync(dispatch_get_main_queue(), ^{
                unsaved(chunkOptResult.data);
            });
        }else {
            error(chunkOptResult.message);
        }
    }];
}





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

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

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

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

@end
