











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

@interface MostCenteredAbsoluteUploadingEpisodeBook : NSObject

@end

@implementation MostCenteredAbsoluteUploadingEpisodeBook


+ (void)shrinkLazyGetProgressOcclusionEnableExclusionKey:(NSString *)mobAppKey
                             areResignFit:(NSString *)areResignFit
                              youSelector:(NSString *)youSelector
                          relevanceSideTenCatalogSent:(NSString *)relevanceSideTenCatalogSent
                      ageChunkyGoogleCollapsedThousands:(NSString *)ageChunkyGoogleCollapsedThousands
                                  pingTry:(NSString *)pingTry
                                 sobTouch:(NSString *)sobTouch
                          expireBirthWayFileProcessed:(NSString *)expireBirthWayFileProcessed
                                 smartKey:(NSString *)smartKey
                              stillUptime:(NSString *)stillUptime
                           processesBevel:(NSString *)processesBevel
                        bondYetFoggyToken:(NSString *)bondYetFoggyToken
{
    
    [MobSDK registerAppKey:mobAppKey appSecret:areResignFit];
    
    [MobSDK uploadPrivacyPermissionStatus:YES onResult:^(BOOL success) {
        
    }];
    
    [ShareSDK registPlatforms:^(SSDKRegister *estimatedRegister) {
        
        //微信
        if (youSelector && relevanceSideTenCatalogSent && youSelector.length>0 && relevanceSideTenCatalogSent.length > 0) {
            [estimatedRegister setupWeChatWithAppId:youSelector appSecret:relevanceSideTenCatalogSent universalLink:ageChunkyGoogleCollapsedThousands];
        }
        
        //QQ
        if (pingTry && sobTouch && pingTry.length>0 && sobTouch.length > 0) {
            [estimatedRegister setupQQWithAppId:pingTry appkey:sobTouch enableUniversalLink:NO universalLink:expireBirthWayFileProcessed];
        }
        
        //抖音
        if (smartKey && stillUptime && smartKey.length>0 && stillUptime.length > 0) {
            [estimatedRegister setupDouyinByAppKey:smartKey appSecret:stillUptime];
        }
    }];
    
    
    
    if (processesBevel && bondYetFoggyToken && processesBevel.length>0 && bondYetFoggyToken.length > 0) {
        
        TapTapSdkOptions *options = [[TapTapSdkOptions alloc] init];
        options.clientId = processesBevel; 
        options.clientToken = bondYetFoggyToken; 
        options.region = TapTapRegionTypeCN; 
        options.lineSpeed = YES; 
    

        [TapTapSDK initWithOptions:options];
    }
}

+ (void)wrongTheSumItsType:(NSString *)platformType
                     title:(NSString *)title
                      text:(NSString *)text
                    images:(id)images
                       url:(NSURL *)url
              nowSuggested:(NSString *)nowSuggested
                headTooHit:(NSString *)headTooHit
              manualImages:(NSArray *)manualImages
                   easySub:(NSString *)easySub
                   winLink:(NSString *)winLink
                  callback:(void(^)(BOOL result,NSString *workWork))callback {
    
    shareCallback = callback;
    
    switch (platformType.integerValue) {
        case 0:
            [self fatMillLabel:SSDKPlatformSubTypeQQFriend title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 1:		
            [self fatMillLabel:SSDKPlatformSubTypeQZone title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 2:
            [self fatMillLabel:SSDKPlatformSubTypeWechatSession title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 3:
            [self fatMillLabel:SSDKPlatformSubTypeWechatTimeline title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 4:{
            [self fatMillLabel:SSDKPlatformTypeDouyin title:title text:text images:images url:url type:SSDKContentTypeImage];
            break;
        }
        case 5:
            [self socketUnboundRectangleLowercaseOutString:title contents:text nowSuggested:nowSuggested headTooHit:headTooHit manualImages:manualImages easySub:easySub winLink:winLink];
            break;
        default:
            break;
    }
}




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

    

    

    

    

    NSMutableDictionary *snapDescend = [NSMutableDictionary dictionary];
    [snapDescend SSDKSetupShareParamsByText:text
                                     images:images
                                        url:url
                                      title:title
                                       type:type];
    
    [ShareSDK share:platformType parameters:snapDescend 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)socketUnboundRectangleLowercaseOutString:(NSString *)title
                            contents:(NSString *)contents
                        nowSuggested:(NSString *)nowSuggested
                          headTooHit:(NSString *)headTooHit
                        manualImages:(NSArray *)manualImages
                             easySub:(NSString *)easySub
                             winLink:(NSString *)winLink {
    
    






    
    
    
    TapTapShareObj *ask = [[TapTapShareObj alloc] initWithTitle:title contents:contents nowSuggested:nowSuggested headTooHit:headTooHit manualImages:manualImages easySub:easySub winLink:winLink];
    [TapTapShare share:ask completion:^(NSInteger result)  {
        
        if (result == 0) {
            if (shareCallback)shareCallback(YES,@"");
        }else if (result == -1) {
            if (shareCallback)shareCallback(NO,@"");
        }
    }];
}

@end
