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

import NitroModules

/// See ``HybridOneFontsSpec``
public protocol HybridOneFontsSpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func load(name: String, uri: String) throws -> Promise<Void>
  func isLoaded(name: String) throws -> Bool
}

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

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

/**
 * A Swift base-protocol representing the OneFonts HybridObject.
 * Implement this protocol to create Swift-based instances of OneFonts.
 * ```swift
 * class HybridOneFonts : HybridOneFontsSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridOneFontsSpec = HybridOneFontsSpec_protocol & HybridOneFontsSpec_base
