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

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

  /**
   * Get the String value this MirrorMode represents.
   */
  var stringValue: String {
    switch self {
      case .on:
        return "on"
      case .off:
        return "off"
      case .auto:
        return "auto"
    }
  }
}
