///
/// NitroConfig.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/JSIConverter.hpp>)
#include <NitroModules/JSIConverter.hpp>
#else
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
#endif
#if __has_include(<NitroModules/NitroDefines.hpp>)
#include <NitroModules/NitroDefines.hpp>
#else
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
#endif
#if __has_include(<NitroModules/JSIHelpers.hpp>)
#include <NitroModules/JSIHelpers.hpp>
#else
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
#endif
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
#include <NitroModules/PropNameIDCache.hpp>
#else
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
#endif

// Forward declaration of `MediaType` to properly resolve imports.
namespace margelo::nitro::multipleimagepicker { enum class MediaType; }
// Forward declaration of `PickerResult` to properly resolve imports.
namespace margelo::nitro::multipleimagepicker { struct PickerResult; }
// Forward declaration of `SelectBoxStyle` to properly resolve imports.
namespace margelo::nitro::multipleimagepicker { enum class SelectBoxStyle; }
// Forward declaration of `SelectMode` to properly resolve imports.
namespace margelo::nitro::multipleimagepicker { enum class SelectMode; }
// Forward declaration of `PickerCropConfig` to properly resolve imports.
namespace margelo::nitro::multipleimagepicker { struct PickerCropConfig; }
// Forward declaration of `Text` to properly resolve imports.
namespace margelo::nitro::multipleimagepicker { struct Text; }
// Forward declaration of `Language` to properly resolve imports.
namespace margelo::nitro::multipleimagepicker { enum class Language; }
// Forward declaration of `Theme` to properly resolve imports.
namespace margelo::nitro::multipleimagepicker { enum class Theme; }
// Forward declaration of `Presentation` to properly resolve imports.
namespace margelo::nitro::multipleimagepicker { enum class Presentation; }
// Forward declaration of `PickerCameraConfig` to properly resolve imports.
namespace margelo::nitro::multipleimagepicker { struct PickerCameraConfig; }

#include "MediaType.hpp"
#include "PickerResult.hpp"
#include <vector>
#include "SelectBoxStyle.hpp"
#include "SelectMode.hpp"
#include <optional>
#include "PickerCropConfig.hpp"
#include "Text.hpp"
#include "Language.hpp"
#include "Theme.hpp"
#include "Presentation.hpp"
#include "PickerCameraConfig.hpp"

namespace margelo::nitro::multipleimagepicker {

  /**
   * A struct which can be represented as a JavaScript object (NitroConfig).
   */
  struct NitroConfig final {
  public:
    MediaType mediaType     SWIFT_PRIVATE;
    std::vector<PickerResult> selectedAssets     SWIFT_PRIVATE;
    SelectBoxStyle selectBoxStyle     SWIFT_PRIVATE;
    SelectMode selectMode     SWIFT_PRIVATE;
    std::optional<double> numberOfColumn     SWIFT_PRIVATE;
    std::optional<bool> isPreview     SWIFT_PRIVATE;
    std::optional<double> primaryColor     SWIFT_PRIVATE;
    std::optional<bool> allowSwipeToSelect     SWIFT_PRIVATE;
    std::optional<double> spacing     SWIFT_PRIVATE;
    std::optional<bool> isHiddenPreviewButton     SWIFT_PRIVATE;
    std::optional<bool> isHiddenOriginalButton     SWIFT_PRIVATE;
    std::optional<bool> isShowPreviewList     SWIFT_PRIVATE;
    std::optional<bool> allowHapticTouchPreview     SWIFT_PRIVATE;
    std::optional<bool> allowedLimit     SWIFT_PRIVATE;
    std::optional<double> maxVideo     SWIFT_PRIVATE;
    std::optional<double> maxSelect     SWIFT_PRIVATE;
    std::optional<double> maxVideoDuration     SWIFT_PRIVATE;
    std::optional<double> minVideoDuration     SWIFT_PRIVATE;
    std::optional<double> maxFileSize     SWIFT_PRIVATE;
    std::optional<double> backgroundDark     SWIFT_PRIVATE;
    std::optional<PickerCropConfig> crop     SWIFT_PRIVATE;
    std::optional<Text> text     SWIFT_PRIVATE;
    Language language     SWIFT_PRIVATE;
    Theme theme     SWIFT_PRIVATE;
    Presentation presentation     SWIFT_PRIVATE;
    std::optional<PickerCameraConfig> camera     SWIFT_PRIVATE;

