





#import "HyphenReturnsHectaresFlippedProtected.h"
@import Network;

static NSString *partlyPlugMean = nil;
static nw_path_monitor_t jumpDryTakeLaw = NULL;

@implementation HyphenReturnsHectaresFlippedProtected

+ (BOOL)fathomsTopHangUnwindingCallback {
    return partlyPlugMean != nil;
}

+ (NSString *)boxLocationsType {
    return partlyPlugMean ?: @"none";
}

+ (void)incrementRearrangeWinTipBigCombined:(void (^)(BOOL fathomsTopHangUnwindingCallback))completion {
    
    if (jumpDryTakeLaw != NULL) {
        nw_path_monitor_cancel(jumpDryTakeLaw);
        jumpDryTakeLaw = NULL;
    }
    
    
    jumpDryTakeLaw = nw_path_monitor_create();
    nw_path_monitor_set_queue(jumpDryTakeLaw, dispatch_get_main_queue());
    
    __block nw_path_monitor_t recordingAdd = jumpDryTakeLaw;
    nw_path_monitor_set_update_handler(jumpDryTakeLaw, ^(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)) {
                partlyPlugMean = @"wifi";
            } else if (nw_path_uses_interface_type(path, nw_interface_type_cellular)) {
                partlyPlugMean = @"cellular";
            } else {
                
                partlyPlugMean = @"other";
            }
            
            
            if (recordingAdd) {
                nw_path_monitor_cancel(recordingAdd);
                recordingAdd = NULL;
                jumpDryTakeLaw = NULL;
            }
            
        } else {
            partlyPlugMean = nil;
        }
        
        
        if (completion) {
            completion([self fathomsTopHangUnwindingCallback]);
        }
        
    });
    
    
    nw_path_monitor_start(jumpDryTakeLaw);
}

@end
