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

import NitroModules

/// See ``HybridOnePrintSpec``
public protocol HybridOnePrintSpec_protocol: HybridObject {
  // Properties


  // Methods
  func isAvailable() throws -> Promise<Bool>
  func printPdf(fileUri: String, jobName: String?) throws -> Promise<PrintResult>
}

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

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

/**
 * A Swift base-protocol representing the OnePrint HybridObject.
 * Implement this protocol to create Swift-based instances of OnePrint.
 * ```swift
 * class HybridOnePrint : HybridOnePrintSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridOnePrintSpec = HybridOnePrintSpec_protocol & HybridOnePrintSpec_base
