





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface SemanticFlagDigestFurlongsMongolianDomain : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation SemanticFlagDigestFurlongsMongolianDomain

- (void)dealloc {
    
}

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

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

- (void)busTwoEndsSetupSectionsReloadDescender:(NSString *)appId complete:(void (^_Nullable)(BOOL clockLogin))complete {

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


- (void)leakyMainEndColumnVideoController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull refreshed))success textualDry:(void (^_Nullable)(NSString * _Nonnull error))error chatKinAction:(void(^)(NSInteger))action {
    self.discardedEntryAction = action;
    

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





- (CLUIConfigure *)polarDaysPool:(UIViewController *)viewController nodeArray:(NSArray *)array {
    CLUIConfigure *torqueMerge = [[CLUIConfigure alloc] init];

    UIColor *chooseBendColor = array[0];
    NSString *musicImproper = array[1];
    NSString *outerPinchName = array[6];
    UIImage *keysEndImage = array[2];
    CGSize modifiedOdd = [array[3] CGSizeValue];
    NSString *rebusText = array[4];
    NSString *kindAirText = array[5];
    NSString *fixText = array[7];
    
    UIImage *backgroundImage = [array[8] isKindOfClass:[UIImage class]] ? array[8] : nil;
    UIImage *makerYetPlateOverhangKilometerImage = [array[9] isKindOfClass:[UIImage class]] ? array[9] : nil;
    
    UIColor *dailyReleaseColor = [array[10] isKindOfClass:[UIColor class]] ? array[10] : UIColor.whiteColor;

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

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

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

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

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

@end
