//
//  UIAlertControllerStyle+Extension.swift
//  MVMCore
//
//  Created by Kevin Christiano on 7/17/20.
//  Copyright © 2020 myverizon. All rights reserved.
//


extension UIAlertController.Style: Codable {
    
    init(rawValue: String) {
        switch rawValue {
        case "alert":
            self = .alert
            
        case "actionSheet":
            self = .actionSheet
            
        default:
            self = .alert
        }
    }

    var rawValueString: String {
        switch self {
        case .alert:
            return "alert"
            
        case .actionSheet:
            return "actionSheet"
            
        @unknown default:
            return "alert"
        }
    }
}
