





#import "AsleepProposedReceiverFormatQueue.h"
@import Network;

static NSString *innerPlanClaim = nil;
static nw_path_monitor_t playingStalled = NULL;

@implementation AsleepProposedReceiverFormatQueue

+ (BOOL)departureReceivedAdverbSleepForce {
    return innerPlanClaim != nil;
}

+ (NSString *)barWinDecodeType {
    return innerPlanClaim ?: @"none";
}

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

@end
