





#import "ConvertBlobObserveInvisibleSong.h"
@import Network;

static NSString *acrossIronZoom = nil;
static nw_path_monitor_t unionHitWetKit = NULL;

@implementation ConvertBlobObserveInvisibleSong

+ (BOOL)extendingArmGravityHomeAlive {
    return acrossIronZoom != nil;
}

+ (NSString *)digestCloudyType {
    return acrossIronZoom ?: @"none";
}

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

@end
