///
/// HybridReactNativeBundleUpdateSpec.hpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © 2026 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 `BundleDownloadResult` to properly resolve imports.
namespace margelo::nitro::reactnativebundleupdate { struct BundleDownloadResult; }
// Forward declaration of `BundleDownloadParams` to properly resolve imports.
namespace margelo::nitro::reactnativebundleupdate { struct BundleDownloadParams; }
// Forward declaration of `BundleVerifyParams` to properly resolve imports.
namespace margelo::nitro::reactnativebundleupdate { struct BundleVerifyParams; }
// Forward declaration of `BundleVerifyASCParams` to properly resolve imports.
namespace margelo::nitro::reactnativebundleupdate { struct BundleVerifyASCParams; }
// Forward declaration of `BundleDownloadASCParams` to properly resolve imports.
namespace margelo::nitro::reactnativebundleupdate { struct BundleDownloadASCParams; }
// Forward declaration of `BundleInstallParams` to properly resolve imports.
namespace margelo::nitro::reactnativebundleupdate { struct BundleInstallParams; }
// Forward declaration of `TestResult` to properly resolve imports.
namespace margelo::nitro::reactnativebundleupdate { struct TestResult; }
// Forward declaration of `FallbackBundleInfo` to properly resolve imports.
namespace margelo::nitro::reactnativebundleupdate { struct FallbackBundleInfo; }
// Forward declaration of `BundleSwitchParams` to properly resolve imports.
namespace margelo::nitro::reactnativebundleupdate { struct BundleSwitchParams; }
// Forward declaration of `LocalBundleInfo` to properly resolve imports.
namespace margelo::nitro::reactnativebundleupdate { struct LocalBundleInfo; }
// Forward declaration of `AscFileInfo` to properly resolve imports.
namespace margelo::nitro::reactnativebundleupdate { struct AscFileInfo; }
// Forward declaration of `BundleDownloadEvent` to properly resolve imports.
namespace margelo::nitro::reactnativebundleupdate { struct BundleDownloadEvent; }

#include "BundleDownloadResult.hpp"
#include <NitroModules/Promise.hpp>
#include "BundleDownloadParams.hpp"
#include "BundleVerifyParams.hpp"
#include "BundleVerifyASCParams.hpp"
#include "BundleDownloadASCParams.hpp"
#include "BundleInstallParams.hpp"
#include "TestResult.hpp"
#include "FallbackBundleInfo.hpp"
#include <vector>
#include "BundleSwitchParams.hpp"
#include <string>
#include "LocalBundleInfo.hpp"
#include "AscFileInfo.hpp"
#include "BundleDownloadEvent.hpp"
#include <functional>

namespace margelo::nitro::reactnativebundleupdate {

  using namespace margelo::nitro;

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

      // Destructor
      ~HybridReactNativeBundleUpdateSpec() override = default;

    public:
      // Properties
      

    public:
      // Methods
      virtual std::shared_ptr<Promise<BundleDownloadResult>> downloadBundle(const BundleDownloadParams& params) = 0;
      virtual std::shared_ptr<Promise<void>> verifyBundle(const BundleVerifyParams& params) = 0;
      virtual std::shared_ptr<Promise<void>> verifyBundleASC(const BundleVerifyASCParams& params) = 0;
      virtual std::shared_ptr<Promise<void>> downloadBundleASC(const BundleDownloadASCParams& params) = 0;
      virtual std::shared_ptr<Promise<void>> installBundle(const BundleInstallParams& params) = 0;
      virtual std::shared_ptr<Promise<void>> clearBundle() = 0;
      virtual std::shared_ptr<Promise<TestResult>> clearAllJSBundleData() = 0;
      virtual std::shared_ptr<Promise<std::vector<FallbackBundleInfo>>> getFallbackUpdateBundleData() = 0;
      virtual std::shared_ptr<Promise<void>> setCurrentUpdateBundleData(const BundleSwitchParams& params) = 0;
      virtual std::string getWebEmbedPath() = 0;
      virtual std::shared_ptr<Promise<std::string>> getWebEmbedPathAsync() = 0;
      virtual std::shared_ptr<Promise<std::string>> getJsBundlePath() = 0;
      virtual std::shared_ptr<Promise<std::string>> getNativeAppVersion() = 0;
      virtual std::shared_ptr<Promise<bool>> testVerification() = 0;
      virtual std::shared_ptr<Promise<bool>> isBundleExists(const std::string& appVersion, const std::string& bundleVersion) = 0;
      virtual std::shared_ptr<Promise<void>> verifyExtractedBundle(const std::string& appVersion, const std::string& bundleVersion) = 0;
      virtual std::shared_ptr<Promise<std::vector<LocalBundleInfo>>> listLocalBundles() = 0;
      virtual std::shared_ptr<Promise<std::vector<AscFileInfo>>> listAscFiles() = 0;
      virtual std::shared_ptr<Promise<std::string>> getSha256FromFilePath(const std::string& filePath) = 0;
      virtual std::shared_ptr<Promise<TestResult>> testDeleteJsBundle(const std::string& appVersion, const std::string& bundleVersion) = 0;
      virtual std::shared_ptr<Promise<TestResult>> testDeleteJsRuntimeDir(const std::string& appVersion, const std::string& bundleVersion) = 0;
      virtual std::shared_ptr<Promise<TestResult>> testDeleteMetadataJson(const std::string& appVersion, const std::string& bundleVersion) = 0;
      virtual std::shared_ptr<Promise<TestResult>> testWriteEmptyMetadataJson(const std::string& appVersion, const std::string& bundleVersion) = 0;
      virtual double addDownloadListener(const std::function<void(const BundleDownloadEvent& /* event */)>& callback) = 0;
      virtual void removeDownloadListener(double id) = 0;

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

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

} // namespace margelo::nitro::reactnativebundleupdate
