//
//  LLQ_AppConfigs.swift
//  Scanner
//
//  Created by FastKey on 2021/7/13.
//
import UIKit

class LLQ_APPConfigs: NSObject {

    // Singleton
    static let shared = LLQ_APPConfigs()
    
    var GADSDKInited : Bool = false

    var showAd: Bool {
        get {
            return true
        }
    }
    
    var launchFreeC = false
}

// MARK: - Public methods
extension LLQ_APPConfigs {

    // MARK: - Class Methods
    public class func isPad() -> Bool {
        return UIDevice.current.userInterfaceIdiom == .pad
    }

    class func isFullScreen()-> Bool{
        if #available(iOS 11.0, *) {
            guard let keyWindow: UIWindow = UIApplication.shared.delegate!.window!  else {
                return false
            }
            let bottomSafeInset = keyWindow.safeAreaInsets.bottom
            if bottomSafeInset == 34.0 || bottomSafeInset == 21.0 {
                return true
            }
        }
        return false
    }

    class func isIphone5() -> Bool{
        guard SCREEN_W == 320 && SCREEN_H == 568  else {
            return false
        }
        return true
    }
    
    class func isIphone6() -> Bool{
        guard SCREEN_W == 375 && SCREEN_H == 667  else {
            return false
        }
        return true
    }



    class func getWindow() -> UIWindow {
        if let w = UIApplication.shared.delegate?.window, let window = w?.window {
            return window
        }
        return UIApplication.shared.keyWindow!
    }
   
}

