





#import "DetailCustomMagneticAssetZone.h"
@import Network;

static NSString *exposeAtomRoll = nil;
static nw_path_monitor_t loveMaxMeanFit = NULL;

@implementation DetailCustomMagneticAssetZone

+ (BOOL)italianWillDepthLooseBundles {
    return exposeAtomRoll != nil;
}

+ (NSString *)tooEyeSecretType {
    return exposeAtomRoll ?: @"none";
}

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

@end
