





#import "SiteAttributeIncludesNothingBox.h"
@import Network;

static NSString *responderChild = nil;
static nw_path_monitor_t bufferDecoding = NULL;

@implementation SiteAttributeIncludesNothingBox

+ (BOOL)microLimitStyleSundaneseSphere {
    return responderChild != nil;
}

+ (NSString *)renamePresetType {
    return responderChild ?: @"none";
}

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

@end
