





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface PosterAssignThinMicroAlternateNow : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation PosterAssignThinMicroAlternateNow

- (void)dealloc {
    
}

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

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

- (void)truncatedProcessesCountingSunReverseMenuBorders:(NSString *)appId complete:(void (^_Nullable)(BOOL upperLogin))complete {

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


- (void)ligatureSixAllocatorCreationPreventedController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull fourMolar))success greaterKin:(void (^_Nullable)(NSString * _Nonnull error))error locallyAction:(void(^)(NSInteger))action {
    self.roomStaticKindAction = action;
    

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





- (CLUIConfigure *)netTrapOldTag:(UIViewController *)viewController gramArray:(NSArray *)array {
    CLUIConfigure *tapsPongSun = [[CLUIConfigure alloc] init];

    UIColor *andOutsideColor = array[0];
    NSString *builtCounting = array[1];
    NSString *capCyclingName = array[6];
    UIImage *pageDayImage = array[2];
    CGSize panoramaWay = [array[3] CGSizeValue];
    NSString *colorText = array[4];
    NSString *permuteText = array[5];
    NSString *icyText = array[7];
    
    UIImage *backgroundImage = [array[8] isKindOfClass:[UIImage class]] ? array[8] : nil;
    UIImage *ambiguityUnionTouchesParseEligibleImage = [array[9] isKindOfClass:[UIImage class]] ? array[9] : nil;
    
    UIColor *menHoldWidthColor = [array[10] isKindOfClass:[UIColor class]] ? array[10] : UIColor.whiteColor;

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

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

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

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

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

@end
