





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface SymptomSubAssameseMetricsReadoutRoom : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation SymptomSubAssameseMetricsReadoutRoom

- (void)dealloc {
    
}

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

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

- (void)turkmenAssistiveDescendedHalfManHisBed:(NSString *)appId complete:(void (^_Nullable)(BOOL trashLogin))complete {

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


- (void)threadsTextGigabitsRainReplyController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull rootOuter))success thinAcross:(void (^_Nullable)(NSString * _Nonnull error))error turkmenAction:(void(^)(NSInteger))action {
    self.stackPlanPressAction = action;
    

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





- (CLUIConfigure *)leftPubMixAny:(UIViewController *)viewController turnArray:(NSArray *)array {
    CLUIConfigure *funAccurate = [[CLUIConfigure alloc] init];

    UIColor *millSecretColor = array[0];
    NSString *moireSeekBest = array[1];
    NSString *hashTwoMinName = array[6];
    UIImage *seedPenImage = array[2];
    CGSize solveWayOur = [array[3] CGSizeValue];
    NSString *leaveText = array[4];
    NSString *localesText = array[5];
    NSString *maxText = array[7];
    
    UIImage *backgroundImage = [array[8] isKindOfClass:[UIImage class]] ? array[8] : nil;
    UIImage *criteriaResonantFrictionFarthestCaptionImage = [array[9] isKindOfClass:[UIImage class]] ? array[9] : nil;
    
    UIColor *contactsGaspColor = [array[10] isKindOfClass:[UIColor class]] ? array[10] : UIColor.whiteColor;

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

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

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

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

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

@end
