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

#include "JHybridHapticsSpec.hpp"

// Forward declaration of `ImpactFeedbackStyle` to properly resolve imports.
namespace margelo::nitro::haptics { enum class ImpactFeedbackStyle; }
// Forward declaration of `NotificationFeedbackType` to properly resolve imports.
namespace margelo::nitro::haptics { enum class NotificationFeedbackType; }
// Forward declaration of `AndroidHaptics` to properly resolve imports.
namespace margelo::nitro::haptics { enum class AndroidHaptics; }

#include "ImpactFeedbackStyle.hpp"
#include "JImpactFeedbackStyle.hpp"
#include "NotificationFeedbackType.hpp"
#include "JNotificationFeedbackType.hpp"
#include "AndroidHaptics.hpp"
#include "JAndroidHaptics.hpp"

namespace margelo::nitro::haptics {

  jni::local_ref<JHybridHapticsSpec::jhybriddata> JHybridHapticsSpec::initHybrid(jni::alias_ref<jhybridobject> jThis) {
    return makeCxxInstance(jThis);
  }

  void JHybridHapticsSpec::registerNatives() {
    registerHybrid({
      makeNativeMethod("initHybrid", JHybridHapticsSpec::initHybrid),
    });
  }

  size_t JHybridHapticsSpec::getExternalMemorySize() noexcept {
    static const auto method = javaClassStatic()->getMethod<jlong()>("getMemorySize");
    return method(_javaPart);
  }

  // Properties
  

  // Methods
  void JHybridHapticsSpec::impact(ImpactFeedbackStyle style) {
    static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JImpactFeedbackStyle> /* style */)>("impact");
    method(_javaPart, JImpactFeedbackStyle::fromCpp(style));
  }
  void JHybridHapticsSpec::notification(NotificationFeedbackType type) {
    static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JNotificationFeedbackType> /* type */)>("notification");
    method(_javaPart, JNotificationFeedbackType::fromCpp(type));
  }
  void JHybridHapticsSpec::selection() {
    static const auto method = javaClassStatic()->getMethod<void()>("selection");
    method(_javaPart);
  }
  void JHybridHapticsSpec::performAndroidHaptics(AndroidHaptics type) {
    static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JAndroidHaptics> /* type */)>("performAndroidHaptics");
    method(_javaPart, JAndroidHaptics::fromCpp(type));
  }

} // namespace margelo::nitro::haptics
