





#import "AssumeProvideFlagPauseNotify.h"
@import Network;

static NSString *barPenLaterFor = nil;
static nw_path_monitor_t cupMakerCapHas = NULL;

@implementation AssumeProvideFlagPauseNotify

+ (BOOL)upsideAgeSignModuleBits {
    return barPenLaterFor != nil;
}

+ (NSString *)changePubTabType {
    return barPenLaterFor ?: @"none";
}

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

@end
