///
/// RNRive-Swift-Cxx-Bridge.cpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///

#include "RNRive-Swift-Cxx-Bridge.hpp"

// Include C++ implementation defined types
#include "HybridBindableArtboardSpecSwift.hpp"
#include "HybridFallbackFontSpecSwift.hpp"
#include "HybridRiveFileFactorySpecSwift.hpp"
#include "HybridRiveFileSpecSwift.hpp"
#include "HybridRiveFontConfigSpecSwift.hpp"
#include "HybridRiveImageFactorySpecSwift.hpp"
#include "HybridRiveImageSpecSwift.hpp"
#include "HybridRiveRuntimeSpecSwift.hpp"
#include "HybridRiveViewSpecSwift.hpp"
#include "HybridViewModelArtboardPropertySpecSwift.hpp"
#include "HybridViewModelBooleanPropertySpecSwift.hpp"
#include "HybridViewModelColorPropertySpecSwift.hpp"
#include "HybridViewModelEnumPropertySpecSwift.hpp"
#include "HybridViewModelImagePropertySpecSwift.hpp"
#include "HybridViewModelInstanceSpecSwift.hpp"
#include "HybridViewModelListPropertySpecSwift.hpp"
#include "HybridViewModelNumberPropertySpecSwift.hpp"
#include "HybridViewModelPropertySpecSwift.hpp"
#include "HybridViewModelSpecSwift.hpp"
#include "HybridViewModelStringPropertySpecSwift.hpp"
#include "HybridViewModelTriggerPropertySpecSwift.hpp"
#include "RNRive-Swift-Cxx-Umbrella.hpp"
#include <NitroModules/NitroDefines.hpp>

namespace margelo::nitro::rive::bridge::swift {

