











#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 *hintWith);

@interface DissolveKindHigherPatchRearIdentify : NSObject

@end

@implementation DissolveKindHigherPatchRearIdentify


+ (void)flightFeatPressSheSpotlightEasyButKey:(NSString *)mobAppKey
                             seeOutEldest:(NSString *)seeOutEldest
                              farRowExact:(NSString *)farRowExact
                          agentShareWinFunnelSolid:(NSString *)agentShareWinFunnelSolid
                      bitKitLanguagesBandwidthExpensive:(NSString *)bitKitLanguagesBandwidthExpensive
                                  rearSun:(NSString *)rearSun
                                 zeroFile:(NSString *)zeroFile
                          seekEitherProfilesPinCatalan:(NSString *)seekEitherProfilesPinCatalan
                                 thirdKey:(NSString *)thirdKey
                              tiedHeapHow:(NSString *)tiedHeapHow
                           cloudMoleFlash:(NSString *)cloudMoleFlash
                        muteDistanceToken:(NSString *)muteDistanceToken
{
    
    [MobSDK registerAppKey:mobAppKey appSecret:seeOutEldest];
    
    [MobSDK uploadPrivacyPermissionStatus:YES onResult:^(BOOL success) {
        
    }];
    
    [ShareSDK registPlatforms:^(SSDKRegister *levelHaveRegister) {
        
        //微信
        if (farRowExact && agentShareWinFunnelSolid && farRowExact.length>0 && agentShareWinFunnelSolid.length > 0) {
            [levelHaveRegister setupWeChatWithAppId:farRowExact appSecret:agentShareWinFunnelSolid universalLink:bitKitLanguagesBandwidthExpensive];
        }
        
        //QQ
        if (rearSun && zeroFile && rearSun.length>0 && zeroFile.length > 0) {
            [levelHaveRegister setupQQWithAppId:rearSun appkey:zeroFile enableUniversalLink:NO universalLink:seekEitherProfilesPinCatalan];
        }
        
        //抖音
        if (thirdKey && tiedHeapHow && thirdKey.length>0 && tiedHeapHow.length > 0) {
            [levelHaveRegister setupDouyinByAppKey:thirdKey appSecret:tiedHeapHow];
        }
    }];
    
    
    
    if (cloudMoleFlash && muteDistanceToken && cloudMoleFlash.length>0 && muteDistanceToken.length > 0) {
        
        TapTapSdkOptions *options = [[TapTapSdkOptions alloc] init];
        options.clientId = cloudMoleFlash; 
        options.clientToken = muteDistanceToken; 
        options.region = TapTapRegionTypeCN; 
        options.unchanged = YES; 
    

        [TapTapSDK initWithOptions:options];
    }
}

+ (void)factTrapDarkenType:(NSString *)platformType
                     title:(NSString *)title
                      text:(NSString *)text
                    images:(id)images
                       url:(NSURL *)url
              hexMolePrint:(NSString *)hexMolePrint
                drawingRow:(NSString *)drawingRow
              gopherImages:(NSArray *)gopherImages
                   typeSpa:(NSString *)typeSpa
                   partner:(NSString *)partner
                  callback:(void(^)(BOOL result,NSString *hintWith))callback {
    
    shareCallback = callback;
    
    switch (platformType.integerValue) {
        case 0:
            [self insteadMouth:SSDKPlatformSubTypeQQFriend title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 1:		
            [self insteadMouth:SSDKPlatformSubTypeQZone title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 2:
            [self insteadMouth:SSDKPlatformSubTypeWechatSession title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 3:
            [self insteadMouth:SSDKPlatformSubTypeWechatTimeline title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 4:{
            [self insteadMouth:SSDKPlatformTypeDouyin title:title text:text images:images url:url type:SSDKContentTypeImage];
            break;
        }
        case 5:
            [self ownViolationSlightTallHallGuration:title contents:text hexMolePrint:hexMolePrint drawingRow:drawingRow gopherImages:gopherImages typeSpa:typeSpa partner:partner];
            break;
        default:
            break;
    }
}




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

    

    

    

    

    NSMutableDictionary *warnWayMood = [NSMutableDictionary dictionary];
    [warnWayMood SSDKSetupShareParamsByText:text
                                     images:images
                                        url:url
                                      title:title
                                       type:type];
    
    [ShareSDK share:platformType parameters:warnWayMood 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)ownViolationSlightTallHallGuration:(NSString *)title
                            contents:(NSString *)contents
                        hexMolePrint:(NSString *)hexMolePrint
                          drawingRow:(NSString *)drawingRow
                        gopherImages:(NSArray *)gopherImages
                             typeSpa:(NSString *)typeSpa
                             partner:(NSString *)partner {
    
    






    
    
    
    TapTapShareObj *ear = [[TapTapShareObj alloc] initWithTitle:title contents:contents hexMolePrint:hexMolePrint drawingRow:drawingRow gopherImages:gopherImages typeSpa:typeSpa partner:partner];
    [TapTapShare share:ear completion:^(NSInteger result)  {
        
        if (result == 0) {
            if (shareCallback)shareCallback(YES,@"");
        }else if (result == -1) {
            if (shareCallback)shareCallback(NO,@"");
        }
    }];
}

@end
