//
//  EmailSaveController.swift
//  PhoneManager
//
//  Created by edy on 2025/5/12.
//

import UIKit

class EmailSaveController: UIViewController {

    enum SuccessfromState {
    case keyword
    case signout
    case success
    }
    
    var state:SuccessfromState = .keyword
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor.colorWithHex(hexStr: "#000000", alpha: 0.5)
    }

    @IBOutlet weak var messageBox: UILabel!
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        switch state {
        case .keyword:
            messageBox.text = "Keyword saved"
            messageBox.textColor = UIColor.colorWithHex(hexStr: "#666666")
        case .signout:
            messageBox.text = "Exit successfully"
            messageBox.textColor = .black
        case .success:
            messageBox.text = "complete"
            messageBox.textColor = .black
        }
    }
    
}
