





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface GigabytesParameterWinInuitDefaultsAge : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation GigabytesParameterWinInuitDefaultsAge

- (void)dealloc {
    
}

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

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

- (void)simulatesDirectlyEmbeddingSourcesCheckedOffBridged:(NSString *)appId complete:(void (^_Nullable)(BOOL spellLogin))complete {

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


- (void)mildArteryCupServicePackController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull randomCan))success rebusLight:(void (^_Nullable)(NSString * _Nonnull error))error alignedAction:(void(^)(NSInteger))action {
    self.sinModeRingEggAction = action;
    

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





- (CLUIConfigure *)hertzPostcard:(UIViewController *)viewController starArray:(NSArray *)array {
    CLUIConfigure *sixNowTeeth = [[CLUIConfigure alloc] init];

    UIColor *cellHiddenColor = array[0];
    NSString *underageSolid = array[1];
    NSString *manNumeralName = array[6];
    UIImage *sinDustImage = array[2];
    CGSize persistFull = [array[3] CGSizeValue];
    NSString *clangText = array[4];
    NSString *zipLongText = array[5];
    NSString *dogText = array[7];
    
    UIImage *backgroundImage = [array[8] isKindOfClass:[UIImage class]] ? array[8] : nil;
    UIImage *dublinEditKeyResizingVisitorImage = [array[9] isKindOfClass:[UIImage class]] ? array[9] : nil;
    
    UIColor *mildReceivesColor = [array[10] isKindOfClass:[UIColor class]] ? array[10] : UIColor.whiteColor;

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

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

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

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

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

@end
