///
/// HybridVideoPlayerEventEmitterSpec.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 <NitroModules/JHybridObject.hpp>
#include <fbjni/fbjni.h>
#include "HybridVideoPlayerEventEmitterSpec.hpp"




namespace margelo::nitro::video {

  using namespace facebook;

  class JHybridVideoPlayerEventEmitterSpec: public jni::HybridClass<JHybridVideoPlayerEventEmitterSpec, JHybridObject>,
                                            public virtual HybridVideoPlayerEventEmitterSpec {
  public:
    static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/HybridVideoPlayerEventEmitterSpec;";
    static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> jThis);
    static void registerNatives();

  protected:
    // C++ constructor (called from Java via `initHybrid()`)
    explicit JHybridVideoPlayerEventEmitterSpec(jni::alias_ref<jhybridobject> jThis) :
      HybridObject(HybridVideoPlayerEventEmitterSpec::TAG),
      HybridBase(jThis),
      _javaPart(jni::make_global(jThis)) {}

  public:
    ~JHybridVideoPlayerEventEmitterSpec() override {
      // Hermes GC can destroy JS objects on a non-JNI Thread.
      jni::ThreadScope::WithClassLoader([&] { _javaPart.reset(); });
    }

  public:
    size_t getExternalMemorySize() noexcept override;
    void dispose() noexcept override;

  public:
    inline const jni::global_ref<JHybridVideoPlayerEventEmitterSpec::javaobject>& getJavaPart() const noexcept {
      return _javaPart;
    }

  public:
    // Properties
    std::function<void()> getOnAudioBecomingNoisy() override;
    void setOnAudioBecomingNoisy(const std::function<void()>& onAudioBecomingNoisy) override;
    std::function<void(bool /* hasAudioFocus */)> getOnAudioFocusChange() override;
    void setOnAudioFocusChange(const std::function<void(bool /* hasAudioFocus */)>& onAudioFocusChange) override;
    std::function<void(const BandwidthData& /* data */)> getOnBandwidthUpdate() override;
    void setOnBandwidthUpdate(const std::function<void(const BandwidthData& /* data */)>& onBandwidthUpdate) override;
    std::function<void(bool /* buffering */)> getOnBuffer() override;
    void setOnBuffer(const std::function<void(bool /* buffering */)>& onBuffer) override;
    std::function<void(bool /* visible */)> getOnControlsVisibleChange() override;
    void setOnControlsVisibleChange(const std::function<void(bool /* visible */)>& onControlsVisibleChange) override;
    std::function<void()> getOnEnd() override;
    void setOnEnd(const std::function<void()>& onEnd) override;
    std::function<void(bool /* externalPlaybackActive */)> getOnExternalPlaybackChange() override;
    void setOnExternalPlaybackChange(const std::function<void(bool /* externalPlaybackActive */)>& onExternalPlaybackChange) override;
    std::function<void(const onLoadData& /* data */)> getOnLoad() override;
    void setOnLoad(const std::function<void(const onLoadData& /* data */)>& onLoad) override;
    std::function<void(const onLoadStartData& /* data */)> getOnLoadStart() override;
    void setOnLoadStart(const std::function<void(const onLoadStartData& /* data */)>& onLoadStart) override;
    std::function<void(const onPlaybackStateChangeData& /* data */)> getOnPlaybackStateChange() override;
    void setOnPlaybackStateChange(const std::function<void(const onPlaybackStateChangeData& /* data */)>& onPlaybackStateChange) override;
    std::function<void(double /* rate */)> getOnPlaybackRateChange() override;
    void setOnPlaybackRateChange(const std::function<void(double /* rate */)>& onPlaybackRateChange) override;
    std::function<void(const onProgressData& /* data */)> getOnProgress() override;
    void setOnProgress(const std::function<void(const onProgressData& /* data */)>& onProgress) override;
    std::function<void()> getOnReadyToDisplay() override;
    void setOnReadyToDisplay(const std::function<void()>& onReadyToDisplay) override;
    std::function<void(double /* seekTime */)> getOnSeek() override;
    void setOnSeek(const std::function<void(double /* seekTime */)>& onSeek) override;
    std::function<void(const TimedMetadata& /* metadata */)> getOnTimedMetadata() override;
    void setOnTimedMetadata(const std::function<void(const TimedMetadata& /* metadata */)>& onTimedMetadata) override;
    std::function<void(const std::vector<std::string>& /* texts */)> getOnTextTrackDataChanged() override;
    void setOnTextTrackDataChanged(const std::function<void(const std::vector<std::string>& /* texts */)>& onTextTrackDataChanged) override;
    std::function<void(const std::optional<TextTrack>& /* track */)> getOnTrackChange() override;
    void setOnTrackChange(const std::function<void(const std::optional<TextTrack>& /* track */)>& onTrackChange) override;
    std::function<void(const onVolumeChangeData& /* data */)> getOnVolumeChange() override;
    void setOnVolumeChange(const std::function<void(const onVolumeChangeData& /* data */)>& onVolumeChange) override;
    std::function<void(VideoPlayerStatus /* status */)> getOnStatusChange() override;
    void setOnStatusChange(const std::function<void(VideoPlayerStatus /* status */)>& onStatusChange) override;

  public:
    // Methods
    

  private:
    friend HybridBase;
    using HybridBase::HybridBase;
    jni::global_ref<JHybridVideoPlayerEventEmitterSpec::javaobject> _javaPart;
  };

} // namespace margelo::nitro::video
