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

import Foundation
import NitroModules

/// See ``HybridVideoPlayerSourceFactorySpec``
public protocol HybridVideoPlayerSourceFactorySpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func fromUri(uri: String) throws -> (any HybridVideoPlayerSourceSpec)
  func fromVideoConfig(config: NativeVideoConfig) throws -> (any HybridVideoPlayerSourceSpec)
}

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

/**
 * A Swift base-protocol representing the VideoPlayerSourceFactory HybridObject.
 * Implement this protocol to create Swift-based instances of VideoPlayerSourceFactory.
 * ```swift
 * class HybridVideoPlayerSourceFactory : HybridVideoPlayerSourceFactorySpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridVideoPlayerSourceFactorySpec = HybridVideoPlayerSourceFactorySpec_protocol & HybridVideoPlayerSourceFactorySpec_base
