





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface AnyTransformConstantGuideMeanJabber : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation AnyTransformConstantGuideMeanJabber

- (void)dealloc {
    
}

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

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

- (void)momentaryRectangleRightExcludeDayCertStar:(NSString *)appId complete:(void (^_Nullable)(BOOL resetLogin))complete {

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


- (void)ignoredInvalidOffLowercaseColoredController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull auxiliary))success skinOrigin:(void (^_Nullable)(NSString * _Nonnull error))error bestKeyAction:(void(^)(NSInteger))action {
    self.andCacheIcyAllAction = action;
    

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





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

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

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

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

@end
