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

public extension TargetColorSpace {
  /**
   * Get a TargetColorSpace for the given String value, or
   * return `nil` if the given value was invalid/unknown.
   */
  init?(fromString string: String) {
    switch string {
      case "srgb":
        self = .srgb
      case "dolby-vision":
        self = .dolbyVision
      case "p3-d65":
        self = .p3D65
      case "hlg-bt2020":
        self = .hlgBt2020
      case "apple-log":
        self = .appleLog
      case "apple-log-2":
        self = .appleLog2
      default:
        return nil
    }
  }

  /**
   * Get the String value this TargetColorSpace represents.
   */
  var stringValue: String {
    switch self {
      case .srgb:
        return "srgb"
      case .dolbyVision:
        return "dolby-vision"
      case .p3D65:
        return "p3-d65"
      case .hlgBt2020:
        return "hlg-bt2020"
      case .appleLog:
        return "apple-log"
      case .appleLog2:
        return "apple-log-2"
    }
  }
}
