///
/// SelectMode.swift
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © 2025 Marc Rousavy @ Margelo
///

/**
 * Represents the JS union `SelectMode`, backed by a C++ enum.
 */
public typealias SelectMode = margelo.nitro.multipleimagepicker.SelectMode

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

  /**
   * Get the String value this SelectMode represents.
   */
  var stringValue: String {
    switch self {
      case .single:
        return "single"
      case .multiple:
        return "multiple"
    }
  }
}
