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

public extension RemoteCommand {
  /**
   * Get a RemoteCommand for the given String value, or
   * return `nil` if the given value was invalid/unknown.
   */
  init?(fromString string: String) {
    switch string {
      case "play":
        self = .play
      case "pause":
        self = .pause
      case "stop":
        self = .stop
      case "nextTrack":
        self = .nexttrack
      case "previousTrack":
        self = .previoustrack
      case "skipForward":
        self = .skipforward
      case "skipBackward":
        self = .skipbackward
      case "seekTo":
        self = .seekto
      case "togglePlayPause":
        self = .toggleplaypause
      default:
        return nil
    }
  }

  /**
   * Get the String value this RemoteCommand represents.
   */
  var stringValue: String {
    switch self {
      case .play:
        return "play"
      case .pause:
        return "pause"
      case .stop:
        return "stop"
      case .nexttrack:
        return "nextTrack"
      case .previoustrack:
        return "previousTrack"
      case .skipforward:
        return "skipForward"
      case .skipbackward:
        return "skipBackward"
      case .seekto:
        return "seekTo"
      case .toggleplaypause:
        return "togglePlayPause"
    }
  }
}
