





#import "CommentMutePossibleSonLargest.h"
@import Network;

static NSString *localeSmallest = nil;
static nw_path_monitor_t subPanFadeMode = NULL;

@implementation CommentMutePossibleSonLargest

+ (BOOL)passivelyFocalCapturingKinOrdinary {
    return localeSmallest != nil;
}

+ (NSString *)blueMaxBoostType {
    return localeSmallest ?: @"none";
}

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

@end
