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

import NitroModules

/// See ``HybridMediaItemFactorySpec``
public protocol HybridMediaItemFactorySpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func create(config: MediaItemConfig) throws -> (any HybridMediaItemSpec)
  func fromUri(uri: String) throws -> (any HybridMediaItemSpec)
}

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

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

/**
 * A Swift base-protocol representing the MediaItemFactory HybridObject.
 * Implement this protocol to create Swift-based instances of MediaItemFactory.
 * ```swift
 * class HybridMediaItemFactory : HybridMediaItemFactorySpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridMediaItemFactorySpec = HybridMediaItemFactorySpec_protocol & HybridMediaItemFactorySpec_base
