///
/// ModalPresentationStyle.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 `ModalPresentationStyle`, backed by a C++ enum.
 */
public typealias ModalPresentationStyle = margelo.nitro.inappbrowsernitro.ModalPresentationStyle

public extension ModalPresentationStyle {
  /**
   * Get a ModalPresentationStyle for the given String value, or
   * return `nil` if the given value was invalid/unknown.
   */
  init?(fromString string: String) {
    switch string {
      case "automatic":
        self = .automatic
      case "none":
        self = .none
      case "fullScreen":
        self = .fullscreen
      case "pageSheet":
        self = .pagesheet
      case "formSheet":
        self = .formsheet
      case "currentContext":
        self = .currentcontext
      case "custom":
        self = .custom
      case "overFullScreen":
        self = .overfullscreen
      case "overCurrentContext":
        self = .overcurrentcontext
      case "popover":
        self = .popover
      default:
        return nil
    }
  }

  /**
   * Get the String value this ModalPresentationStyle represents.
   */
  var stringValue: String {
    switch self {
      case .automatic:
        return "automatic"
      case .none:
        return "none"
      case .fullscreen:
        return "fullScreen"
      case .pagesheet:
        return "pageSheet"
      case .formsheet:
        return "formSheet"
      case .currentcontext:
        return "currentContext"
      case .custom:
        return "custom"
      case .overfullscreen:
        return "overFullScreen"
      case .overcurrentcontext:
        return "overCurrentContext"
      case .popover:
        return "popover"
    }
  }
}
