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

#pragma once

// Forward declarations of C++ defined types
// Forward declaration of `HapticEventType` to properly resolve imports.
namespace margelo::nitro::haptic { enum class HapticEventType; }
// Forward declaration of `HapticEvent` to properly resolve imports.
namespace margelo::nitro::haptic { struct HapticEvent; }
// Forward declaration of `HapticParameters` to properly resolve imports.
namespace margelo::nitro::haptic { struct HapticParameters; }
// Forward declaration of `HybridHapticSpec` to properly resolve imports.
namespace margelo::nitro::haptic { class HybridHapticSpec; }

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

// Include C++ defined types
#include "HapticEvent.hpp"
#include "HapticEventType.hpp"
#include "HapticParameters.hpp"
#include "HybridHapticSpec.hpp"
#include <NitroModules/Result.hpp>
#include <exception>
#include <memory>
#include <optional>
#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::haptic::bridge::swift {

  // pragma MARK: std::optional<double>
  /**
   * Specialized version of `std::optional<double>`.
   */
  using std__optional_double_ = std::optional<double>;
  inline std::optional<double> create_std__optional_double_(const double& value) noexcept {
    return std::optional<double>(value);
  }
  inline bool has_value_std__optional_double_(const std::optional<double>& optional) noexcept {
    return optional.has_value();
  }
  inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
    return optional.value();
  }
  
  // pragma MARK: std::optional<HapticParameters>
  /**
   * Specialized version of `std::optional<HapticParameters>`.
   */
  using std__optional_HapticParameters_ = std::optional<HapticParameters>;
  inline std::optional<HapticParameters> create_std__optional_HapticParameters_(const HapticParameters& value) noexcept {
    return std::optional<HapticParameters>(value);
  }
  inline bool has_value_std__optional_HapticParameters_(const std::optional<HapticParameters>& optional) noexcept {
    return optional.has_value();
  }
  inline HapticParameters get_std__optional_HapticParameters_(const std::optional<HapticParameters>& optional) noexcept {
    return optional.value();
  }
  
  // pragma MARK: std::vector<HapticEvent>
  /**
   * Specialized version of `std::vector<HapticEvent>`.
   */
  using std__vector_HapticEvent_ = std::vector<HapticEvent>;
  inline std::vector<HapticEvent> create_std__vector_HapticEvent_(size_t size) noexcept {
    std::vector<HapticEvent> vector;
    vector.reserve(size);
    return vector;
  }
  
  // pragma MARK: std::shared_ptr<HybridHapticSpec>
  /**
   * Specialized version of `std::shared_ptr<HybridHapticSpec>`.
   */
  using std__shared_ptr_HybridHapticSpec_ = std::shared_ptr<HybridHapticSpec>;
  std::shared_ptr<HybridHapticSpec> create_std__shared_ptr_HybridHapticSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
  void* NON_NULL get_std__shared_ptr_HybridHapticSpec_(std__shared_ptr_HybridHapticSpec_ cppType);
  
  // pragma MARK: std::weak_ptr<HybridHapticSpec>
  using std__weak_ptr_HybridHapticSpec_ = std::weak_ptr<HybridHapticSpec>;
  inline std__weak_ptr_HybridHapticSpec_ weakify_std__shared_ptr_HybridHapticSpec_(const std::shared_ptr<HybridHapticSpec>& strong) noexcept { return strong; }
  
  // 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);
  }

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