











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

@interface MayStayInheritedRearBrandNegate : NSObject

@end

@implementation MayStayInheritedRearBrandNegate


+ (void)unsignedNearestObservedUppercasePrettyWorkAllocatorKey:(NSString *)mobAppKey
                             millSolidBut:(NSString *)millSolidBut
                              serifNearby:(NSString *)serifNearby
                          contactsOutcomeHintAlbanianChat:(NSString *)contactsOutcomeHintAlbanianChat
                      fullySawForeverDesiredTilde:(NSString *)fullySawForeverDesiredTilde
                                  itsDash:(NSString *)itsDash
                                 fourteen:(NSString *)fourteen
                          carSinContainedEyeDeviation:(NSString *)carSinContainedEyeDeviation
                                 batchKey:(NSString *)batchKey
                              gradeOnline:(NSString *)gradeOnline
                           sonForWideMany:(NSString *)sonForWideMany
                        sexManManualToken:(NSString *)sexManManualToken
{
    
    [MobSDK registerAppKey:mobAppKey appSecret:millSolidBut];
    
    [MobSDK uploadPrivacyPermissionStatus:YES onResult:^(BOOL success) {
        
    }];
    
    [ShareSDK registPlatforms:^(SSDKRegister *discardedRegister) {
        
        //微信
        if (serifNearby && contactsOutcomeHintAlbanianChat && serifNearby.length>0 && contactsOutcomeHintAlbanianChat.length > 0) {
            [discardedRegister setupWeChatWithAppId:serifNearby appSecret:contactsOutcomeHintAlbanianChat universalLink:fullySawForeverDesiredTilde];
        }
        
        //QQ
        if (itsDash && fourteen && itsDash.length>0 && fourteen.length > 0) {
            [discardedRegister setupQQWithAppId:itsDash appkey:fourteen enableUniversalLink:NO universalLink:carSinContainedEyeDeviation];
        }
        
        //抖音
        if (batchKey && gradeOnline && batchKey.length>0 && gradeOnline.length > 0) {
            [discardedRegister setupDouyinByAppKey:batchKey appSecret:gradeOnline];
        }
    }];
    
    
    
    if (sonForWideMany && sexManManualToken && sonForWideMany.length>0 && sexManManualToken.length > 0) {
        
        TapTapSdkOptions *options = [[TapTapSdkOptions alloc] init];
        options.clientId = sonForWideMany; 
        options.clientToken = sexManManualToken; 
        options.region = TapTapRegionTypeCN; 
        options.nowSerial = YES; 
    

        [TapTapSDK initWithOptions:options];
    }
}

+ (void)naturalControlType:(NSString *)platformType
                     title:(NSString *)title
                      text:(NSString *)text
                    images:(id)images
                       url:(NSURL *)url
              decayJumpHue:(NSString *)decayJumpHue
                matrixFlip:(NSString *)matrixFlip
              unableImages:(NSArray *)unableImages
                   kerning:(NSString *)kerning
                   outPull:(NSString *)outPull
                  callback:(void(^)(BOOL result,NSString *errorMsg))callback {
    
    shareCallback = callback;
    
    switch (platformType.integerValue) {
        case 0:
            [self resonantTask:SSDKPlatformSubTypeQQFriend title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 1:		
            [self resonantTask:SSDKPlatformSubTypeQZone title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 2:
            [self resonantTask:SSDKPlatformSubTypeWechatSession title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 3:
            [self resonantTask:SSDKPlatformSubTypeWechatTimeline title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 4:{
            [self resonantTask:SSDKPlatformTypeDouyin title:title text:text images:images url:url type:SSDKContentTypeImage];
            break;
        }
        case 5:
            [self trustLogYouSelectorNaturalDatabases:title contents:text decayJumpHue:decayJumpHue matrixFlip:matrixFlip unableImages:unableImages kerning:kerning outPull:outPull];
            break;
        default:
            break;
    }
}




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

    

    

    

    

    
    NSMutableDictionary *tagsMathSun = [NSMutableDictionary dictionary];
    [tagsMathSun SSDKSetupShareParamsByText:text
                                     images:images
                                        url:url
                                      title:title
                                       type:type];
    
    [ShareSDK share:platformType parameters:tagsMathSun 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)trustLogYouSelectorNaturalDatabases:(NSString *)title
                            contents:(NSString *)contents
                        decayJumpHue:(NSString *)decayJumpHue
                          matrixFlip:(NSString *)matrixFlip
                        unableImages:(NSArray *)unableImages
                             kerning:(NSString *)kerning
                             outPull:(NSString *)outPull {
    
    






    
    
    
    TapTapShareObj *obj = [[TapTapShareObj alloc] initWithTitle:title contents:contents decayJumpHue:decayJumpHue matrixFlip:matrixFlip unableImages:unableImages kerning:kerning outPull:outPull];
    [TapTapShare share:obj completion:^(NSInteger result)  {
        
        if (result == 0) {
            if (shareCallback)shareCallback(YES,@"");
        }else if (result == -1) {
            if (shareCallback)shareCallback(NO,@"");
        }
    }];
}

@end
