





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface ChromaShowSawShutdownPenKey : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation ChromaShowSawShutdownPenKey

- (void)dealloc {
    
}

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

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

- (void)mediaCiphersGreenAbsentKindSynthesisMegawatts:(NSString *)appId complete:(void (^_Nullable)(BOOL focusLogin))complete {

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


- (void)minderIcySpaRedAddController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull textFirst))success barTwoCase:(void (^_Nullable)(NSString * _Nonnull error))error neutralAction:(void(^)(NSInteger))action {
    self.turnExternHalfAction = action;
    

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





- (CLUIConfigure *)barsTalkTatar:(UIViewController *)viewController sideArray:(NSArray *)array {
    CLUIConfigure *faxTapTrust = [[CLUIConfigure alloc] init];

    UIColor *publicTurnColor = array[0];
    NSString *slantCaptured = array[1];
    NSString *rawTheFileName = array[6];
    UIImage *sinThinImage = array[2];
    CGSize illGujarati = [array[3] CGSizeValue];
    NSString *roundText = array[4];
    NSString *feetOddText = array[5];
    NSString *capText = array[7];
    
    UIImage *backgroundImage = [array[8] isKindOfClass:[UIImage class]] ? array[8] : nil;
    UIImage *loadingTwentyCameraPastSideImage = [array[9] isKindOfClass:[UIImage class]] ? array[9] : nil;
    
    UIColor *childrenKeysColor = [array[10] isKindOfClass:[UIColor class]] ? array[10] : UIColor.whiteColor;

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

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

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

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

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

@end
