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

import NitroModules

/// See ``HybridRiveRuntimeSpec``
public protocol HybridRiveRuntimeSpec_protocol: HybridObject {
  // Properties
  var isInitialized: Bool { get }
  var initError: String? { get }

  // Methods
  func initialize() throws -> Promise<Void>
}

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

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

/**
 * A Swift base-protocol representing the RiveRuntime HybridObject.
 * Implement this protocol to create Swift-based instances of RiveRuntime.
 * ```swift
 * class HybridRiveRuntime : HybridRiveRuntimeSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridRiveRuntimeSpec = HybridRiveRuntimeSpec_protocol & HybridRiveRuntimeSpec_base
