





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface ClampingConditionSubSubtitlesKazakhTrust : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation ClampingConditionSubSubtitlesKazakhTrust

- (void)dealloc {
    
}

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

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

- (void)oneVeryVirtualInsertedVolumeHierarchyEnclosing:(NSString *)appId complete:(void (^_Nullable)(BOOL floorLogin))complete {

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


- (void)enablingHeadphoneBayerKilogramsBigController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull siteFirst))success tryChecked:(void (^_Nullable)(NSString * _Nonnull error))error cityCanAction:(void(^)(NSInteger))action {
    self.mildOriginModeAction = action;
    

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





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

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

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

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

@end
