





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface BoundaryCompoundZipZoomStepsonDismiss : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation BoundaryCompoundZipZoomStepsonDismiss

- (void)dealloc {
    
}

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

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

- (void)basqueExceedsIdiomProductsModeCatalystDependent:(NSString *)appId complete:(void (^_Nullable)(BOOL flashLogin))complete {

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


- (void)parsingBeginningQuietUighurUnitController:(UIViewController *_Nonnull)controller array:(NSArray *)array cityPub:(void (^_Nullable)(NSDictionary * _Nonnull lossyDone))cityPub wayTintRun:(void (^_Nullable)(NSString * _Nonnull error))error daysZipAction:(void(^)(NSInteger))action {
    self.singlePintUsesAction = action;
    

    [CLShanYanSDKManager quickAuthLoginWithConfigure:[self putDidPressed:controller tradArray:array] openLoginAuthListener:^(CLCompleteResult * _Nonnull fillRestResult) {
        if (fillRestResult.error) {
            error(fillRestResult.message);
        }
    } oneKeyLoginListener:^(CLCompleteResult * _Nonnull fillRestResult) {
        
        if (fillRestResult.error == nil) {
            dispatch_sync(dispatch_get_main_queue(), ^{
                cityPub(fillRestResult.data);
            });
        }else {
            error(fillRestResult.message);
        }
    }];
}





- (CLUIConfigure *)putDidPressed:(UIViewController *)viewController tradArray:(NSArray *)array {
    CLUIConfigure *notIllThree = [[CLUIConfigure alloc] init];

    UIColor *menNeedDueColor = array[0];
    NSString *modifiersShot = array[1];
    NSString *lexicalBigName = array[6];
    UIImage *creditsImage = array[2];
    CGSize paddleApply = [array[3] CGSizeValue];
    NSString *wristText = array[4];
    NSString *stretchText = array[5];
    NSString *oldText = array[7];
    
    UIImage *backgroundImage = [array[8] isKindOfClass:[UIImage class]] ? array[8] : nil;
    UIImage *increaseDanceOperateNowPetiteImage = [array[9] isKindOfClass:[UIImage class]] ? array[9] : nil;
    
    UIColor *joinIndirectColor = [array[10] isKindOfClass:[UIColor class]] ? array[10] : UIColor.whiteColor;

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

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

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

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

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

@end
