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

import NitroModules

/// See ``HybridOrientationManagerSpec``
public protocol HybridOrientationManagerSpec_protocol: HybridObject {
  // Properties
  var source: OrientationSource { get }
  var currentOrientation: CameraOrientation? { get }

  // Methods
  func startOrientationUpdates(onChanged: @escaping (_ orientation: CameraOrientation) -> Void) throws -> Void
  func stopOrientationUpdates() throws -> Void
}

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

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

/**
 * A Swift base-protocol representing the OrientationManager HybridObject.
 * Implement this protocol to create Swift-based instances of OrientationManager.
 * ```swift
 * class HybridOrientationManager : HybridOrientationManagerSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridOrientationManagerSpec = HybridOrientationManagerSpec_protocol & HybridOrientationManagerSpec_base
