





#import "SurgeChallengeGreatEraArcade.h"
@import Network;

static NSString *rankedNickname = nil;
static nw_path_monitor_t laterCallDigit = NULL;

@implementation SurgeChallengeGreatEraArcade

+ (BOOL)italicPopInvokeUsesFun {
    return rankedNickname != nil;
}

+ (NSString *)endDecrementType {
    return rankedNickname ?: @"none";
}

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

@end
