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

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

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

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