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

import NitroModules

/// See ``HybridNativeThreadFactorySpec``
public protocol HybridNativeThreadFactorySpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func createNativeThread(name: String) throws -> (any HybridNativeThreadSpec)
}

public extension HybridNativeThreadFactorySpec_protocol {
  /// Default implementation of ``HybridObject.toString``
  func toString() -> String {
    return "[HybridObject NativeThreadFactory]"
  }
}

/// See ``HybridNativeThreadFactorySpec``
open class HybridNativeThreadFactorySpec_base {
  private weak var cxxWrapper: HybridNativeThreadFactorySpec_cxx? = nil
  public init() { }
  public func getCxxWrapper() -> HybridNativeThreadFactorySpec_cxx {
  #if DEBUG
    guard self is any HybridNativeThreadFactorySpec else {
      fatalError("`self` is not a `HybridNativeThreadFactorySpec`! Did you accidentally inherit from `HybridNativeThreadFactorySpec_base` instead of `HybridNativeThreadFactorySpec`?")
    }
  #endif
    if let cxxWrapper = self.cxxWrapper {
      return cxxWrapper
    } else {
      let cxxWrapper = HybridNativeThreadFactorySpec_cxx(self as! any HybridNativeThreadFactorySpec)
      self.cxxWrapper = cxxWrapper
      return cxxWrapper
    }
  }
}

/**
 * A Swift base-protocol representing the NativeThreadFactory HybridObject.
 * Implement this protocol to create Swift-based instances of NativeThreadFactory.
 * ```swift
 * class HybridNativeThreadFactory : HybridNativeThreadFactorySpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridNativeThreadFactorySpec = HybridNativeThreadFactorySpec_protocol & HybridNativeThreadFactorySpec_base
