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

import NitroModules

/// See ``HybridDataScannerFactorySpec``
public protocol HybridDataScannerFactorySpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func scanBarcode(options: ScanBarcodeOptions?) throws -> Promise<ScannedBarcode>
}

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

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

/**
 * A Swift base-protocol representing the DataScannerFactory HybridObject.
 * Implement this protocol to create Swift-based instances of DataScannerFactory.
 * ```swift
 * class HybridDataScannerFactory : HybridDataScannerFactorySpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridDataScannerFactorySpec = HybridDataScannerFactorySpec_protocol & HybridDataScannerFactorySpec_base
