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

#pragma once

// Forward declarations of C++ defined types
// Forward declaration of `ColorScheme` to properly resolve imports.
namespace margelo::nitro::unistyles { enum class ColorScheme; }
// Forward declaration of `Dimensions` to properly resolve imports.
namespace margelo::nitro::unistyles { struct Dimensions; }
// Forward declaration of `HybridNativePlatformSpec` to properly resolve imports.
namespace margelo::nitro::unistyles { class HybridNativePlatformSpec; }
// Forward declaration of `Insets` to properly resolve imports.
namespace margelo::nitro::unistyles { struct Insets; }
// Forward declaration of `Orientation` to properly resolve imports.
namespace margelo::nitro::unistyles { enum class Orientation; }
// Forward declaration of `UnistyleDependency` to properly resolve imports.
namespace margelo::nitro::unistyles { enum class UnistyleDependency; }
// Forward declaration of `UnistylesNativeMiniRuntime` to properly resolve imports.
namespace margelo::nitro::unistyles { struct UnistylesNativeMiniRuntime; }

// Forward declarations of Swift defined types
// Forward declaration of `HybridNativePlatformSpec_cxx` to properly resolve imports.
namespace Unistyles { class HybridNativePlatformSpec_cxx; }

// Include C++ defined types
#include "ColorScheme.hpp"
#include "Dimensions.hpp"
#include "HybridNativePlatformSpec.hpp"
#include "Insets.hpp"
#include "Orientation.hpp"
#include "UnistyleDependency.hpp"
#include "UnistylesNativeMiniRuntime.hpp"
#include <NitroModules/Result.hpp>
#include <exception>
#include <functional>
#include <memory>
#include <string>
#include <vector>

/**
 * Contains specialized versions of C++ templated types so they can be accessed from Swift,
 * as well as helper functions to interact with those C++ types from Swift.
 */
namespace margelo::nitro::unistyles::bridge::swift {

  // pragma MARK: std::vector<UnistyleDependency>
  /**
   * Specialized version of `std::vector<UnistyleDependency>`.
   */
  using std__vector_UnistyleDependency_ = std::vector<UnistyleDependency>;
  inline std::vector<UnistyleDependency> create_std__vector_UnistyleDependency_(size_t size) noexcept {
    std::vector<UnistyleDependency> vector;
    vector.reserve(size);
    return vector;
  }
  
  // pragma MARK: std::function<void(const std::vector<UnistyleDependency>& /* dependencies */, const UnistylesNativeMiniRuntime& /* miniRuntime */)>
  /**
   * Specialized version of `std::function<void(const std::vector<UnistyleDependency>&, const UnistylesNativeMiniRuntime&)>`.
   */
  using Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime = std::function<void(const std::vector<UnistyleDependency>& /* dependencies */, const UnistylesNativeMiniRuntime& /* miniRuntime */)>;
  /**
   * Wrapper class for a `std::function<void(const std::vector<UnistyleDependency>& / * dependencies * /, const UnistylesNativeMiniRuntime& / * miniRuntime * /)>`, this can be used from Swift.
   */
  class Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime_Wrapper final {
  public:
    explicit Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime_Wrapper(std::function<void(const std::vector<UnistyleDependency>& /* dependencies */, const UnistylesNativeMiniRuntime& /* miniRuntime */)>&& func): _function(std::make_unique<std::function<void(const std::vector<UnistyleDependency>& /* dependencies */, const UnistylesNativeMiniRuntime& /* miniRuntime */)>>(std::move(func))) {}
    inline void call(std::vector<UnistyleDependency> dependencies, UnistylesNativeMiniRuntime miniRuntime) const noexcept {
      _function->operator()(dependencies, miniRuntime);
    }
  private:
    std::unique_ptr<std::function<void(const std::vector<UnistyleDependency>& /* dependencies */, const UnistylesNativeMiniRuntime& /* miniRuntime */)>> _function;
  } SWIFT_NONCOPYABLE;
  Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime create_Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime(void* NON_NULL swiftClosureWrapper) noexcept;
  inline Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime_Wrapper wrap_Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime(Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime value) noexcept {
    return Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime_Wrapper(std::move(value));
  }
  
  // pragma MARK: std::function<void(const UnistylesNativeMiniRuntime& /* miniRuntime */)>
  /**
   * Specialized version of `std::function<void(const UnistylesNativeMiniRuntime&)>`.
   */
  using Func_void_UnistylesNativeMiniRuntime = std::function<void(const UnistylesNativeMiniRuntime& /* miniRuntime */)>;
  /**
   * Wrapper class for a `std::function<void(const UnistylesNativeMiniRuntime& / * miniRuntime * /)>`, this can be used from Swift.
   */
  class Func_void_UnistylesNativeMiniRuntime_Wrapper final {
  public:
    explicit Func_void_UnistylesNativeMiniRuntime_Wrapper(std::function<void(const UnistylesNativeMiniRuntime& /* miniRuntime */)>&& func): _function(std::make_unique<std::function<void(const UnistylesNativeMiniRuntime& /* miniRuntime */)>>(std::move(func))) {}
    inline void call(UnistylesNativeMiniRuntime miniRuntime) const noexcept {
      _function->operator()(miniRuntime);
    }
  private:
    std::unique_ptr<std::function<void(const UnistylesNativeMiniRuntime& /* miniRuntime */)>> _function;
  } SWIFT_NONCOPYABLE;
  Func_void_UnistylesNativeMiniRuntime create_Func_void_UnistylesNativeMiniRuntime(void* NON_NULL swiftClosureWrapper) noexcept;
  inline Func_void_UnistylesNativeMiniRuntime_Wrapper wrap_Func_void_UnistylesNativeMiniRuntime(Func_void_UnistylesNativeMiniRuntime value) noexcept {
    return Func_void_UnistylesNativeMiniRuntime_Wrapper(std::move(value));
  }
  
