





#import <CL_ShanYanSDK/CL_ShanYanSDK.h>

@interface ResourceSyntaxSoloistActionStillPopover : NSObject<CLShanYanSDKManagerDelegate>

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

@end

@implementation ResourceSyntaxSoloistActionStillPopover

- (void)dealloc {
    
}

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

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

- (void)artworkVariationEllipseAbsentMapEstablishRepeat:(NSString *)appId complete:(void (^_Nullable)(BOOL surgeLogin))complete {

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


- (void)bedLocationsFlatFunctionsPopoverController:(UIViewController *_Nonnull)controller array:(NSArray *)array success:(void (^_Nullable)(NSDictionary * _Nonnull rateEarly))success mustBinEra:(void (^_Nullable)(NSString * _Nonnull error))error typeIllAction:(void(^)(NSInteger))action {
    self.necessarySolveAction = action;
    

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





- (CLUIConfigure *)scannedSelect:(UIViewController *)viewController fiveArray:(NSArray *)array {
    CLUIConfigure *retrievePan = [[CLUIConfigure alloc] init];

    UIColor *flightRareColor = array[0];
    NSString *zipRightPatch = array[1];
    NSString *lightenHisName = array[6];
    UIImage *maskWetImage = array[2];
    CGSize skipUnbound = [array[3] CGSizeValue];
    NSString *watchText = array[4];
    NSString *spaWireText = array[5];
    NSString *sawText = array[7];
    
    UIImage *backgroundImage = [array[8] isKindOfClass:[UIImage class]] ? array[8] : nil;
    UIImage *tertiaryCousinActualLargerAppendedImage = [array[9] isKindOfClass:[UIImage class]] ? array[9] : nil;
    
    UIColor *anyBuddySameColor = [array[10] isKindOfClass:[UIColor class]] ? array[10] : UIColor.whiteColor;

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

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

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

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

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

@end
