///
/// HybridOneAppIntentsSpec.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 `AppIntentInvocation` to properly resolve imports.
namespace margelo::nitro::one { struct AppIntentInvocation; }

#include <functional>
#include <string>
#include "AppIntentInvocation.hpp"
#include <vector>

namespace margelo::nitro::one {

  using namespace margelo::nitro;

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

      // Destructor
      ~HybridOneAppIntentsSpec() override = default;

    public:
      // Properties


    public:
      // Methods
      virtual std::function<void()> addInvocationListener(const std::string& identifier, const std::function<void(const AppIntentInvocation& /* invocation */)>& listener) = 0;
      virtual std::vector<AppIntentInvocation> claimPending(const std::string& identifier) = 0;
      virtual void complete(const std::string& executionId, bool success, const std::string& output) = 0;

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

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

} // namespace margelo::nitro::one
