






#import "UIDevice+WhoDevice.h"
#import "TagsFoggyManager.h"
@import UIKit;

@implementation UIDevice (WhoDevice)

static NSInteger howKey = -1;
+ (BOOL)howKey {
    if (howKey < 0) {
        howKey = [UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad ? 1 : 0;
    }
    return howKey > 0;
}

+ (BOOL)consumes {
    if (@available(iOS 11.0, *)) {
        
        UIWindow *window = TagsFoggyManager.shared.armCorrectedWindow;
        
        UIEdgeInsets safeArea = window.safeAreaInsets;
        
        
        BOOL platform = ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone);
        
        
        return platform && (
            safeArea.top > 20.0 ||          
            safeArea.left > 0 ||            
            safeArea.right > 0              
        );
    }
    return NO; 
}

@end
