///
/// HybridNitroSystemNavigationBarSpecSwift.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 "HybridNitroSystemNavigationBarSpec.hpp"

// Forward declaration of `HybridNitroSystemNavigationBarSpec_cxx` to properly resolve imports.
namespace NitroSystemNavigationBar { class HybridNitroSystemNavigationBarSpec_cxx; }



#include <optional>

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

namespace margelo::nitro::systemnavigationbar {

  /**
   * The C++ part of HybridNitroSystemNavigationBarSpec_cxx.swift.
   *
   * HybridNitroSystemNavigationBarSpecSwift (C++) accesses HybridNitroSystemNavigationBarSpec_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, HybridNitroSystemNavigationBarSpec_cxx can directly inherit from the C++ class HybridNitroSystemNavigationBarSpec
   * to simplify the whole structure and memory management.
   */
  class HybridNitroSystemNavigationBarSpecSwift: public virtual HybridNitroSystemNavigationBarSpec {
  public:
    // Constructor from a Swift instance
    explicit HybridNitroSystemNavigationBarSpecSwift(const NitroSystemNavigationBar::HybridNitroSystemNavigationBarSpec_cxx& swiftPart):
      HybridObject(HybridNitroSystemNavigationBarSpec::TAG),
      _swiftPart(swiftPart) { }

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

  public:
    inline size_t getExternalMemorySize() noexcept override {
      return _swiftPart.getMemorySize();
    }
    void dispose() noexcept override {
      _swiftPart.dispose();
    }

  public:
    // Properties
    

  public:
    // Methods
    inline double getNavigationBarHeight() override {
      auto __result = _swiftPart.getNavigationBarHeight();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline void hideNavigationBar() override {
      auto __result = _swiftPart.hideNavigationBar();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
    }
    inline void showNavigationBar() override {
      auto __result = _swiftPart.showNavigationBar();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
    }
    inline void enableImmersiveSticky() override {
      auto __result = _swiftPart.enableImmersiveSticky();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
    }
    inline void exitImmersiveMode() override {
      auto __result = _swiftPart.exitImmersiveMode();
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
    }
    inline void setNavigationBarColor(double color, std::optional<bool> isTranslucent) override {
      auto __result = _swiftPart.setNavigationBarColor(std::forward<decltype(color)>(color), isTranslucent);
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
    }
    inline void setLightNavigationBar(bool isLight) override {
      auto __result = _swiftPart.setLightNavigationBar(std::forward<decltype(isLight)>(isLight));
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
    }

  private:
    NitroSystemNavigationBar::HybridNitroSystemNavigationBarSpec_cxx _swiftPart;
  };

} // namespace margelo::nitro::systemnavigationbar
