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

import NitroModules

/// See ``HybridOneAdaptiveSpec``
public protocol HybridOneAdaptiveSpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func getInitialSizeClass() throws -> SizeClass
  func getInitialHinge() throws -> HingeState?
  func getSizeClass() throws -> Promise<SizeClass>
  func getHinge() throws -> Promise<HingeState?>
  func addSizeClassListener(listener: @escaping (_ sizeClass: SizeClass) -> Void) throws -> () -> Void
  func addHingeListener(listener: @escaping (_ hinge: HingeState?) -> Void) throws -> () -> Void
}

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

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

/**
 * A Swift base-protocol representing the OneAdaptive HybridObject.
 * Implement this protocol to create Swift-based instances of OneAdaptive.
 * ```swift
 * class HybridOneAdaptive : HybridOneAdaptiveSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridOneAdaptiveSpec = HybridOneAdaptiveSpec_protocol & HybridOneAdaptiveSpec_base
