











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

@interface BirthdayGetDescentDismissedLossUnlimited : NSObject

@end

@implementation BirthdayGetDescentDismissedLossUnlimited


+ (void)composedSymptomPullPatientRangeStartingPrefixKey:(NSString *)mobAppKey
                             sceneMenuCan:(NSString *)sceneMenuCan
                              areSubgroup:(NSString *)areSubgroup
                          plateExplicitMaxHundredsBracketed:(NSString *)plateExplicitMaxHundredsBracketed
                      torqueMicroDiscardsTiedDirty:(NSString *)torqueMicroDiscardsTiedDirty
                                  undoEar:(NSString *)undoEar
                                 pipeBend:(NSString *)pipeBend
                          personLazyBufferedSixNautical:(NSString *)personLazyBufferedSixNautical
                                 stillKey:(NSString *)stillKey
                              rawSetupFat:(NSString *)rawSetupFat
                           rawOffRareBoth:(NSString *)rawOffRareBoth
                        snowShakeOddToken:(NSString *)snowShakeOddToken
{
    
    [MobSDK registerAppKey:mobAppKey appSecret:sceneMenuCan];
    
    [MobSDK uploadPrivacyPermissionStatus:YES onResult:^(BOOL success) {
        
    }];
    
    [ShareSDK registPlatforms:^(SSDKRegister *notifyEndRegister) {
        
        //微信
        if (areSubgroup && plateExplicitMaxHundredsBracketed && areSubgroup.length>0 && plateExplicitMaxHundredsBracketed.length > 0) {
            [notifyEndRegister setupWeChatWithAppId:areSubgroup appSecret:plateExplicitMaxHundredsBracketed universalLink:torqueMicroDiscardsTiedDirty];
        }
        
        //QQ
        if (undoEar && pipeBend && undoEar.length>0 && pipeBend.length > 0) {
            [notifyEndRegister setupQQWithAppId:undoEar appkey:pipeBend enableUniversalLink:NO universalLink:personLazyBufferedSixNautical];
        }
        
        //抖音
        if (stillKey && rawSetupFat && stillKey.length>0 && rawSetupFat.length > 0) {
            [notifyEndRegister setupDouyinByAppKey:stillKey appSecret:rawSetupFat];
        }
    }];
    
    
    
    if (rawOffRareBoth && snowShakeOddToken && rawOffRareBoth.length>0 && snowShakeOddToken.length > 0) {
        
        TapTapSdkOptions *options = [[TapTapSdkOptions alloc] init];
        options.clientId = rawOffRareBoth; 
        options.clientToken = snowShakeOddToken; 
        options.region = TapTapRegionTypeCN; 
        options.sheetUses = YES; 
    

        [TapTapSDK initWithOptions:options];
    }
}

+ (void)operationRightType:(NSString *)platformType
                     title:(NSString *)title
                      text:(NSString *)text
                    images:(id)images
                       url:(NSURL *)url
              bitStandHigh:(NSString *)bitStandHigh
                rateEyeRaw:(NSString *)rateEyeRaw
              notifyImages:(NSArray *)notifyImages
                   maxJust:(NSString *)maxJust
                   golfAsk:(NSString *)golfAsk
                  callback:(void(^)(BOOL result,NSString *mathKeys))callback {
    
    shareCallback = callback;
    
    switch (platformType.integerValue) {
        case 0:
            [self worldPurpose:SSDKPlatformSubTypeQQFriend title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 1:		
            [self worldPurpose:SSDKPlatformSubTypeQZone title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 2:
            [self worldPurpose:SSDKPlatformSubTypeWechatSession title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 3:
            [self worldPurpose:SSDKPlatformSubTypeWechatTimeline title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 4:{
            [self worldPurpose:SSDKPlatformTypeDouyin title:title text:text images:images url:url type:SSDKContentTypeImage];
            break;
        }
        case 5:
            [self indirectHashFeedbackTableRateUplink:title contents:text bitStandHigh:bitStandHigh rateEyeRaw:rateEyeRaw notifyImages:notifyImages maxJust:maxJust golfAsk:golfAsk];
            break;
        default:
            break;
    }
}




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

    

    

    

    

    NSMutableDictionary *boxFeetSong = [NSMutableDictionary dictionary];
    [boxFeetSong SSDKSetupShareParamsByText:text
                                     images:images
                                        url:url
                                      title:title
                                       type:type];
    
    [ShareSDK share:platformType parameters:boxFeetSong 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)indirectHashFeedbackTableRateUplink:(NSString *)title
                            contents:(NSString *)contents
                        bitStandHigh:(NSString *)bitStandHigh
                          rateEyeRaw:(NSString *)rateEyeRaw
                        notifyImages:(NSArray *)notifyImages
                             maxJust:(NSString *)maxJust
                             golfAsk:(NSString *)golfAsk {
    
    






    
    
    
    TapTapShareObj *its = [[TapTapShareObj alloc] initWithTitle:title contents:contents bitStandHigh:bitStandHigh rateEyeRaw:rateEyeRaw notifyImages:notifyImages maxJust:maxJust golfAsk:golfAsk];
    [TapTapShare share:its completion:^(NSInteger result)  {
        
        if (result == 0) {
            if (shareCallback)shareCallback(YES,@"");
        }else if (result == -1) {
            if (shareCallback)shareCallback(NO,@"");
        }
    }];
}

@end
