






#import "UIDevice+CupDevice.h"
#import "ChunkyGetManager.h"
@import UIKit;

@implementation UIDevice (CupDevice)

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

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

@end
