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

#pragma once

#if __has_include(<NitroModules/HybridObject.hpp>)
#include <NitroModules/HybridObject.hpp>
#else
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
#endif

// Forward declaration of `SpeechPermissionResponse` to properly resolve imports.
namespace margelo::nitro::one { struct SpeechPermissionResponse; }
// Forward declaration of `SpeechStartOptions` to properly resolve imports.
namespace margelo::nitro::one { struct SpeechStartOptions; }
// Forward declaration of `SpeechEvent` to properly resolve imports.
namespace margelo::nitro::one { struct SpeechEvent; }

#include "SpeechPermissionResponse.hpp"
#include <NitroModules/Promise.hpp>
#include "SpeechStartOptions.hpp"
#include "SpeechEvent.hpp"
#include <functional>

namespace margelo::nitro::one {

  using namespace margelo::nitro;

  /**
   * An abstract base class for `OneSpeech`
   * Inherit this class to create instances of `HybridOneSpeechSpec` in C++.
   * You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
   * @example
   * ```cpp
   * class HybridOneSpeech: public HybridOneSpeechSpec {
   * public:
   *   HybridOneSpeech(...): HybridObject(TAG) { ... }
   *   // ...
   * };
   * ```
   */
  class HybridOneSpeechSpec: public virtual HybridObject {
    public:
      // Constructor
      explicit HybridOneSpeechSpec(): HybridObject(TAG) { }

      // Destructor
      ~HybridOneSpeechSpec() override = default;

    public:
      // Properties
      

    public:
      // Methods
      virtual bool isAvailable() = 0;
      virtual std::shared_ptr<Promise<SpeechPermissionResponse>> getPermissions() = 0;
      virtual std::shared_ptr<Promise<SpeechPermissionResponse>> requestPermissions() = 0;
      virtual void start(const SpeechStartOptions& options, const std::function<void(const SpeechEvent& /* event */)>& onEvent) = 0;
      virtual void stop() = 0;
      virtual void abort() = 0;

    protected:
      // Hybrid Setup
      void loadHybridMethods() override;

    protected:
      // Tag for logging
      static constexpr auto TAG = "OneSpeech";
  };

} // namespace margelo::nitro::one
