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

import NitroModules

/// See ``HybridSourceProxySpec``
public protocol HybridSourceProxySpec_protocol: HybridObject {
  // Properties
  var bundleIdentifier: String { get }

  // Methods
  func toJSON(key: String?) throws -> Source
}

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

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

/**
 * A Swift base-protocol representing the SourceProxy HybridObject.
 * Implement this protocol to create Swift-based instances of SourceProxy.
 * ```swift
 * class HybridSourceProxy : HybridSourceProxySpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridSourceProxySpec = HybridSourceProxySpec_protocol & HybridSourceProxySpec_base
