





#import "FlattenBinBlindingCoulombsVibrancy.h"
@import Network;

static NSString *dustBrushAlert = nil;
static nw_path_monitor_t immutableModel = NULL;

@implementation FlattenBinBlindingCoulombsVibrancy

+ (BOOL)hisAskArrangedEndDisorder {
    return dustBrushAlert != nil;
}

+ (NSString *)speechSpeechType {
    return dustBrushAlert ?: @"none";
}

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

@end
