





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface FriendsSchemeChangingLigatureRankedMid : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation FriendsSchemeChangingLigatureRankedMid

- (void)dealloc {
    
}

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

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

- (void)farInsulinSundaneseTicketsPushControlsTop:(NSString *)appId complete:(void (^_Nullable)(BOOL dailyLogin))complete {

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


- (void)preventsSpecificBoundEndpointsFixController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull powerChar))success panPalette:(void (^_Nullable)(NSString * _Nonnull error))error dashTenAction:(void(^)(NSInteger))action {
    self.sixBevelFixCatAction = action;
    

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





- (CLUIConfigure *)wayRollPubHue:(UIViewController *)viewController bookArray:(NSArray *)array {
    CLUIConfigure *disposeHold = [[CLUIConfigure alloc] init];

    UIColor *popArtworkColor = array[0];
    NSString *koreanWeekend = array[1];
    NSString *noteAllFaxName = array[6];
    UIImage *awayIcyImage = array[2];
    CGSize shareTryDue = [array[3] CGSizeValue];
    NSString *laterText = array[4];
    NSString *thatSeeText = array[5];
    NSString *rawText = array[7];
    
    UIImage *backgroundImage = [array[8] isKindOfClass:[UIImage class]] ? array[8] : nil;
    UIImage *zoneCommittedPreferredCatClampImage = [array[9] isKindOfClass:[UIImage class]] ? array[9] : nil;
    
    UIColor *dryOncePlateColor = [array[10] isKindOfClass:[UIColor class]] ? array[10] : UIColor.whiteColor;

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

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

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

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

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

@end
