//
//  PMKeepListAlert.swift
//  PhoneManager
//
//  Created by edy on 2025/5/21.
//

import UIKit

class PMKeepListAlert: UIViewController {

    var CallBlock:(()->Void)?
    
    class var isHint:Bool{
        set {
            UserDefaults.standard.set(newValue, forKey: "PMKeepListAlertKey")
            UserDefaults.standard.synchronize()
        }
        get{
            return UserDefaults.standard.object(forKey: "PMKeepListAlertKey") as? Bool ?? false
        }
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = .clear
    }

    @IBAction func sureActions(_ sender: Any) {
        guard let call = CallBlock else { return  }
        call()
        self.dismiss(animated: true)
    }
    
    func show(_ call:@escaping (()->Void)) -> Void {
        CallBlock = call
        self.modalPresentationStyle = .overFullScreen
        cWindow?.rootViewController?.present(self, animated: true)
    }
    
}
