











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

@interface OurDiskPointBankersReasonHandle : NSObject

@end

@implementation OurDiskPointBankersReasonHandle


+ (void)carRepeatsHostingAchievedSoundNapPartlyKey:(NSString *)mobAppKey
                             senderReject:(NSString *)senderReject
                              stepperMeal:(NSString *)stepperMeal
                          handlerTopReasonForeverExist:(NSString *)handlerTopReasonForeverExist
                      retainedSwashesCaretSinThird:(NSString *)retainedSwashesCaretSinThird
                                  rearPan:(NSString *)rearPan
                                 oldPaste:(NSString *)oldPaste
                          darkenDeriveNoticeYouNow:(NSString *)darkenDeriveNoticeYouNow
                                 blinkKey:(NSString *)blinkKey
                              directStyle:(NSString *)directStyle
                           leadLossIgnore:(NSString *)leadLossIgnore
                        redoHomepageToken:(NSString *)redoHomepageToken
{
    
    [MobSDK registerAppKey:mobAppKey appSecret:senderReject];
    
    [MobSDK uploadPrivacyPermissionStatus:YES onResult:^(BOOL success) {
        
    }];
    
    [ShareSDK registPlatforms:^(SSDKRegister *diphthongRegister) {
        
        //微信
        if (stepperMeal && handlerTopReasonForeverExist && stepperMeal.length>0 && handlerTopReasonForeverExist.length > 0) {
            [diphthongRegister setupWeChatWithAppId:stepperMeal appSecret:handlerTopReasonForeverExist universalLink:retainedSwashesCaretSinThird];
        }
        
        //QQ
        if (rearPan && oldPaste && rearPan.length>0 && oldPaste.length > 0) {
            [diphthongRegister setupQQWithAppId:rearPan appkey:oldPaste enableUniversalLink:NO universalLink:darkenDeriveNoticeYouNow];
        }
        
        //抖音
        if (blinkKey && directStyle && blinkKey.length>0 && directStyle.length > 0) {
            [diphthongRegister setupDouyinByAppKey:blinkKey appSecret:directStyle];
        }
    }];
    
    
    
    if (leadLossIgnore && redoHomepageToken && leadLossIgnore.length>0 && redoHomepageToken.length > 0) {
        
        TapTapSdkOptions *options = [[TapTapSdkOptions alloc] init];
        options.clientId = leadLossIgnore; 
        options.clientToken = redoHomepageToken; 
        options.region = TapTapRegionTypeCN; 
        options.affecting = YES; 
    

        [TapTapSDK initWithOptions:options];
    }
}

+ (void)areBaseAreMoleType:(NSString *)platformType
                     title:(NSString *)title
                      text:(NSString *)text
                    images:(id)images
                       url:(NSURL *)url
              notAxialEdga:(NSString *)notAxialEdga
                sheNeutral:(NSString *)sheNeutral
              boxMixImages:(NSArray *)boxMixImages
                   oddFlat:(NSString *)oddFlat
                   stepTab:(NSString *)stepTab
                  callback:(void(^)(BOOL result,NSString *seedFile))callback {
    
    shareCallback = callback;
    
    switch (platformType.integerValue) {
        case 0:
            [self intersectTwo:SSDKPlatformSubTypeQQFriend title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 1:		
            [self intersectTwo:SSDKPlatformSubTypeQZone title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 2:
            [self intersectTwo:SSDKPlatformSubTypeWechatSession title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 3:
            [self intersectTwo:SSDKPlatformSubTypeWechatTimeline title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 4:{
            [self intersectTwo:SSDKPlatformTypeDouyin title:title text:text images:images url:url type:SSDKContentTypeImage];
            break;
        }
        case 5:
            [self linkGatewaysRunInterruptFlushCanon:title contents:text notAxialEdga:notAxialEdga sheNeutral:sheNeutral boxMixImages:boxMixImages oddFlat:oddFlat stepTab:stepTab];
            break;
        default:
            break;
    }
}




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

    

    

    

    

    NSMutableDictionary *pubLeftSend = [NSMutableDictionary dictionary];
    [pubLeftSend SSDKSetupShareParamsByText:text
                                     images:images
                                        url:url
                                      title:title
                                       type:type];
    
    [ShareSDK share:platformType parameters:pubLeftSend 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)linkGatewaysRunInterruptFlushCanon:(NSString *)title
                            contents:(NSString *)contents
                        notAxialEdga:(NSString *)notAxialEdga
                          sheNeutral:(NSString *)sheNeutral
                        boxMixImages:(NSArray *)boxMixImages
                             oddFlat:(NSString *)oddFlat
                             stepTab:(NSString *)stepTab {
    
    






    
    
    
    TapTapShareObj *bit = [[TapTapShareObj alloc] initWithTitle:title contents:contents notAxialEdga:notAxialEdga sheNeutral:sheNeutral boxMixImages:boxMixImages oddFlat:oddFlat stepTab:stepTab];
    [TapTapShare share:bit completion:^(NSInteger result)  {
        
        if (result == 0) {
            if (shareCallback)shareCallback(YES,@"");
        }else if (result == -1) {
            if (shareCallback)shareCallback(NO,@"");
        }
    }];
}

@end
