///
/// NitroThor-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 "NitroThor-Swift-Cxx-Bridge.hpp"

// Include C++ implementation defined types
#include "HybridThorViewSpecSwift.hpp"
#include "NitroThor-Swift-Cxx-Umbrella.hpp"
#include <NitroModules/NitroDefines.hpp>

namespace margelo::nitro::thor::bridge::swift {

  // pragma MARK: std::shared_ptr<HybridThorViewSpec>
  std::shared_ptr<HybridThorViewSpec> create_std__shared_ptr_HybridThorViewSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
    NitroThor::HybridThorViewSpec_cxx swiftPart = NitroThor::HybridThorViewSpec_cxx::fromUnsafe(swiftUnsafePointer);
    return std::make_shared<margelo::nitro::thor::HybridThorViewSpecSwift>(swiftPart);
  }
  void* NON_NULL get_std__shared_ptr_HybridThorViewSpec_(std__shared_ptr_HybridThorViewSpec_ cppType) {
    std::shared_ptr<margelo::nitro::thor::HybridThorViewSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::thor::HybridThorViewSpecSwift>(cppType);
    #ifdef NITRO_DEBUG
    if (swiftWrapper == nullptr) [[unlikely]] {
      throw std::runtime_error("Class \"HybridThorViewSpec\" is not implemented in Swift!");
    }
    #endif
    NitroThor::HybridThorViewSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
    return swiftPart.toUnsafe();
  }

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