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

import NitroModules

/// See ``HybridCameraDepthFrameOutputSpec``
public protocol HybridCameraDepthFrameOutputSpec_protocol: HybridObject, HybridCameraOutputSpec_protocol {
  // Properties
  var thread: (any HybridNativeThreadSpec) { get }

  // Methods
  func setOnDepthFrameCallback(onDepthFrame: ((_ depth: (any HybridDepthSpec)) -> Bool)?) throws -> Void
  func setOnDepthFrameDroppedCallback(onDepthFrameDropped: ((_ reason: FrameDroppedReason) -> Void)?) throws -> Void
}

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

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

/**
 * A Swift base-protocol representing the CameraDepthFrameOutput HybridObject.
 * Implement this protocol to create Swift-based instances of CameraDepthFrameOutput.
 * ```swift
 * class HybridCameraDepthFrameOutput : HybridCameraDepthFrameOutputSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridCameraDepthFrameOutputSpec = HybridCameraDepthFrameOutputSpec_protocol & HybridCameraDepthFrameOutputSpec_base
