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

import NitroModules

/**
 * Represents an instance of `onLoadStartData`, backed by a C++ struct.
 */
public typealias onLoadStartData = margelo.nitro.video.onLoadStartData

public extension onLoadStartData {
  private typealias bridge = margelo.nitro.video.bridge.swift

  /**
   * Create a new instance of `onLoadStartData`.
   */
  init(sourceType: SourceType, source: (any HybridVideoPlayerSourceSpec)) {
    self.init(sourceType, { () -> bridge.std__shared_ptr_HybridVideoPlayerSourceSpec_ in
      let __cxxWrapped = source.getCxxWrapper()
      return __cxxWrapped.getCxxPart()
    }())
  }

  var sourceType: SourceType {
    @inline(__always)
    get {
      return self.__sourceType
    }
    @inline(__always)
    set {
      self.__sourceType = newValue
    }
  }
  
  var source: (any HybridVideoPlayerSourceSpec) {
    @inline(__always)
    get {
      return { () -> HybridVideoPlayerSourceSpec in
        let __unsafePointer = bridge.get_std__shared_ptr_HybridVideoPlayerSourceSpec_(self.__source)
        let __instance = HybridVideoPlayerSourceSpec_cxx.fromUnsafe(__unsafePointer)
        return __instance.getHybridVideoPlayerSourceSpec()
      }()
    }
    @inline(__always)
    set {
      self.__source = { () -> bridge.std__shared_ptr_HybridVideoPlayerSourceSpec_ in
        let __cxxWrapped = newValue.getCxxWrapper()
        return __cxxWrapped.getCxxPart()
      }()
    }
  }
}
