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

#pragma once

#include "HybridAIMediaKitSpec.hpp"

// Forward declaration of `HybridAIMediaKitSpec_cxx` to properly resolve imports.
namespace AIMediaKit { class HybridAIMediaKitSpec_cxx; }



#include <NitroModules/Promise.hpp>
#include <string>
#include <vector>

#include "AIMediaKit-Swift-Cxx-Umbrella.hpp"

namespace margelo::nitro::mediakit {

  /**
   * The C++ part of HybridAIMediaKitSpec_cxx.swift.
   *
   * HybridAIMediaKitSpecSwift (C++) accesses HybridAIMediaKitSpec_cxx (Swift), and might
   * contain some additional bridging code for C++ <> Swift interop.
   *
   * Since this obviously introduces an overhead, I hope at some point in
   * the future, HybridAIMediaKitSpec_cxx can directly inherit from the C++ class HybridAIMediaKitSpec
   * to simplify the whole structure and memory management.
   */
  class HybridAIMediaKitSpecSwift: public virtual HybridAIMediaKitSpec {
  public:
    // Constructor from a Swift instance
    explicit HybridAIMediaKitSpecSwift(const AIMediaKit::HybridAIMediaKitSpec_cxx& swiftPart):
      HybridObject(HybridAIMediaKitSpec::TAG),
      _swiftPart(swiftPart) { }

  public:
    // Get the Swift part
    inline AIMediaKit::HybridAIMediaKitSpec_cxx& getSwiftPart() noexcept {
      return _swiftPart;
    }

  public:
    // Get memory pressure
    inline size_t getExternalMemorySize() noexcept override {
      return _swiftPart.getMemorySize();
    }

  public:
    // Properties
    

  public:
    // Methods
    inline std::shared_ptr<Promise<std::string>> createVideoFromImages(const std::vector<std::string>& imageUris, const std::string& outputPath, double fps, double bitrate, double width, double height) override {
      auto __result = _swiftPart.createVideoFromImages(imageUris, outputPath, std::forward<decltype(fps)>(fps), std::forward<decltype(bitrate)>(bitrate), std::forward<decltype(width)>(width), std::forward<decltype(height)>(height));
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }
    inline double getRandomNumber(double start, double end) override {
      auto __result = _swiftPart.getRandomNumber(std::forward<decltype(start)>(start), std::forward<decltype(end)>(end));
      if (__result.hasError()) [[unlikely]] {
        std::rethrow_exception(__result.error());
      }
      auto __value = std::move(__result.value());
      return __value;
    }

  private:
    AIMediaKit::HybridAIMediaKitSpec_cxx _swiftPart;
  };

} // namespace margelo::nitro::mediakit
