











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

@interface UnitEndpointFarBuffersHostingSent : NSObject

@end

@implementation UnitEndpointFarBuffersHostingSent


+ (void)featurePredictedInstantAllowDefaultsHintItalianKey:(NSString *)mobAppKey
                             tibetanGreek:(NSString *)tibetanGreek
                              pageSonHost:(NSString *)pageSonHost
                          extensionPopMeanBehaveVolatile:(NSString *)extensionPopMeanBehaveVolatile
                      stripFootnoteVisitCanceledLayout:(NSString *)stripFootnoteVisitCanceledLayout
                                  stopWay:(NSString *)stopWay
                                 shortAdd:(NSString *)shortAdd
                          movementQueueExportingReadoutChina:(NSString *)movementQueueExportingReadoutChina
                                 humanKey:(NSString *)humanKey
                              netLowOcean:(NSString *)netLowOcean
                           exchangesMiles:(NSString *)exchangesMiles
                        doneReadyMidToken:(NSString *)doneReadyMidToken
{
    
    [MobSDK registerAppKey:mobAppKey appSecret:tibetanGreek];
    
    [MobSDK uploadPrivacyPermissionStatus:YES onResult:^(BOOL cupDust) {
        
    }];
    
    [ShareSDK registPlatforms:^(SSDKRegister *scaleJumpRegister) {
        
        //微信
        if (pageSonHost && extensionPopMeanBehaveVolatile && pageSonHost.length>0 && extensionPopMeanBehaveVolatile.length > 0) {
            [scaleJumpRegister setupWeChatWithAppId:pageSonHost appSecret:extensionPopMeanBehaveVolatile universalLink:stripFootnoteVisitCanceledLayout];
        }
        
        //QQ
        if (stopWay && shortAdd && stopWay.length>0 && shortAdd.length > 0) {
            [scaleJumpRegister setupQQWithAppId:stopWay appkey:shortAdd enableUniversalLink:NO universalLink:movementQueueExportingReadoutChina];
        }
        
        //抖音
        if (humanKey && netLowOcean && humanKey.length>0 && netLowOcean.length > 0) {
            [scaleJumpRegister setupDouyinByAppKey:humanKey appSecret:netLowOcean];
        }
    }];
    
    
    
    if (exchangesMiles && doneReadyMidToken && exchangesMiles.length>0 && doneReadyMidToken.length > 0) {
        
        TapTapSdkOptions *options = [[TapTapSdkOptions alloc] init];
        options.clientId = exchangesMiles; 
        options.clientToken = doneReadyMidToken; 
        options.region = TapTapRegionTypeCN; 
        options.afterWarn = YES; 
    

        [TapTapSDK initWithOptions:options];
    }
}

+ (void)sawSpaWaistForType:(NSString *)platformType
                     title:(NSString *)title
                      text:(NSString *)text
                    images:(id)images
                       url:(NSURL *)url
              worldIllCity:(NSString *)worldIllCity
                anyDenyOut:(NSString *)anyDenyOut
              cloudyImages:(NSArray *)cloudyImages
                   ourMore:(NSString *)ourMore
                   wetPrep:(NSString *)wetPrep
                  callback:(void(^)(BOOL result,NSString *rateYard))callback {
    
    shareCallback = callback;
    
    switch (platformType.integerValue) {
        case 0:
            [self sunHeartDays:SSDKPlatformSubTypeQQFriend title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 1:		
            [self sunHeartDays:SSDKPlatformSubTypeQZone title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 2:
            [self sunHeartDays:SSDKPlatformSubTypeWechatSession title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 3:
            [self sunHeartDays:SSDKPlatformSubTypeWechatTimeline title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 4:{
            [self sunHeartDays:SSDKPlatformTypeDouyin title:title text:text images:images url:url type:SSDKContentTypeImage];
            break;
        }
        case 5:
            [self newsstandDustFontPartiallyOrdinalJust:title contents:text worldIllCity:worldIllCity anyDenyOut:anyDenyOut cloudyImages:cloudyImages ourMore:ourMore wetPrep:wetPrep];
            break;
        default:
            break;
    }
}




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

    

    

    

    

    NSMutableDictionary *fixingCanon = [NSMutableDictionary dictionary];
    [fixingCanon SSDKSetupShareParamsByText:text
                                     images:images
                                        url:url
                                      title:title
                                       type:type];
    
    [ShareSDK share:platformType parameters:fixingCanon 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)newsstandDustFontPartiallyOrdinalJust:(NSString *)title
                            contents:(NSString *)contents
                        worldIllCity:(NSString *)worldIllCity
                          anyDenyOut:(NSString *)anyDenyOut
                        cloudyImages:(NSArray *)cloudyImages
                             ourMore:(NSString *)ourMore
                             wetPrep:(NSString *)wetPrep {
    
    






    
    
    
    TapTapShareObj *hit = [[TapTapShareObj alloc] initWithTitle:title contents:contents worldIllCity:worldIllCity anyDenyOut:anyDenyOut cloudyImages:cloudyImages ourMore:ourMore wetPrep:wetPrep];
    [TapTapShare share:hit completion:^(NSInteger result)  {
        
        if (result == 0) {
            if (shareCallback)shareCallback(YES,@"");
        }else if (result == -1) {
            if (shareCallback)shareCallback(NO,@"");
        }
    }];
}

@end
