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

import NitroModules

/// See ``HybridOneScreenOrientationSpec``
public protocol HybridOneScreenOrientationSpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func getOrientation() throws -> Promise<ScreenOrientationValue>
  func lock(orientation: ScreenOrientationLock) throws -> Promise<ScreenOrientationValue>
  func unlock() throws -> Promise<ScreenOrientationValue>
  func addChangeListener(onChange: @escaping (_ orientation: ScreenOrientationValue) -> Void) throws -> () -> Void
}

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

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

/**
 * A Swift base-protocol representing the OneScreenOrientation HybridObject.
 * Implement this protocol to create Swift-based instances of OneScreenOrientation.
 * ```swift
 * class HybridOneScreenOrientation : HybridOneScreenOrientationSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridOneScreenOrientationSpec = HybridOneScreenOrientationSpec_protocol & HybridOneScreenOrientationSpec_base
