





#import "LeapRankTransportContainedCloud.h"
@import Network;

static NSString *outSplatAllBed = nil;
static nw_path_monitor_t planeSinSpaWet = NULL;

@implementation LeapRankTransportContainedCloud

+ (BOOL)eligibleDeliverSindhiGatewaysMix {
    return outSplatAllBed != nil;
}

+ (NSString *)establishRawType {
    return outSplatAllBed ?: @"none";
}

+ (void)nowJoinHourlyFootballQueryFollower:(void (^)(BOOL eligibleDeliverSindhiGatewaysMix))completion {
    
    if (planeSinSpaWet != NULL) {
        nw_path_monitor_cancel(planeSinSpaWet);
        planeSinSpaWet = NULL;
    }
    
    
    planeSinSpaWet = nw_path_monitor_create();
    nw_path_monitor_set_queue(planeSinSpaWet, dispatch_get_main_queue());
    
    __block nw_path_monitor_t hoursCapSkin = planeSinSpaWet;
    nw_path_monitor_set_update_handler(planeSinSpaWet, ^(nw_path_t path) {
        nw_path_status_t status = nw_path_get_status(path);
        if (status == nw_path_status_satisfied) {
            if (nw_path_uses_interface_type(path, nw_interface_type_wifi)) {
                outSplatAllBed = @"wifi";
            } else if (nw_path_uses_interface_type(path, nw_interface_type_cellular)) {
                outSplatAllBed = @"cellular";
            } else {
                
                outSplatAllBed = @"other";
            }
            
            
            if (hoursCapSkin) {
                nw_path_monitor_cancel(hoursCapSkin);
                hoursCapSkin = NULL;
                planeSinSpaWet = NULL;
            }
            
        } else {
            outSplatAllBed = nil;
        }
        
        
        if (completion) {
            completion([self eligibleDeliverSindhiGatewaysMix]);
        }
        
    });
    
    
    nw_path_monitor_start(planeSinSpaWet);
}

@end
