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

public extension ExposureMode {
  /**
   * Get a ExposureMode for the given String value, or
   * return `nil` if the given value was invalid/unknown.
   */
  init?(fromString string: String) {
    switch string {
      case "locked":
        self = .locked
      case "auto-exposure":
        self = .autoExposure
      case "continuous-auto-exposure":
        self = .continuousAutoExposure
      case "custom":
        self = .custom
      default:
        return nil
    }
  }

  /**
   * Get the String value this ExposureMode represents.
   */
  var stringValue: String {
    switch self {
      case .locked:
        return "locked"
      case .autoExposure:
        return "auto-exposure"
      case .continuousAutoExposure:
        return "continuous-auto-exposure"
      case .custom:
        return "custom"
    }
  }
}
