///
/// HybridOneAppleAuthSpec.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 `AppleAuthResult` to properly resolve imports.
namespace margelo::nitro::one { struct AppleAuthResult; }
// Forward declaration of `AppleAuthSignInOptions` to properly resolve imports.
namespace margelo::nitro::one { struct AppleAuthSignInOptions; }
// Forward declaration of `AppleCredentialState` to properly resolve imports.
namespace margelo::nitro::one { enum class AppleCredentialState; }

#include "AppleAuthResult.hpp"
#include <NitroModules/Promise.hpp>
#include "AppleAuthSignInOptions.hpp"
#include "AppleCredentialState.hpp"
#include <string>

namespace margelo::nitro::one {

  using namespace margelo::nitro;

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

      // Destructor
      ~HybridOneAppleAuthSpec() override = default;

    public:
      // Properties
      

    public:
      // Methods
      virtual bool isAvailable() = 0;
      virtual std::shared_ptr<Promise<AppleAuthResult>> signIn(const AppleAuthSignInOptions& options) = 0;
      virtual std::shared_ptr<Promise<AppleCredentialState>> getCredentialState(const std::string& user) = 0;

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

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

} // namespace margelo::nitro::one