  // pragma MARK: std::shared_ptr<HybridNativePlatformSpec>
  /**
   * Specialized version of `std::shared_ptr<HybridNativePlatformSpec>`.
   */
  using std__shared_ptr_HybridNativePlatformSpec_ = std::shared_ptr<HybridNativePlatformSpec>;
  std::shared_ptr<HybridNativePlatformSpec> create_std__shared_ptr_HybridNativePlatformSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
  void* NON_NULL get_std__shared_ptr_HybridNativePlatformSpec_(std__shared_ptr_HybridNativePlatformSpec_ cppType);
  
  // pragma MARK: std::weak_ptr<HybridNativePlatformSpec>
  using std__weak_ptr_HybridNativePlatformSpec_ = std::weak_ptr<HybridNativePlatformSpec>;
  inline std__weak_ptr_HybridNativePlatformSpec_ weakify_std__shared_ptr_HybridNativePlatformSpec_(const std::shared_ptr<HybridNativePlatformSpec>& strong) noexcept { return strong; }
  
  // pragma MARK: Result<Insets>
  using Result_Insets_ = Result<Insets>;
  inline Result_Insets_ create_Result_Insets_(const Insets& value) noexcept {
    return Result<Insets>::withValue(value);
  }
  inline Result_Insets_ create_Result_Insets_(const std::exception_ptr& error) noexcept {
    return Result<Insets>::withError(error);
  }
  
  // pragma MARK: Result<ColorScheme>
  using Result_ColorScheme_ = Result<ColorScheme>;
  inline Result_ColorScheme_ create_Result_ColorScheme_(ColorScheme value) noexcept {
    return Result<ColorScheme>::withValue(std::move(value));
  }
  inline Result_ColorScheme_ create_Result_ColorScheme_(const std::exception_ptr& error) noexcept {
    return Result<ColorScheme>::withError(error);
  }
  
  // pragma MARK: Result<double>
  using Result_double_ = Result<double>;
  inline Result_double_ create_Result_double_(double value) noexcept {
    return Result<double>::withValue(std::move(value));
  }
  inline Result_double_ create_Result_double_(const std::exception_ptr& error) noexcept {
    return Result<double>::withError(error);
  }
  
  // pragma MARK: Result<Orientation>
  using Result_Orientation_ = Result<Orientation>;
  inline Result_Orientation_ create_Result_Orientation_(Orientation value) noexcept {
    return Result<Orientation>::withValue(std::move(value));
  }
  inline Result_Orientation_ create_Result_Orientation_(const std::exception_ptr& error) noexcept {
    return Result<Orientation>::withError(error);
  }
  
  // pragma MARK: Result<std::string>
  using Result_std__string_ = Result<std::string>;
  inline Result_std__string_ create_Result_std__string_(const std::string& value) noexcept {
    return Result<std::string>::withValue(value);
  }
  inline Result_std__string_ create_Result_std__string_(const std::exception_ptr& error) noexcept {
    return Result<std::string>::withError(error);
  }
  
  // pragma MARK: Result<Dimensions>
  using Result_Dimensions_ = Result<Dimensions>;
  inline Result_Dimensions_ create_Result_Dimensions_(const Dimensions& value) noexcept {
    return Result<Dimensions>::withValue(value);
  }
  inline Result_Dimensions_ create_Result_Dimensions_(const std::exception_ptr& error) noexcept {
    return Result<Dimensions>::withError(error);
  }
  
  // pragma MARK: Result<bool>
  using Result_bool_ = Result<bool>;
  inline Result_bool_ create_Result_bool_(bool value) noexcept {
    return Result<bool>::withValue(std::move(value));
  }
  inline Result_bool_ create_Result_bool_(const std::exception_ptr& error) noexcept {
    return Result<bool>::withError(error);
  }
  
  // pragma MARK: Result<void>
  using Result_void_ = Result<void>;
  inline Result_void_ create_Result_void_() noexcept {
    return Result<void>::withValue();
  }
  inline Result_void_ create_Result_void_(const std::exception_ptr& error) noexcept {
    return Result<void>::withError(error);
  }
  
  // pragma MARK: Result<UnistylesNativeMiniRuntime>
  using Result_UnistylesNativeMiniRuntime_ = Result<UnistylesNativeMiniRuntime>;
  inline Result_UnistylesNativeMiniRuntime_ create_Result_UnistylesNativeMiniRuntime_(const UnistylesNativeMiniRuntime& value) noexcept {
    return Result<UnistylesNativeMiniRuntime>::withValue(value);
  }
  inline Result_UnistylesNativeMiniRuntime_ create_Result_UnistylesNativeMiniRuntime_(const std::exception_ptr& error) noexcept {
    return Result<UnistylesNativeMiniRuntime>::withError(error);
  }

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