





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface RestingInuitOperationMasterIterateArabic : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation RestingInuitOperationMasterIterateArabic

- (void)dealloc {
    
}

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

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

- (void)overageTrackingOneStampGroupBasalClamped:(NSString *)appId complete:(void (^_Nullable)(BOOL totalLogin))complete {

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


- (void)familyOpaqueTypeDiscountsFlashController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull dailySkin))success serbianEra:(void (^_Nullable)(NSString * _Nonnull error))error grayOneAction:(void(^)(NSInteger))action {
    self.inhalerReachedAction = action;
    

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





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

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

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

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

@end
