











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

@interface OverallSemicolonHalfModeLawChat : NSObject

@end

@implementation OverallSemicolonHalfModeLawChat


+ (void)aboutMidSortSheLowerMolarDanceKey:(NSString *)mobAppKey
                             renewReadTop:(NSString *)renewReadTop
                              waxCanOccur:(NSString *)waxCanOccur
                          lighterEvictRingTagSize:(NSString *)lighterEvictRingTagSize
                      contentsApplyDismissSinkDuctility:(NSString *)contentsApplyDismissSinkDuctility
                                  hexSeek:(NSString *)hexSeek
                                 endMixer:(NSString *)endMixer
                          worldPriceIssuerDescribeEcho:(NSString *)worldPriceIssuerDescribeEcho
                                 retryKey:(NSString *)retryKey
                              centeredSum:(NSString *)centeredSum
                           endManLeadRace:(NSString *)endManLeadRace
                        sayIntentHueToken:(NSString *)sayIntentHueToken
{
    
    [MobSDK registerAppKey:mobAppKey appSecret:renewReadTop];
    
    [MobSDK uploadPrivacyPermissionStatus:YES onResult:^(BOOL success) {
        
    }];
    
    [ShareSDK registPlatforms:^(SSDKRegister *kilowattsRegister) {
        
        //微信
        if (waxCanOccur && lighterEvictRingTagSize && waxCanOccur.length>0 && lighterEvictRingTagSize.length > 0) {
            [kilowattsRegister setupWeChatWithAppId:waxCanOccur appSecret:lighterEvictRingTagSize universalLink:contentsApplyDismissSinkDuctility];
        }
        
        //QQ
        if (hexSeek && endMixer && hexSeek.length>0 && endMixer.length > 0) {
            [kilowattsRegister setupQQWithAppId:hexSeek appkey:endMixer enableUniversalLink:NO universalLink:worldPriceIssuerDescribeEcho];
        }
        
        //抖音
        if (retryKey && centeredSum && retryKey.length>0 && centeredSum.length > 0) {
            [kilowattsRegister setupDouyinByAppKey:retryKey appSecret:centeredSum];
        }
    }];
    
    
    
    if (endManLeadRace && sayIntentHueToken && endManLeadRace.length>0 && sayIntentHueToken.length > 0) {
        
        TapTapSdkOptions *options = [[TapTapSdkOptions alloc] init];
        options.clientId = endManLeadRace; 
        options.clientToken = sayIntentHueToken; 
        options.region = TapTapRegionTypeCN; 
        options.reloadYet = YES; 
    

        [TapTapSDK initWithOptions:options];
    }
}

+ (void)dryStayHeapTapType:(NSString *)platformType
                     title:(NSString *)title
                      text:(NSString *)text
                    images:(id)images
                       url:(NSURL *)url
              burstHandles:(NSString *)burstHandles
                flightBits:(NSString *)flightBits
              recordImages:(NSArray *)recordImages
                   packSin:(NSString *)packSin
                   ourJump:(NSString *)ourJump
                  callback:(void(^)(BOOL result,NSString *wayTheme))callback {
    
    shareCallback = callback;
    
    switch (platformType.integerValue) {
        case 0:
            [self barsBadError:SSDKPlatformSubTypeQQFriend title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 1:		
            [self barsBadError:SSDKPlatformSubTypeQZone title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 2:
            [self barsBadError:SSDKPlatformSubTypeWechatSession title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 3:
            [self barsBadError:SSDKPlatformSubTypeWechatTimeline title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 4:{
            [self barsBadError:SSDKPlatformTypeDouyin title:title text:text images:images url:url type:SSDKContentTypeImage];
            break;
        }
        case 5:
            [self titleOptPeakPeerExportTrial:title contents:text burstHandles:burstHandles flightBits:flightBits recordImages:recordImages packSin:packSin ourJump:ourJump];
            break;
        default:
            break;
    }
}




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

    

    

    

    

    
    NSMutableDictionary *pintForTake = [NSMutableDictionary dictionary];
    [pintForTake SSDKSetupShareParamsByText:text
                                     images:images
                                        url:url
                                      title:title
                                       type:type];
    
    [ShareSDK share:platformType parameters:pintForTake 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)titleOptPeakPeerExportTrial:(NSString *)title
                            contents:(NSString *)contents
                        burstHandles:(NSString *)burstHandles
                          flightBits:(NSString *)flightBits
                        recordImages:(NSArray *)recordImages
                             packSin:(NSString *)packSin
                             ourJump:(NSString *)ourJump {
    
    






    
    
    
    TapTapShareObj *law = [[TapTapShareObj alloc] initWithTitle:title contents:contents burstHandles:burstHandles flightBits:flightBits recordImages:recordImages packSin:packSin ourJump:ourJump];
    [TapTapShare share:law completion:^(NSInteger result)  {
        
        if (result == 0) {
            if (shareCallback)shareCallback(YES,@"");
        }else if (result == -1) {
            if (shareCallback)shareCallback(NO,@"");
        }
    }];
}

@end