  public:
    NitroConfig() = default;
    explicit NitroConfig(MediaType mediaType, std::vector<PickerResult> selectedAssets, SelectBoxStyle selectBoxStyle, SelectMode selectMode, std::optional<double> numberOfColumn, std::optional<bool> isPreview, std::optional<double> primaryColor, std::optional<bool> allowSwipeToSelect, std::optional<double> spacing, std::optional<bool> isHiddenPreviewButton, std::optional<bool> isHiddenOriginalButton, std::optional<bool> isShowPreviewList, std::optional<bool> allowHapticTouchPreview, std::optional<bool> allowedLimit, std::optional<double> maxVideo, std::optional<double> maxSelect, std::optional<double> maxVideoDuration, std::optional<double> minVideoDuration, std::optional<double> maxFileSize, std::optional<double> backgroundDark, std::optional<PickerCropConfig> crop, std::optional<Text> text, Language language, Theme theme, Presentation presentation, std::optional<PickerCameraConfig> camera): mediaType(mediaType), selectedAssets(selectedAssets), selectBoxStyle(selectBoxStyle), selectMode(selectMode), numberOfColumn(numberOfColumn), isPreview(isPreview), primaryColor(primaryColor), allowSwipeToSelect(allowSwipeToSelect), spacing(spacing), isHiddenPreviewButton(isHiddenPreviewButton), isHiddenOriginalButton(isHiddenOriginalButton), isShowPreviewList(isShowPreviewList), allowHapticTouchPreview(allowHapticTouchPreview), allowedLimit(allowedLimit), maxVideo(maxVideo), maxSelect(maxSelect), maxVideoDuration(maxVideoDuration), minVideoDuration(minVideoDuration), maxFileSize(maxFileSize), backgroundDark(backgroundDark), crop(crop), text(text), language(language), theme(theme), presentation(presentation), camera(camera) {}

  public:
    friend bool operator==(const NitroConfig& lhs, const NitroConfig& rhs) = default;
  };

} // namespace margelo::nitro::multipleimagepicker

namespace margelo::nitro {

