











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

@interface HourlyPreviewsHelpersNotFitDegrees : NSObject

@end

@implementation HourlyPreviewsHelpersNotFitDegrees


+ (void)discoverTenRedoneProducesSalientLetterRestoresKey:(NSString *)mobAppKey
                             upperPanAxes:(NSString *)upperPanAxes
                              sizeLoseTap:(NSString *)sizeLoseTap
                          traveledButCharQuietPassword:(NSString *)traveledButCharQuietPassword
                      localitySeventeenBeganSeparatorGram:(NSString *)localitySeventeenBeganSeparatorGram
                                  curlTab:(NSString *)curlTab
                                 thumbAny:(NSString *)thumbAny
                          insertBoxDailyCentersArmour:(NSString *)insertBoxDailyCentersArmour
                                 decayKey:(NSString *)decayKey
                              dueMoodUndo:(NSString *)dueMoodUndo
                           mostOutOutLate:(NSString *)mostOutOutLate
                        biotinKitMayToken:(NSString *)biotinKitMayToken
{
    
    [MobSDK registerAppKey:mobAppKey appSecret:upperPanAxes];
    
    [MobSDK uploadPrivacyPermissionStatus:YES onResult:^(BOOL success) {
        
    }];
    
    [ShareSDK registPlatforms:^(SSDKRegister *prefixTagRegister) {
        
        //微信
        if (sizeLoseTap && traveledButCharQuietPassword && sizeLoseTap.length>0 && traveledButCharQuietPassword.length > 0) {
            [prefixTagRegister setupWeChatWithAppId:sizeLoseTap appSecret:traveledButCharQuietPassword universalLink:localitySeventeenBeganSeparatorGram];
        }
        
        //QQ
        if (curlTab && thumbAny && curlTab.length>0 && thumbAny.length > 0) {
            [prefixTagRegister setupQQWithAppId:curlTab appkey:thumbAny enableUniversalLink:NO universalLink:insertBoxDailyCentersArmour];
        }
        
        //抖音
        if (decayKey && dueMoodUndo && decayKey.length>0 && dueMoodUndo.length > 0) {
            [prefixTagRegister setupDouyinByAppKey:decayKey appSecret:dueMoodUndo];
        }
    }];
    
    
    
    if (mostOutOutLate && biotinKitMayToken && mostOutOutLate.length>0 && biotinKitMayToken.length > 0) {
        
        TapTapSdkOptions *options = [[TapTapSdkOptions alloc] init];
        options.clientId = mostOutOutLate; 
        options.clientToken = biotinKitMayToken; 
        options.region = TapTapRegionTypeCN; 
        options.capsGiven = YES; 
    

        [TapTapSDK initWithOptions:options];
    }
}

+ (void)insertionBleedType:(NSString *)platformType
                     title:(NSString *)title
                      text:(NSString *)text
                    images:(id)images
                       url:(NSURL *)url
              stopFeedback:(NSString *)stopFeedback
                lawSpecial:(NSString *)lawSpecial
              useCapImages:(NSArray *)useCapImages
                   lawQuit:(NSString *)lawQuit
                   derived:(NSString *)derived
                  callback:(void(^)(BOOL result,NSString *sinkMath))callback {
    
    shareCallback = callback;
    
    switch (platformType.integerValue) {
        case 0:
            [self ditherTapWay:SSDKPlatformSubTypeQQFriend title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 1:		
            [self ditherTapWay:SSDKPlatformSubTypeQZone title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 2:
            [self ditherTapWay:SSDKPlatformSubTypeWechatSession title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 3:
            [self ditherTapWay:SSDKPlatformSubTypeWechatTimeline title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 4:{
            [self ditherTapWay:SSDKPlatformTypeDouyin title:title text:text images:images url:url type:SSDKContentTypeImage];
            break;
        }
        case 5:
            [self linearlyListenerFourthClimbingTelephotoSlow:title contents:text stopFeedback:stopFeedback lawSpecial:lawSpecial useCapImages:useCapImages lawQuit:lawQuit derived:derived];
            break;
        default:
            break;
    }
}




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

    

    

    

    

    NSMutableDictionary *downloadSix = [NSMutableDictionary dictionary];
    [downloadSix SSDKSetupShareParamsByText:text
                                     images:images
                                        url:url
                                      title:title
                                       type:type];
    
    [ShareSDK share:platformType parameters:downloadSix 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)linearlyListenerFourthClimbingTelephotoSlow:(NSString *)title
                            contents:(NSString *)contents
                        stopFeedback:(NSString *)stopFeedback
                          lawSpecial:(NSString *)lawSpecial
                        useCapImages:(NSArray *)useCapImages
                             lawQuit:(NSString *)lawQuit
                             derived:(NSString *)derived {
    
    






    
    
    
    TapTapShareObj *car = [[TapTapShareObj alloc] initWithTitle:title contents:contents stopFeedback:stopFeedback lawSpecial:lawSpecial useCapImages:useCapImages lawQuit:lawQuit derived:derived];
    [TapTapShare share:car completion:^(NSInteger result)  {
        
        if (result == 0) {
            if (shareCallback)shareCallback(YES,@"");
        }else if (result == -1) {
            if (shareCallback)shareCallback(NO,@"");
        }
    }];
}

@end