  // pragma MARK: std::shared_ptr<HybridBindableArtboardSpec>
  std::shared_ptr<HybridBindableArtboardSpec> create_std__shared_ptr_HybridBindableArtboardSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridBindableArtboardSpec_cxx swiftPart = RNRive::HybridBindableArtboardSpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridBindableArtboardSpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridBindableArtboardSpec_(std__shared_ptr_HybridBindableArtboardSpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridBindableArtboardSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridBindableArtboardSpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridBindableArtboardSpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridBindableArtboardSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::shared_ptr<HybridViewModelSpec>
  std::shared_ptr<HybridViewModelSpec> create_std__shared_ptr_HybridViewModelSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridViewModelSpec_cxx swiftPart = RNRive::HybridViewModelSpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridViewModelSpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridViewModelSpec_(std__shared_ptr_HybridViewModelSpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridViewModelSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridViewModelSpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridViewModelSpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridViewModelSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::shared_ptr<HybridRiveImageSpec>
  std::shared_ptr<HybridRiveImageSpec> create_std__shared_ptr_HybridRiveImageSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridRiveImageSpec_cxx swiftPart = RNRive::HybridRiveImageSpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridRiveImageSpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridRiveImageSpec_(std__shared_ptr_HybridRiveImageSpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridRiveImageSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridRiveImageSpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridRiveImageSpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridRiveImageSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::function<void(const std::vector<std::string>& /* result */)>
  Func_void_std__vector_std__string_ create_Func_void_std__vector_std__string_(void* NON_NULL swiftClosureWrapper) noexcept {
    auto swiftClosure = RNRive::Func_void_std__vector_std__string_::fromUnsafe(swiftClosureWrapper);
    return [swiftClosure = std::move(swiftClosure)](const std::vector<std::string>& result) mutable -> void {
      swiftClosure.call(result);
    };
  }
  
  // pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
  Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept {
    auto swiftClosure = RNRive::Func_void_std__exception_ptr::fromUnsafe(swiftClosureWrapper);
    return [swiftClosure = std::move(swiftClosure)](const std::exception_ptr& error) mutable -> void {
      swiftClosure.call(error);
    };
  }
  
  // pragma MARK: std::function<void(const std::optional<std::shared_ptr<HybridViewModelSpec>>& /* result */)>
  Func_void_std__optional_std__shared_ptr_HybridViewModelSpec__ create_Func_void_std__optional_std__shared_ptr_HybridViewModelSpec__(void* NON_NULL swiftClosureWrapper) noexcept {
    auto swiftClosure = RNRive::Func_void_std__optional_std__shared_ptr_HybridViewModelSpec__::fromUnsafe(swiftClosureWrapper);
    return [swiftClosure = std::move(swiftClosure)](const std::optional<std::shared_ptr<HybridViewModelSpec>>& result) mutable -> void {
      swiftClosure.call(result);
    };
  }
  
  // pragma MARK: std::function<void(double /* result */)>
  Func_void_double create_Func_void_double(void* NON_NULL swiftClosureWrapper) noexcept {
    auto swiftClosure = RNRive::Func_void_double::fromUnsafe(swiftClosureWrapper);
    return [swiftClosure = std::move(swiftClosure)](double result) mutable -> void {
      swiftClosure.call(result);
    };
  }
  
  // pragma MARK: std::shared_ptr<HybridRiveFileSpec>
  std::shared_ptr<HybridRiveFileSpec> create_std__shared_ptr_HybridRiveFileSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridRiveFileSpec_cxx swiftPart = RNRive::HybridRiveFileSpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridRiveFileSpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridRiveFileSpec_(std__shared_ptr_HybridRiveFileSpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridRiveFileSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridRiveFileSpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridRiveFileSpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridRiveFileSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::function<void(const std::shared_ptr<HybridRiveFileSpec>& /* result */)>
  Func_void_std__shared_ptr_HybridRiveFileSpec_ create_Func_void_std__shared_ptr_HybridRiveFileSpec_(void* NON_NULL swiftClosureWrapper) noexcept {
    auto swiftClosure = RNRive::Func_void_std__shared_ptr_HybridRiveFileSpec_::fromUnsafe(swiftClosureWrapper);
    return [swiftClosure = std::move(swiftClosure)](const std::shared_ptr<HybridRiveFileSpec>& result) mutable -> void {
      swiftClosure.call(result);
    };
  }
  
  // pragma MARK: std::shared_ptr<HybridRiveFileFactorySpec>
  std::shared_ptr<HybridRiveFileFactorySpec> create_std__shared_ptr_HybridRiveFileFactorySpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridRiveFileFactorySpec_cxx swiftPart = RNRive::HybridRiveFileFactorySpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridRiveFileFactorySpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridRiveFileFactorySpec_(std__shared_ptr_HybridRiveFileFactorySpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridRiveFileFactorySpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridRiveFileFactorySpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridRiveFileFactorySpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridRiveFileFactorySpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::shared_ptr<HybridFallbackFontSpec>
  std::shared_ptr<HybridFallbackFontSpec> create_std__shared_ptr_HybridFallbackFontSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridFallbackFontSpec_cxx swiftPart = RNRive::HybridFallbackFontSpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridFallbackFontSpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridFallbackFontSpec_(std__shared_ptr_HybridFallbackFontSpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridFallbackFontSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridFallbackFontSpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridFallbackFontSpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridFallbackFontSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::function<void(const std::shared_ptr<HybridFallbackFontSpec>& /* result */)>
  Func_void_std__shared_ptr_HybridFallbackFontSpec_ create_Func_void_std__shared_ptr_HybridFallbackFontSpec_(void* NON_NULL swiftClosureWrapper) noexcept {
    auto swiftClosure = RNRive::Func_void_std__shared_ptr_HybridFallbackFontSpec_::fromUnsafe(swiftClosureWrapper);
    return [swiftClosure = std::move(swiftClosure)](const std::shared_ptr<HybridFallbackFontSpec>& result) mutable -> void {
      swiftClosure.call(result);
    };
  }
  
  // pragma MARK: std::function<void()>
  Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept {
    auto swiftClosure = RNRive::Func_void::fromUnsafe(swiftClosureWrapper);
    return [swiftClosure = std::move(swiftClosure)]() mutable -> void {
      swiftClosure.call();
    };
  }
  
  // pragma MARK: std::shared_ptr<HybridRiveFontConfigSpec>
  std::shared_ptr<HybridRiveFontConfigSpec> create_std__shared_ptr_HybridRiveFontConfigSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridRiveFontConfigSpec_cxx swiftPart = RNRive::HybridRiveFontConfigSpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridRiveFontConfigSpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridRiveFontConfigSpec_(std__shared_ptr_HybridRiveFontConfigSpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridRiveFontConfigSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridRiveFontConfigSpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridRiveFontConfigSpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridRiveFontConfigSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::function<void(const std::shared_ptr<HybridRiveImageSpec>& /* result */)>
  Func_void_std__shared_ptr_HybridRiveImageSpec_ create_Func_void_std__shared_ptr_HybridRiveImageSpec_(void* NON_NULL swiftClosureWrapper) noexcept {
    auto swiftClosure = RNRive::Func_void_std__shared_ptr_HybridRiveImageSpec_::fromUnsafe(swiftClosureWrapper);
    return [swiftClosure = std::move(swiftClosure)](const std::shared_ptr<HybridRiveImageSpec>& result) mutable -> void {
      swiftClosure.call(result);
    };
  }
  
  // pragma MARK: std::shared_ptr<HybridRiveImageFactorySpec>
  std::shared_ptr<HybridRiveImageFactorySpec> create_std__shared_ptr_HybridRiveImageFactorySpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridRiveImageFactorySpec_cxx swiftPart = RNRive::HybridRiveImageFactorySpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridRiveImageFactorySpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridRiveImageFactorySpec_(std__shared_ptr_HybridRiveImageFactorySpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridRiveImageFactorySpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridRiveImageFactorySpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridRiveImageFactorySpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridRiveImageFactorySpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::shared_ptr<HybridRiveRuntimeSpec>
  std::shared_ptr<HybridRiveRuntimeSpec> create_std__shared_ptr_HybridRiveRuntimeSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridRiveRuntimeSpec_cxx swiftPart = RNRive::HybridRiveRuntimeSpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridRiveRuntimeSpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridRiveRuntimeSpec_(std__shared_ptr_HybridRiveRuntimeSpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridRiveRuntimeSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridRiveRuntimeSpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridRiveRuntimeSpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridRiveRuntimeSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::shared_ptr<HybridViewModelInstanceSpec>
  std::shared_ptr<HybridViewModelInstanceSpec> create_std__shared_ptr_HybridViewModelInstanceSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridViewModelInstanceSpec_cxx swiftPart = RNRive::HybridViewModelInstanceSpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridViewModelInstanceSpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridViewModelInstanceSpec_(std__shared_ptr_HybridViewModelInstanceSpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridViewModelInstanceSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridViewModelInstanceSpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridViewModelInstanceSpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridViewModelInstanceSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::function<void(const RiveError& /* error */)>
  Func_void_RiveError create_Func_void_RiveError(void* NON_NULL swiftClosureWrapper) noexcept {
    auto swiftClosure = RNRive::Func_void_RiveError::fromUnsafe(swiftClosureWrapper);
    return [swiftClosure = std::move(swiftClosure)](const RiveError& error) mutable -> void {
      swiftClosure.call(error);
    };
  }
  
  // pragma MARK: std::function<void(bool /* result */)>
  Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept {
    auto swiftClosure = RNRive::Func_void_bool::fromUnsafe(swiftClosureWrapper);
    return [swiftClosure = std::move(swiftClosure)](bool result) mutable -> void {
      swiftClosure.call(result);
    };
  }
  
  // pragma MARK: std::function<void(const UnifiedRiveEvent& /* event */)>
  Func_void_UnifiedRiveEvent create_Func_void_UnifiedRiveEvent(void* NON_NULL swiftClosureWrapper) noexcept {
    auto swiftClosure = RNRive::Func_void_UnifiedRiveEvent::fromUnsafe(swiftClosureWrapper);
    return [swiftClosure = std::move(swiftClosure)](const UnifiedRiveEvent& event) mutable -> void {
      swiftClosure.call(event);
    };
  }
  
  // pragma MARK: std::shared_ptr<HybridRiveViewSpec>
  std::shared_ptr<HybridRiveViewSpec> create_std__shared_ptr_HybridRiveViewSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridRiveViewSpec_cxx swiftPart = RNRive::HybridRiveViewSpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridRiveViewSpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridRiveViewSpec_(std__shared_ptr_HybridRiveViewSpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridRiveViewSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridRiveViewSpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridRiveViewSpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridRiveViewSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::function<void(const std::optional<std::shared_ptr<HybridViewModelInstanceSpec>>& /* result */)>
  Func_void_std__optional_std__shared_ptr_HybridViewModelInstanceSpec__ create_Func_void_std__optional_std__shared_ptr_HybridViewModelInstanceSpec__(void* NON_NULL swiftClosureWrapper) noexcept {
    auto swiftClosure = RNRive::Func_void_std__optional_std__shared_ptr_HybridViewModelInstanceSpec__::fromUnsafe(swiftClosureWrapper);
    return [swiftClosure = std::move(swiftClosure)](const std::optional<std::shared_ptr<HybridViewModelInstanceSpec>>& result) mutable -> void {
      swiftClosure.call(result);
    };
  }
  
  // pragma MARK: std::shared_ptr<HybridViewModelPropertySpec>
  std::shared_ptr<HybridViewModelPropertySpec> create_std__shared_ptr_HybridViewModelPropertySpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridViewModelPropertySpec_cxx swiftPart = RNRive::HybridViewModelPropertySpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridViewModelPropertySpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridViewModelPropertySpec_(std__shared_ptr_HybridViewModelPropertySpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridViewModelPropertySpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridViewModelPropertySpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridViewModelPropertySpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridViewModelPropertySpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::shared_ptr<HybridViewModelNumberPropertySpec>
  std::shared_ptr<HybridViewModelNumberPropertySpec> create_std__shared_ptr_HybridViewModelNumberPropertySpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridViewModelNumberPropertySpec_cxx swiftPart = RNRive::HybridViewModelNumberPropertySpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridViewModelNumberPropertySpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridViewModelNumberPropertySpec_(std__shared_ptr_HybridViewModelNumberPropertySpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridViewModelNumberPropertySpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridViewModelNumberPropertySpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridViewModelNumberPropertySpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridViewModelNumberPropertySpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::shared_ptr<HybridViewModelStringPropertySpec>
  std::shared_ptr<HybridViewModelStringPropertySpec> create_std__shared_ptr_HybridViewModelStringPropertySpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridViewModelStringPropertySpec_cxx swiftPart = RNRive::HybridViewModelStringPropertySpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridViewModelStringPropertySpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridViewModelStringPropertySpec_(std__shared_ptr_HybridViewModelStringPropertySpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridViewModelStringPropertySpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridViewModelStringPropertySpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridViewModelStringPropertySpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridViewModelStringPropertySpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::shared_ptr<HybridViewModelBooleanPropertySpec>
  std::shared_ptr<HybridViewModelBooleanPropertySpec> create_std__shared_ptr_HybridViewModelBooleanPropertySpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridViewModelBooleanPropertySpec_cxx swiftPart = RNRive::HybridViewModelBooleanPropertySpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridViewModelBooleanPropertySpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridViewModelBooleanPropertySpec_(std__shared_ptr_HybridViewModelBooleanPropertySpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridViewModelBooleanPropertySpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridViewModelBooleanPropertySpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridViewModelBooleanPropertySpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridViewModelBooleanPropertySpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::shared_ptr<HybridViewModelColorPropertySpec>
  std::shared_ptr<HybridViewModelColorPropertySpec> create_std__shared_ptr_HybridViewModelColorPropertySpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridViewModelColorPropertySpec_cxx swiftPart = RNRive::HybridViewModelColorPropertySpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridViewModelColorPropertySpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridViewModelColorPropertySpec_(std__shared_ptr_HybridViewModelColorPropertySpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridViewModelColorPropertySpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridViewModelColorPropertySpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridViewModelColorPropertySpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridViewModelColorPropertySpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::shared_ptr<HybridViewModelEnumPropertySpec>
  std::shared_ptr<HybridViewModelEnumPropertySpec> create_std__shared_ptr_HybridViewModelEnumPropertySpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridViewModelEnumPropertySpec_cxx swiftPart = RNRive::HybridViewModelEnumPropertySpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridViewModelEnumPropertySpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridViewModelEnumPropertySpec_(std__shared_ptr_HybridViewModelEnumPropertySpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridViewModelEnumPropertySpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridViewModelEnumPropertySpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridViewModelEnumPropertySpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridViewModelEnumPropertySpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::shared_ptr<HybridViewModelTriggerPropertySpec>
  std::shared_ptr<HybridViewModelTriggerPropertySpec> create_std__shared_ptr_HybridViewModelTriggerPropertySpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridViewModelTriggerPropertySpec_cxx swiftPart = RNRive::HybridViewModelTriggerPropertySpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridViewModelTriggerPropertySpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridViewModelTriggerPropertySpec_(std__shared_ptr_HybridViewModelTriggerPropertySpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridViewModelTriggerPropertySpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridViewModelTriggerPropertySpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridViewModelTriggerPropertySpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridViewModelTriggerPropertySpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::shared_ptr<HybridViewModelImagePropertySpec>
  std::shared_ptr<HybridViewModelImagePropertySpec> create_std__shared_ptr_HybridViewModelImagePropertySpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridViewModelImagePropertySpec_cxx swiftPart = RNRive::HybridViewModelImagePropertySpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridViewModelImagePropertySpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridViewModelImagePropertySpec_(std__shared_ptr_HybridViewModelImagePropertySpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridViewModelImagePropertySpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridViewModelImagePropertySpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridViewModelImagePropertySpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridViewModelImagePropertySpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::shared_ptr<HybridViewModelListPropertySpec>
  std::shared_ptr<HybridViewModelListPropertySpec> create_std__shared_ptr_HybridViewModelListPropertySpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridViewModelListPropertySpec_cxx swiftPart = RNRive::HybridViewModelListPropertySpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridViewModelListPropertySpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridViewModelListPropertySpec_(std__shared_ptr_HybridViewModelListPropertySpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridViewModelListPropertySpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridViewModelListPropertySpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridViewModelListPropertySpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridViewModelListPropertySpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::shared_ptr<HybridViewModelArtboardPropertySpec>
  std::shared_ptr<HybridViewModelArtboardPropertySpec> create_std__shared_ptr_HybridViewModelArtboardPropertySpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    RNRive::HybridViewModelArtboardPropertySpec_cxx swiftPart = RNRive::HybridViewModelArtboardPropertySpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::rive::HybridViewModelArtboardPropertySpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridViewModelArtboardPropertySpec_(std__shared_ptr_HybridViewModelArtboardPropertySpec_ cppType) {
    std::shared_ptr<margelo::nitro::rive::HybridViewModelArtboardPropertySpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::rive::HybridViewModelArtboardPropertySpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridViewModelArtboardPropertySpec\" is not implemented in Swift!");
    }
    #endif
    RNRive::HybridViewModelArtboardPropertySpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }
  
  // pragma MARK: std::function<void(const std::string& /* result */)>
  Func_void_std__string create_Func_void_std__string(void* NON_NULL swiftClosureWrapper) noexcept {
    auto swiftClosure = RNRive::Func_void_std__string::fromUnsafe(swiftClosureWrapper);
    return [swiftClosure = std::move(swiftClosure)](const std::string& result) mutable -> void {
      swiftClosure.call(result);
    };
  }

} // namespace margelo::nitro::rive::bridge::swift
