///
/// LunarDatePicker-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 `HybridLunarDatePickerSpec` to properly resolve imports.
namespace margelo::nitro::lunardatepicker { class HybridLunarDatePickerSpec; }
// Forward declaration of `LDP_CustomLanguage` to properly resolve imports.
namespace margelo::nitro::lunardatepicker { struct LDP_CustomLanguage; }
// Forward declaration of `LDP_CustomStyle` to properly resolve imports.
namespace margelo::nitro::lunardatepicker { struct LDP_CustomStyle; }
// Forward declaration of `LDP_Range` to properly resolve imports.
namespace margelo::nitro::lunardatepicker { struct LDP_Range; }

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

// Include C++ defined types
#include "HybridLunarDatePickerSpec.hpp"
#include "LDP_CustomLanguage.hpp"
#include "LDP_CustomStyle.hpp"
#include "LDP_Range.hpp"
#include <NitroModules/Result.hpp>
#include <exception>
#include <functional>
#include <memory>
#include <optional>
#include <string>
#include <unordered_map>
#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::lunardatepicker::bridge::swift {

  // pragma MARK: std::optional<std::string>
  /**
   * Specialized version of `std::optional<std::string>`.
   */
  using std__optional_std__string_ = std::optional<std::string>;
  inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) noexcept {
    return std::optional<std::string>(value);
  }
  inline bool has_value_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
    return optional.has_value();
  }
  inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
    return optional.value();
  }
  
  // pragma MARK: std::optional<bool>
  /**
   * Specialized version of `std::optional<bool>`.
   */
  using std__optional_bool_ = std::optional<bool>;
  inline std::optional<bool> create_std__optional_bool_(const bool& value) noexcept {
    return std::optional<bool>(value);
  }
  inline bool has_value_std__optional_bool_(const std::optional<bool>& optional) noexcept {
    return optional.has_value();
  }
  inline bool get_std__optional_bool_(const std::optional<bool>& optional) noexcept {
    return optional.value();
  }
  
  // pragma MARK: std::function<void(const LDP_Range& /* result */)>
  /**
   * Specialized version of `std::function<void(const LDP_Range&)>`.
   */
  using Func_void_LDP_Range = std::function<void(const LDP_Range& /* result */)>;
  /**
   * Wrapper class for a `std::function<void(const LDP_Range& / * result * /)>`, this can be used from Swift.
   */
  class Func_void_LDP_Range_Wrapper final {
  public:
    explicit Func_void_LDP_Range_Wrapper(std::function<void(const LDP_Range& /* result */)>&& func): _function(std::make_unique<std::function<void(const LDP_Range& /* result */)>>(std::move(func))) {}
    inline void call(LDP_Range result) const noexcept {
      _function->operator()(result);
    }
  private:
    std::unique_ptr<std::function<void(const LDP_Range& /* result */)>> _function;
  } SWIFT_NONCOPYABLE;
  Func_void_LDP_Range create_Func_void_LDP_Range(void* NON_NULL swiftClosureWrapper) noexcept;
  inline Func_void_LDP_Range_Wrapper wrap_Func_void_LDP_Range(Func_void_LDP_Range value) noexcept {
    return Func_void_LDP_Range_Wrapper(std::move(value));
  }
  
  // pragma MARK: std::optional<LDP_Range>
  /**
   * Specialized version of `std::optional<LDP_Range>`.
   */
  using std__optional_LDP_Range_ = std::optional<LDP_Range>;
  inline std::optional<LDP_Range> create_std__optional_LDP_Range_(const LDP_Range& value) noexcept {
    return std::optional<LDP_Range>(value);
  }
  inline bool has_value_std__optional_LDP_Range_(const std::optional<LDP_Range>& optional) noexcept {
    return optional.has_value();
  }
  inline LDP_Range get_std__optional_LDP_Range_(const std::optional<LDP_Range>& optional) noexcept {
    return optional.value();
  }
  
  // pragma MARK: std::vector<std::string>
  /**
   * Specialized version of `std::vector<std::string>`.
   */
  using std__vector_std__string_ = std::vector<std::string>;
  inline std::vector<std::string> create_std__vector_std__string_(size_t size) noexcept {
    std::vector<std::string> vector;
    vector.reserve(size);
    return vector;
  }
  
  // pragma MARK: std::unordered_map<std::string, LDP_CustomStyle>
  /**
   * Specialized version of `std::unordered_map<std::string, LDP_CustomStyle>`.
   */
  using std__unordered_map_std__string__LDP_CustomStyle_ = std::unordered_map<std::string, LDP_CustomStyle>;
  inline std::unordered_map<std::string, LDP_CustomStyle> create_std__unordered_map_std__string__LDP_CustomStyle_(size_t size) noexcept {
    std::unordered_map<std::string, LDP_CustomStyle> map;
    map.reserve(size);
    return map;
  }
  inline std::vector<std::string> get_std__unordered_map_std__string__LDP_CustomStyle__keys(const std__unordered_map_std__string__LDP_CustomStyle_& map) noexcept {
    std::vector<std::string> keys;
    keys.reserve(map.size());
    for (const auto& entry : map) {
      keys.push_back(entry.first);
    }
    return keys;
  }
  inline LDP_CustomStyle get_std__unordered_map_std__string__LDP_CustomStyle__value(const std__unordered_map_std__string__LDP_CustomStyle_& map, const std::string& key) noexcept {
    return map.find(key)->second;
  }
  inline void emplace_std__unordered_map_std__string__LDP_CustomStyle_(std__unordered_map_std__string__LDP_CustomStyle_& map, const std::string& key, const LDP_CustomStyle& value) noexcept {
    map.emplace(key, value);
  }
  
  // pragma MARK: std::unordered_map<std::string, LDP_CustomLanguage>
  /**
   * Specialized version of `std::unordered_map<std::string, LDP_CustomLanguage>`.
   */
  using std__unordered_map_std__string__LDP_CustomLanguage_ = std::unordered_map<std::string, LDP_CustomLanguage>;
  inline std::unordered_map<std::string, LDP_CustomLanguage> create_std__unordered_map_std__string__LDP_CustomLanguage_(size_t size) noexcept {
    std::unordered_map<std::string, LDP_CustomLanguage> map;
    map.reserve(size);
    return map;
  }
  inline std::vector<std::string> get_std__unordered_map_std__string__LDP_CustomLanguage__keys(const std__unordered_map_std__string__LDP_CustomLanguage_& map) noexcept {
    std::vector<std::string> keys;
    keys.reserve(map.size());
    for (const auto& entry : map) {
      keys.push_back(entry.first);
    }
    return keys;
  }
  inline LDP_CustomLanguage get_std__unordered_map_std__string__LDP_CustomLanguage__value(const std__unordered_map_std__string__LDP_CustomLanguage_& map, const std::string& key) noexcept {
    return map.find(key)->second;
  }
  inline void emplace_std__unordered_map_std__string__LDP_CustomLanguage_(std__unordered_map_std__string__LDP_CustomLanguage_& map, const std::string& key, const LDP_CustomLanguage& value) noexcept {
    map.emplace(key, value);
  }
  
  // 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::shared_ptr<HybridLunarDatePickerSpec>
  /**
   * Specialized version of `std::shared_ptr<HybridLunarDatePickerSpec>`.
   */
  using std__shared_ptr_HybridLunarDatePickerSpec_ = std::shared_ptr<HybridLunarDatePickerSpec>;
  std::shared_ptr<HybridLunarDatePickerSpec> create_std__shared_ptr_HybridLunarDatePickerSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
  void* NON_NULL get_std__shared_ptr_HybridLunarDatePickerSpec_(std__shared_ptr_HybridLunarDatePickerSpec_ cppType);
  
  // pragma MARK: std::weak_ptr<HybridLunarDatePickerSpec>
  using std__weak_ptr_HybridLunarDatePickerSpec_ = std::weak_ptr<HybridLunarDatePickerSpec>;
  inline std__weak_ptr_HybridLunarDatePickerSpec_ weakify_std__shared_ptr_HybridLunarDatePickerSpec_(const std::shared_ptr<HybridLunarDatePickerSpec>& strong) noexcept { return strong; }
  
  // 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::lunardatepicker::bridge::swift
