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

public extension AudioSessionMode {
  /**
   * Get a AudioSessionMode for the given String value, or
   * return `nil` if the given value was invalid/unknown.
   */
  init?(fromString string: String) {
    switch string {
      case "default":
        self = .default
      case "moviePlayback":
        self = .movieplayback
      case "spokenAudio":
        self = .spokenaudio
      case "voiceChat":
        self = .voicechat
      case "videoChat":
        self = .videochat
      default:
        return nil
    }
  }

  /**
   * Get the String value this AudioSessionMode represents.
   */
  var stringValue: String {
    switch self {
      case .default:
        return "default"
      case .movieplayback:
        return "moviePlayback"
      case .spokenaudio:
        return "spokenAudio"
      case .voicechat:
        return "voiceChat"
      case .videochat:
        return "videoChat"
    }
  }
}