  // C++ NitroConfig <> JS NitroConfig (object)
  template <>
  struct JSIConverter<margelo::nitro::multipleimagepicker::NitroConfig> final {
    static inline margelo::nitro::multipleimagepicker::NitroConfig fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
      jsi::Object obj = arg.asObject(runtime);
      return margelo::nitro::multipleimagepicker::NitroConfig(
        JSIConverter<margelo::nitro::multipleimagepicker::MediaType>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "mediaType"))),
        JSIConverter<std::vector<margelo::nitro::multipleimagepicker::PickerResult>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "selectedAssets"))),
        JSIConverter<margelo::nitro::multipleimagepicker::SelectBoxStyle>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "selectBoxStyle"))),
        JSIConverter<margelo::nitro::multipleimagepicker::SelectMode>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "selectMode"))),
        JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "numberOfColumn"))),
        JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isPreview"))),
        JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "primaryColor"))),
        JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "allowSwipeToSelect"))),
        JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "spacing"))),
        JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isHiddenPreviewButton"))),
        JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isHiddenOriginalButton"))),
        JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isShowPreviewList"))),
        JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "allowHapticTouchPreview"))),
        JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "allowedLimit"))),
        JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxVideo"))),
        JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxSelect"))),
        JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxVideoDuration"))),
        JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "minVideoDuration"))),
        JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxFileSize"))),
        JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "backgroundDark"))),
        JSIConverter<std::optional<margelo::nitro::multipleimagepicker::PickerCropConfig>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "crop"))),
        JSIConverter<std::optional<margelo::nitro::multipleimagepicker::Text>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "text"))),
        JSIConverter<margelo::nitro::multipleimagepicker::Language>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "language"))),
        JSIConverter<margelo::nitro::multipleimagepicker::Theme>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "theme"))),
        JSIConverter<margelo::nitro::multipleimagepicker::Presentation>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "presentation"))),
        JSIConverter<std::optional<margelo::nitro::multipleimagepicker::PickerCameraConfig>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "camera")))
      );
    }
    static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::multipleimagepicker::NitroConfig& arg) {
      jsi::Object obj(runtime);
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "mediaType"), JSIConverter<margelo::nitro::multipleimagepicker::MediaType>::toJSI(runtime, arg.mediaType));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "selectedAssets"), JSIConverter<std::vector<margelo::nitro::multipleimagepicker::PickerResult>>::toJSI(runtime, arg.selectedAssets));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "selectBoxStyle"), JSIConverter<margelo::nitro::multipleimagepicker::SelectBoxStyle>::toJSI(runtime, arg.selectBoxStyle));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "selectMode"), JSIConverter<margelo::nitro::multipleimagepicker::SelectMode>::toJSI(runtime, arg.selectMode));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "numberOfColumn"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.numberOfColumn));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "isPreview"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.isPreview));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "primaryColor"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.primaryColor));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "allowSwipeToSelect"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.allowSwipeToSelect));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "spacing"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.spacing));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "isHiddenPreviewButton"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.isHiddenPreviewButton));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "isHiddenOriginalButton"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.isHiddenOriginalButton));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "isShowPreviewList"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.isShowPreviewList));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "allowHapticTouchPreview"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.allowHapticTouchPreview));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "allowedLimit"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.allowedLimit));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "maxVideo"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.maxVideo));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "maxSelect"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.maxSelect));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "maxVideoDuration"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.maxVideoDuration));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "minVideoDuration"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.minVideoDuration));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "maxFileSize"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.maxFileSize));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "backgroundDark"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.backgroundDark));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "crop"), JSIConverter<std::optional<margelo::nitro::multipleimagepicker::PickerCropConfig>>::toJSI(runtime, arg.crop));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "text"), JSIConverter<std::optional<margelo::nitro::multipleimagepicker::Text>>::toJSI(runtime, arg.text));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "language"), JSIConverter<margelo::nitro::multipleimagepicker::Language>::toJSI(runtime, arg.language));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "theme"), JSIConverter<margelo::nitro::multipleimagepicker::Theme>::toJSI(runtime, arg.theme));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "presentation"), JSIConverter<margelo::nitro::multipleimagepicker::Presentation>::toJSI(runtime, arg.presentation));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "camera"), JSIConverter<std::optional<margelo::nitro::multipleimagepicker::PickerCameraConfig>>::toJSI(runtime, arg.camera));
      return obj;
    }
    static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
      if (!value.isObject()) {
        return false;
      }
      jsi::Object obj = value.getObject(runtime);
      if (!nitro::isPlainObject(runtime, obj)) {
        return false;
      }
      if (!JSIConverter<margelo::nitro::multipleimagepicker::MediaType>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "mediaType")))) return false;
      if (!JSIConverter<std::vector<margelo::nitro::multipleimagepicker::PickerResult>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "selectedAssets")))) return false;
      if (!JSIConverter<margelo::nitro::multipleimagepicker::SelectBoxStyle>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "selectBoxStyle")))) return false;
      if (!JSIConverter<margelo::nitro::multipleimagepicker::SelectMode>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "selectMode")))) return false;
      if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "numberOfColumn")))) return false;
      if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isPreview")))) return false;
      if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "primaryColor")))) return false;
      if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "allowSwipeToSelect")))) return false;
      if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "spacing")))) return false;
      if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isHiddenPreviewButton")))) return false;
      if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isHiddenOriginalButton")))) return false;
      if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isShowPreviewList")))) return false;
      if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "allowHapticTouchPreview")))) return false;
      if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "allowedLimit")))) return false;
      if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxVideo")))) return false;
      if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxSelect")))) return false;
      if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxVideoDuration")))) return false;
      if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "minVideoDuration")))) return false;
      if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxFileSize")))) return false;
      if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "backgroundDark")))) return false;
      if (!JSIConverter<std::optional<margelo::nitro::multipleimagepicker::PickerCropConfig>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "crop")))) return false;
      if (!JSIConverter<std::optional<margelo::nitro::multipleimagepicker::Text>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "text")))) return false;
      if (!JSIConverter<margelo::nitro::multipleimagepicker::Language>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "language")))) return false;
      if (!JSIConverter<margelo::nitro::multipleimagepicker::Theme>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "theme")))) return false;
      if (!JSIConverter<margelo::nitro::multipleimagepicker::Presentation>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "presentation")))) return false;
      if (!JSIConverter<std::optional<margelo::nitro::multipleimagepicker::PickerCameraConfig>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "camera")))) return false;
      return true;
    }
  };

} // namespace margelo::nitro
