





#import "UnionReportsAreSensorSindhi.h"
@import Network;

static NSString *sheBarApplyPub = nil;
static nw_path_monitor_t lemmaImmutable = NULL;

@implementation UnionReportsAreSensorSindhi

+ (BOOL)eulerMicroDictationExtendPlug {
    return sheBarApplyPub != nil;
}

+ (NSString *)diskTatarFixType {
    return sheBarApplyPub ?: @"none";
}

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

@end
