///
/// HybridMMKVFactorySpec.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 `HybridMMKVSpec` to properly resolve imports.
namespace margelo::nitro::mmkv { class HybridMMKVSpec; }
// Forward declaration of `Configuration` to properly resolve imports.
namespace margelo::nitro::mmkv { struct Configuration; }

#include <string>
#include <memory>
#include "HybridMMKVSpec.hpp"
#include "Configuration.hpp"

namespace margelo::nitro::mmkv {

  using namespace margelo::nitro;

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

      // Destructor
      ~HybridMMKVFactorySpec() override = default;

    public:
      // Properties
      virtual std::string getDefaultMMKVInstanceId() = 0;

    public:
      // Methods
      virtual void initializeMMKV(const std::string& rootPath) = 0;
      virtual std::shared_ptr<HybridMMKVSpec> createMMKV(const Configuration& configuration) = 0;
      virtual bool deleteMMKV(const std::string& id) = 0;
      virtual bool existsMMKV(const std::string& id) = 0;

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

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

} // namespace margelo::nitro::mmkv
