











#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 FoldTibetanFunnelClientOnlyMenstrual : NSObject

@end

@implementation FoldTibetanFunnelClientOnlyMenstrual


+ (void)sentenceClipBordersMaxFarNordicInvalidKey:(NSString *)mobAppKey
                             celsiusLeaky:(NSString *)celsiusLeaky
                              filmPrecise:(NSString *)filmPrecise
                          lengthReplyPubWeightsThirteen:(NSString *)lengthReplyPubWeightsThirteen
                      cancelledBordersSerifJabberSlashed:(NSString *)cancelledBordersSerifJabberSlashed
                                  cellMap:(NSString *)cellMap
                                 executor:(NSString *)executor
                          failBedPutSubmittedStretch:(NSString *)failBedPutSubmittedStretch
                                 fullyKey:(NSString *)fullyKey
                              capArtClick:(NSString *)capArtClick
                           bundlesBridged:(NSString *)bundlesBridged
                        configureFunToken:(NSString *)configureFunToken
{
    
    [MobSDK registerAppKey:mobAppKey appSecret:celsiusLeaky];
    
    [MobSDK uploadPrivacyPermissionStatus:YES onResult:^(BOOL success) {
        
    }];
    
    [ShareSDK registPlatforms:^(SSDKRegister *menuEarlyRegister) {
        
        //微信
        if (filmPrecise && lengthReplyPubWeightsThirteen && filmPrecise.length>0 && lengthReplyPubWeightsThirteen.length > 0) {
            [menuEarlyRegister setupWeChatWithAppId:filmPrecise appSecret:lengthReplyPubWeightsThirteen universalLink:cancelledBordersSerifJabberSlashed];
        }
        
        //QQ
        if (cellMap && executor && cellMap.length>0 && executor.length > 0) {
            [menuEarlyRegister setupQQWithAppId:cellMap appkey:executor enableUniversalLink:NO universalLink:failBedPutSubmittedStretch];
        }
        
        //抖音
        if (fullyKey && capArtClick && fullyKey.length>0 && capArtClick.length > 0) {
            [menuEarlyRegister setupDouyinByAppKey:fullyKey appSecret:capArtClick];
        }
    }];
    
    
    
    if (bundlesBridged && configureFunToken && bundlesBridged.length>0 && configureFunToken.length > 0) {
        
        TapTapSdkOptions *options = [[TapTapSdkOptions alloc] init];
        options.clientId = bundlesBridged; 
        options.clientToken = configureFunToken; 
        options.region = TapTapRegionTypeCN; 
        options.enableLog = YES; 
    

        [TapTapSDK initWithOptions:options];
    }
}

+ (void)faeroeseObjectType:(NSString *)platformType
                     title:(NSString *)title
                      text:(NSString *)text
                    images:(id)images
                       url:(NSURL *)url
              groupLabelId:(NSString *)groupLabelId
                hashtagIds:(NSString *)hashtagIds
              footerImages:(NSArray *)footerImages
                   failUrl:(NSString *)failUrl
                   backUrl:(NSString *)backUrl
                  callback:(void(^)(BOOL result,NSString *errorMsg))callback {
    
    shareCallback = callback;
    
    switch (platformType.integerValue) {
        case 0:
            [self clientYetFax:SSDKPlatformSubTypeQQFriend title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 1:		
            [self clientYetFax:SSDKPlatformSubTypeQZone title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 2:
            [self clientYetFax:SSDKPlatformSubTypeWechatSession title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 3:
            [self clientYetFax:SSDKPlatformSubTypeWechatTimeline title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 4:{
            [self clientYetFax:SSDKPlatformTypeDouyin title:title text:text images:images url:url type:SSDKContentTypeImage];
            break;
        }
        case 5:
            [self koreanBreakingNibblesOlympusNetIteration:title contents:text groupLabelId:groupLabelId hashtagIds:hashtagIds footerImages:footerImages failUrl:failUrl backUrl:backUrl];
            break;
        default:
            break;
    }
}




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

    

    

    

    

    NSMutableDictionary *shareParams = [NSMutableDictionary dictionary];
    [shareParams SSDKSetupShareParamsByText:text
                                     images:images
                                        url:url
                                      title:title
                                       type:type];
    
    [ShareSDK share:platformType parameters:shareParams 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)koreanBreakingNibblesOlympusNetIteration:(NSString *)title
                            contents:(NSString *)contents
                        groupLabelId:(NSString *)groupLabelId
                          hashtagIds:(NSString *)hashtagIds
                        footerImages:(NSArray *)footerImages
                             failUrl:(NSString *)failUrl
                             backUrl:(NSString *)backUrl {
    
    






    
    
    
    TapTapShareObj *obj = [[TapTapShareObj alloc] initWithTitle:title contents:contents groupLabelId:groupLabelId hashtagIds:hashtagIds footerImages:footerImages failUrl:failUrl backUrl:backUrl];
    [TapTapShare share:obj completion:^(NSInteger result)  {
        
        if (result == 0) {
            if (shareCallback)shareCallback(YES,@"");
        }else if (result == -1) {
            if (shareCallback)shareCallback(NO,@"");
        }
    }];
}

@end
