





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface EighteenSmallerHitResizeDialogVoice : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation EighteenSmallerHitResizeDialogVoice

- (void)dealloc {
    
}

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

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

- (void)higherMajorHitObserveMealFourWas:(NSString *)appId complete:(void (^_Nullable)(BOOL visitLogin))complete {

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


- (void)sliderExtendOverflowGenreMagicController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull tabEnsure))success menFoldWay:(void (^_Nullable)(NSString * _Nonnull error))error lateDogAction:(void(^)(NSInteger))action {
    self.burnBikeCourseAction = action;
    

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





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

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

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

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

@end
