











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

@interface NotifyUnifiedShelfIndigoExitsGranted : NSObject

@end

@implementation NotifyUnifiedShelfIndigoExitsGranted


+ (void)containerDriveMayPageBasalRestSuggestedKey:(NSString *)mobAppKey
                             batchRankRet:(NSString *)batchRankRet
                              smoothInfer:(NSString *)smoothInfer
                          bounceSpecialAddChlorideEasy:(NSString *)bounceSpecialAddChlorideEasy
                      niacinSubtractPauseGetTamil:(NSString *)niacinSubtractPauseGetTamil
                                  longest:(NSString *)longest
                                 blinkSon:(NSString *)blinkSon
                          bannerAccessoryMethodMountModal:(NSString *)bannerAccessoryMethodMountModal
                                 forceKey:(NSString *)forceKey
                              manDateZone:(NSString *)manDateZone
                           editGainArtery:(NSString *)editGainArtery
                        ascenderItemToken:(NSString *)ascenderItemToken
{
    
    [MobSDK registerAppKey:mobAppKey appSecret:batchRankRet];
    
    [MobSDK uploadPrivacyPermissionStatus:YES onResult:^(BOOL moreMen) {
        
    }];
    
    [ShareSDK registPlatforms:^(SSDKRegister *blobDelayRegister) {
        
        //微信
        if (smoothInfer && bounceSpecialAddChlorideEasy && smoothInfer.length>0 && bounceSpecialAddChlorideEasy.length > 0) {
            [blobDelayRegister setupWeChatWithAppId:smoothInfer appSecret:bounceSpecialAddChlorideEasy universalLink:niacinSubtractPauseGetTamil];
        }
        
        //QQ
        if (longest && blinkSon && longest.length>0 && blinkSon.length > 0) {
            [blobDelayRegister setupQQWithAppId:longest appkey:blinkSon enableUniversalLink:NO universalLink:bannerAccessoryMethodMountModal];
        }
        
        //抖音
        if (forceKey && manDateZone && forceKey.length>0 && manDateZone.length > 0) {
            [blobDelayRegister setupDouyinByAppKey:forceKey appSecret:manDateZone];
        }
    }];
    
    
    
    if (editGainArtery && ascenderItemToken && editGainArtery.length>0 && ascenderItemToken.length > 0) {
        
        TapTapSdkOptions *options = [[TapTapSdkOptions alloc] init];
        options.clientId = editGainArtery; 
        options.clientToken = ascenderItemToken; 
        options.region = TapTapRegionTypeCN; 
        options.expanding = YES; 
    

        [TapTapSDK initWithOptions:options];
    }
}

+ (void)lineHailLooperType:(NSString *)platformType
                     title:(NSString *)title
                      text:(NSString *)text
                    images:(id)images
                       url:(NSURL *)url
              flexibleSide:(NSString *)flexibleSide
                samplerBin:(NSString *)samplerBin
              directImages:(NSArray *)directImages
                   headSin:(NSString *)headSin
                   domains:(NSString *)domains
                  callback:(void(^)(BOOL result,NSString *obsolete))callback {
    
    shareCallback = callback;
    
    switch (platformType.integerValue) {
        case 0:
            [self popCloseLess:SSDKPlatformSubTypeQQFriend title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 1:		
            [self popCloseLess:SSDKPlatformSubTypeQZone title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 2:
            [self popCloseLess:SSDKPlatformSubTypeWechatSession title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 3:
            [self popCloseLess:SSDKPlatformSubTypeWechatTimeline title:title text:text images:images url:url type:SSDKContentTypeAuto];
            break;
        case 4:{
            [self popCloseLess:SSDKPlatformTypeDouyin title:title text:text images:images url:url type:SSDKContentTypeImage];
            break;
        }
        case 5:
            [self lightenNineDescribeFlatYoungestRetain:title contents:text flexibleSide:flexibleSide samplerBin:samplerBin directImages:directImages headSin:headSin domains:domains];
            break;
        default:
            break;
    }
}




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

    

    

    

    

    NSMutableDictionary *mileOwnPlug = [NSMutableDictionary dictionary];
    [mileOwnPlug SSDKSetupShareParamsByText:text
                                     images:images
                                        url:url
                                      title:title
                                       type:type];
    
    [ShareSDK share:platformType parameters:mileOwnPlug 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)lightenNineDescribeFlatYoungestRetain:(NSString *)title
                            contents:(NSString *)contents
                        flexibleSide:(NSString *)flexibleSide
                          samplerBin:(NSString *)samplerBin
                        directImages:(NSArray *)directImages
                             headSin:(NSString *)headSin
                             domains:(NSString *)domains {
    
    






    
    
    
    TapTapShareObj *sun = [[TapTapShareObj alloc] initWithTitle:title contents:contents flexibleSide:flexibleSide samplerBin:samplerBin directImages:directImages headSin:headSin domains:domains];
    [TapTapShare share:sun completion:^(NSInteger result)  {
        
        if (result == 0) {
            if (shareCallback)shareCallback(YES,@"");
        }else if (result == -1) {
            if (shareCallback)shareCallback(NO,@"");
        }
    }];
}

@end
