





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface StylisticDominantThiaminLongMonitoredLigature : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation StylisticDominantThiaminLongMonitoredLigature

- (void)dealloc {
    
}

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

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

- (void)sevenPingAlongWateryGreenSheIts:(NSString *)appId complete:(void (^_Nullable)(BOOL largeLogin))complete {

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


- (void)coloredPrefixLittleUptimeButController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull funnelYet))success winSubSite:(void (^_Nullable)(NSString * _Nonnull error))error relatedAction:(void(^)(NSInteger))action {
    self.taggingCommandAction = action;
    

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





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

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

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

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

@end
