///
/// HybridLunarDatePickerSpecSwift.hpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © 2025 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_PickerMode` to properly resolve imports.
namespace margelo::nitro::lunardatepicker { enum class LDP_PickerMode; }
// Forward declaration of `LDP_Range` to properly resolve imports.
namespace margelo::nitro::lunardatepicker { struct LDP_Range; }
// Forward declaration of `LDP_PriceData` to properly resolve imports.
namespace margelo::nitro::lunardatepicker { struct LDP_PriceData; }
// 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_PriceUpdateParams` to properly resolve imports.
namespace margelo::nitro::lunardatepicker { struct LDP_PriceUpdateParams; }

#include "LDP_PresentParams.hpp"
#include <string>
#include "LDP_PickerMode.hpp"
#include <functional>
#include "LDP_Range.hpp"
#include <optional>
#include <vector>
#include "LDP_PriceData.hpp"
#include "LDP_ConfigParams.hpp"
#include <unordered_map>
#include "LDP_CustomStyle.hpp"
#include "LDP_CustomLanguage.hpp"
#include "LDP_PriceUpdateParams.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:
    // Get memory pressure
    inline size_t getExternalMemorySize() noexcept override {
      return _swiftPart.getMemorySize();
    }

  public:
    // Properties
    

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

  private:
    LunarDatePicker::HybridLunarDatePickerSpec_cxx _swiftPart;
  };

} // namespace margelo::nitro::lunardatepicker
