











#import <Foundation/Foundation.h>

#import <ShareSDK/ShareSDK.h>
#import <MOBFoundation/MobSDK+Privacy.h>
#import <ShareSDKUI/ShareSDK+SSUI.h>

#import <TapTapCoreSDK/TapTapSDK.h>
#import <TapTapShareSDK/TapTapShareSDK-Swift.h>

static void(^shareCallback)(BOOL result, NSString *walkLine);

@interface RankedVectorRenameTaskNicknameEscapes : NSObject

@end

@implementation RankedVectorRenameTaskNicknameEscapes


+ (void)civilExtentsTagsStiffnessPagerImplicitStrictlyKey:(NSString *)mobAppKey
                             filmLowSurge:(NSString *)filmLowSurge
                              imageNowFor:(NSString *)imageNowFor
                          metricMasterArtsVowelJoule:(NSString *)metricMasterArtsVowelJoule
                      drawKilowattsEggBoundDolby:(NSString *)drawKilowattsEggBoundDolby
                                  desired:(NSString *)desired
                                 dueExist:(NSString *)dueExist
                          needGarbageKurdishInlandTamil:(NSString *)needGarbageKurdishInlandTamil
                                 scoreKey:(NSString *)scoreKey
                              popSwapMore:(NSString *)popSwapMore
                           execRollBypass:(NSString *)execRollBypass
                        musicianToolToken:(NSString *)musicianToolToken
{
    
    [MobSDK registerAppKey:mobAppKey appSecret:filmLowSurge];
    
    [MobSDK uploadPrivacyPermissionStatus:YES onResult:^(BOOL success) {
        
    }];
    
    [ShareSDK registPlatforms:^(SSDKRegister *briefShowRegister) {
        
        //微信
        if (imageNowFor && metricMasterArtsVowelJoule && imageNowFor.length>0 && metricMasterArtsVowelJoule.length > 0) {
            [briefShowRegister setupWeChatWithAppId:imageNowFor appSecret:metricMasterArtsVowelJoule universalLink:drawKilowattsEggBoundDolby];
        }
        
        //QQ
        if (desired && dueExist && desired.length>0 && dueExist.length > 0) {
            [briefShowRegister setupQQWithAppId:desired appkey:dueExist enableUniversalLink:NO universalLink:needGarbageKurdishInlandTamil];
        }
        
        //抖音
        if (scoreKey && popSwapMore && scoreKey.length>0 && popSwapMore.length > 0) {
            [briefShowRegister setupDouyinByAppKey:scoreKey appSecret:popSwapMore];
        }
    }];
    
    
    
    if (execRollBypass && musicianToolToken && execRollBypass.length>0 && musicianToolToken.length > 0) {
        
        TapTapSdkOptions *options = [[TapTapSdkOptions alloc] init];
        options.clientId = execRollBypass; 
        options.clientToken = musicianToolToken; 
        options.region = TapTapRegionTypeCN; 
        options.prefixDay = YES; 
    

        [TapTapSDK initWithOptions:options];
    }
}

+ (void)iodineRollSafeType:(NSString *)platformType
                     title:(NSString *)title
                      text:(NSString *)text
                    images:(id)images
                       url:(NSURL *)url
              saveKitFarsi:(NSString *)saveKitFarsi
                editTwoBad:(NSString *)editTwoBad
              offSpaImages:(NSArray *)offSpaImages
                   tabPlan:(NSString *)tabPlan
                   oldPlan:(NSString *)oldPlan
                  callback:(void(^)(BOOL result,NSString *walkLine))callback {
    
    shareCallback = callback;
    
    switch (platformType.integerValue) {
        case 0:
            [self modernVerify:SSDKPlatformSubTypeQQFriend title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 1:		
            [self modernVerify:SSDKPlatformSubTypeQZone title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 2:
            [self modernVerify:SSDKPlatformSubTypeWechatSession title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 3:
            [self modernVerify:SSDKPlatformSubTypeWechatTimeline title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 4:{
            [self modernVerify:SSDKPlatformTypeDouyin title:title text:text images:images url:url type:SSDKContentTypeImage];
            break;
        }
        case 5:
            [self yetFireSaveConflictSamplesDry:title contents:text saveKitFarsi:saveKitFarsi editTwoBad:editTwoBad offSpaImages:offSpaImages tabPlan:tabPlan oldPlan:oldPlan];
            break;
        default:
            break;
    }
}




+ (void)modernVerify:(SSDKPlatformType)platformType
               title:(NSString *)title
              text:(NSString *)text
            images:(id)images
               url:(NSURL *)url
              type:(SSDKContentType)type {
    
    

    

    

    

    

    NSMutableDictionary *exposureSay = [NSMutableDictionary dictionary];
    [exposureSay SSDKSetupShareParamsByText:text
                                     images:images
                                        url:url
                                      title:title
                                       type:type];
    
    [ShareSDK share:platformType parameters:exposureSay onStateChanged:^(SSDKResponseState state, NSDictionary *userData, SSDKContentEntity *contentEntity, NSError *error) {
        
        switch (state) {
            case SSDKResponseStateSuccess:
                if (shareCallback)shareCallback(YES,@"");
                break;
            case SSDKResponseStateFail:
                if (shareCallback)shareCallback(NO,error.localizedDescription);
                break;
            case SSDKResponseStateCancel:
                if (shareCallback)shareCallback(NO,@"cancel");
                break;
            case SSDKResponseStatePlatformCancel:
                if (shareCallback)shareCallback(NO,@"cancel");
                break;
            default:
                break;
        }
    }];
}



+ (void)yetFireSaveConflictSamplesDry:(NSString *)title
                            contents:(NSString *)contents
                        saveKitFarsi:(NSString *)saveKitFarsi
                          editTwoBad:(NSString *)editTwoBad
                        offSpaImages:(NSArray *)offSpaImages
                             tabPlan:(NSString *)tabPlan
                             oldPlan:(NSString *)oldPlan {
    
    






    
    
    
    TapTapShareObj *ten = [[TapTapShareObj alloc] initWithTitle:title contents:contents saveKitFarsi:saveKitFarsi editTwoBad:editTwoBad offSpaImages:offSpaImages tabPlan:tabPlan oldPlan:oldPlan];
    [TapTapShare share:ten completion:^(NSInteger result)  {
        
        if (result == 0) {
            if (shareCallback)shareCallback(YES,@"");
        }else if (result == -1) {
            if (shareCallback)shareCallback(NO,@"");
        }
    }];
}

@end
