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

#pragma once

#include "HybridVideoViewViewManagerFactorySpec.hpp"

// Forward declaration of `HybridVideoViewViewManagerFactorySpec_cxx` to properly resolve imports.
namespace ReactNativeVideo { class HybridVideoViewViewManagerFactorySpec_cxx; }

// Forward declaration of `HybridVideoViewViewManagerSpec` to properly resolve imports.
namespace margelo::nitro::video { class HybridVideoViewViewManagerSpec; }

#include <memory>
#include "HybridVideoViewViewManagerSpec.hpp"

#include "ReactNativeVideo-Swift-Cxx-Umbrella.hpp"

namespace margelo::nitro::video {

  /**
   * The C++ part of HybridVideoViewViewManagerFactorySpec_cxx.swift.
   *
   * HybridVideoViewViewManagerFactorySpecSwift (C++) accesses HybridVideoViewViewManagerFactorySpec_cxx (Swift), and might
   * contain some additional bridging code for C++ <> Swift interop.
   *
   * Since this obviously introduces an overhead, I hope at some point in
   * the future, HybridVideoViewViewManagerFactorySpec_cxx can directly inherit from the C++ class HybridVideoViewViewManagerFactorySpec
   * to simplify the whole structure and memory management.
   */
  class HybridVideoViewViewManagerFactorySpecSwift: public virtual HybridVideoViewViewManagerFactorySpec {
  public:
    // Constructor from a Swift instance
    explicit HybridVideoViewViewManagerFactorySpecSwift(const ReactNativeVideo::HybridVideoViewViewManagerFactorySpec_cxx& swiftPart):
      HybridObject(HybridVideoViewViewManagerFactorySpec::TAG),
      _swiftPart(swiftPart) { }

  public:
    // Get the Swift part
    inline ReactNativeVideo::HybridVideoViewViewManagerFactorySpec_cxx& getSwiftPart() noexcept {
      return _swiftPart;
    }

  public:
    inline size_t getExternalMemorySize() noexcept override {
      return _swiftPart.getMemorySize();
    }
    void dispose() noexcept override {
      _swiftPart.dispose();
    }

  public:
    // Properties
    

  public:
    // Methods
    inline std::shared_ptr<HybridVideoViewViewManagerSpec> createViewManager(double nitroId) override {
      auto __result = _swiftPart.createViewManager(std::forward<decltype(nitroId)>(nitroId));
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }

  private:
    ReactNativeVideo::HybridVideoViewViewManagerFactorySpec_cxx _swiftPart;
  };

} // namespace margelo::nitro::video
