///
/// NotificationPermissionStatus.swift
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///

/**
 * Represents the JS union `NotificationPermissionStatus`, backed by a C++ enum.
 */
public typealias NotificationPermissionStatus = margelo.nitro.one.NotificationPermissionStatus

public extension NotificationPermissionStatus {
  /**
   * Get a NotificationPermissionStatus for the given String value, or
   * return `nil` if the given value was invalid/unknown.
   */
  init?(fromString string: String) {
    switch string {
      case "denied":
        self = .denied
      case "undetermined":
        self = .undetermined
      case "granted":
        self = .granted
      default:
        return nil
    }
  }

  /**
   * Get the String value this NotificationPermissionStatus represents.
   */
  var stringValue: String {
    switch self {
      case .denied:
        return "denied"
      case .undetermined:
        return "undetermined"
      case .granted:
        return "granted"
    }
  }
}
