





#import "SinAbsoluteCopperFreeLinearly.h"
@import Network;

static NSString *twoAgeSleepWet = nil;
static nw_path_monitor_t kitPickCostPop = NULL;

@implementation SinAbsoluteCopperFreeLinearly

+ (BOOL)airPointSheExpandedAltimeter {
    return twoAgeSleepWet != nil;
}

+ (NSString *)boxSyntheticType {
    return twoAgeSleepWet ?: @"none";
}

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

@end
