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

#pragma once

#include "HybridLunarDatePickerSpec.hpp"

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

// Forward declaration of `LDP_PresentParams` to properly resolve imports.
namespace margelo::nitro::lunardatepicker { struct LDP_PresentParams; }
// Forward declaration of `LDP_Mode` to properly resolve imports.
namespace margelo::nitro::lunardatepicker { enum class LDP_Mode; }
// Forward declaration of `LDP_Range` to properly resolve imports.
namespace margelo::nitro::lunardatepicker { struct LDP_Range; }
// Forward declaration of `LDP_ConfigParams` to properly resolve imports.
namespace margelo::nitro::lunardatepicker { struct LDP_ConfigParams; }
// Forward declaration of `LDP_CustomStyle` to properly resolve imports.
namespace margelo::nitro::lunardatepicker { struct LDP_CustomStyle; }
// Forward declaration of `LDP_CustomLanguage` to properly resolve imports.
namespace margelo::nitro::lunardatepicker { struct LDP_CustomLanguage; }
// Forward declaration of `LDP_NativeAssetSource` to properly resolve imports.
namespace margelo::nitro::lunardatepicker { struct LDP_NativeAssetSource; }

#include "LDP_PresentParams.hpp"
#include <string>
#include <optional>
#include "LDP_Mode.hpp"
#include "LDP_Range.hpp"
#include <functional>
#include "LDP_ConfigParams.hpp"
#include "LDP_CustomStyle.hpp"
#include <unordered_map>
#include <vector>
#include "LDP_CustomLanguage.hpp"
#include "LDP_NativeAssetSource.hpp"

#include "LunarDatePicker-Swift-Cxx-Umbrella.hpp"

namespace margelo::nitro::lunardatepicker {

  /**
   * The C++ part of HybridLunarDatePickerSpec_cxx.swift.
   *
   * HybridLunarDatePickerSpecSwift (C++) accesses HybridLunarDatePickerSpec_cxx (Swift), and might
   * contain some additional bridging code for C++ <> Swift interop.
   *
   * Since this obviously introduces an overhead, I hope at some point in
   * the future, HybridLunarDatePickerSpec_cxx can directly inherit from the C++ class HybridLunarDatePickerSpec
   * to simplify the whole structure and memory management.
   */
  class HybridLunarDatePickerSpecSwift: public virtual HybridLunarDatePickerSpec {
  public:
    // Constructor from a Swift instance
    explicit HybridLunarDatePickerSpecSwift(const LunarDatePicker::HybridLunarDatePickerSpec_cxx& swiftPart):
      HybridObject(HybridLunarDatePickerSpec::TAG),
      _swiftPart(swiftPart) { }

  public:
    // Get the Swift part
    inline LunarDatePicker::HybridLunarDatePickerSpec_cxx& getSwiftPart() noexcept {
      return _swiftPart;
    }

  public:
    inline size_t getExternalMemorySize() noexcept override {
      return _swiftPart.getMemorySize();
    }
    bool equals(const std::shared_ptr<HybridObject>& other) override {
      if (auto otherCast = std::dynamic_pointer_cast<HybridLunarDatePickerSpecSwift>(other)) {
        return _swiftPart.equals(otherCast->_swiftPart);
      }
      return false;
    }
    void dispose() noexcept override {
      _swiftPart.dispose();
    }
    std::string toString() override {
      return _swiftPart.toString();
    }

  public:
    // Properties
    

  public:
    // Methods
    inline void present(const LDP_PresentParams& params) override {
      auto __result = _swiftPart.present(std::forward<decltype(params)>(params));
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
    }
    inline void configure(const LDP_ConfigParams& config) override {
      auto __result = _swiftPart.configure(std::forward<decltype(config)>(config));
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
    }

  private:
    LunarDatePicker::HybridLunarDatePickerSpec_cxx _swiftPart;
  };

} // namespace margelo::nitro::lunardatepicker
