///
/// LDP_CustomStyle.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



#include <string>
#include <vector>

namespace margelo::nitro::lunardatepicker {

  /**
   * A struct which can be represented as a JavaScript object (LDP_CustomStyle).
   */
  struct LDP_CustomStyle final {
  public:
    std::string titleColor     SWIFT_PRIVATE;
    std::string cancelColor     SWIFT_PRIVATE;
    std::string dateLabelColor     SWIFT_PRIVATE;
    std::string todayLabelColor     SWIFT_PRIVATE;
    std::string lunarDateLabelColor     SWIFT_PRIVATE;
    std::string selectedTextColor     SWIFT_PRIVATE;
    std::string weekendLabelColor     SWIFT_PRIVATE;
    std::string specialDayLabelColor     SWIFT_PRIVATE;
    std::string monthLabelColor     SWIFT_PRIVATE;
    std::string secondColor     SWIFT_PRIVATE;
    std::string backgroundColor     SWIFT_PRIVATE;
    std::string weekViewBackgroundColor     SWIFT_PRIVATE;
    std::string selectedBackgroundColor     SWIFT_PRIVATE;
    std::string rangeBackgroundColor     SWIFT_PRIVATE;
    std::vector<std::string> gradientColors     SWIFT_PRIVATE;
    std::string borderColor     SWIFT_PRIVATE;

  public:
    LDP_CustomStyle() = default;
    explicit LDP_CustomStyle(std::string titleColor, std::string cancelColor, std::string dateLabelColor, std::string todayLabelColor, std::string lunarDateLabelColor, std::string selectedTextColor, std::string weekendLabelColor, std::string specialDayLabelColor, std::string monthLabelColor, std::string secondColor, std::string backgroundColor, std::string weekViewBackgroundColor, std::string selectedBackgroundColor, std::string rangeBackgroundColor, std::vector<std::string> gradientColors, std::string borderColor): titleColor(titleColor), cancelColor(cancelColor), dateLabelColor(dateLabelColor), todayLabelColor(todayLabelColor), lunarDateLabelColor(lunarDateLabelColor), selectedTextColor(selectedTextColor), weekendLabelColor(weekendLabelColor), specialDayLabelColor(specialDayLabelColor), monthLabelColor(monthLabelColor), secondColor(secondColor), backgroundColor(backgroundColor), weekViewBackgroundColor(weekViewBackgroundColor), selectedBackgroundColor(selectedBackgroundColor), rangeBackgroundColor(rangeBackgroundColor), gradientColors(gradientColors), borderColor(borderColor) {}

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

} // namespace margelo::nitro::lunardatepicker

namespace margelo::nitro {

  // C++ LDP_CustomStyle <> JS LDP_CustomStyle (object)
  template <>
  struct JSIConverter<margelo::nitro::lunardatepicker::LDP_CustomStyle> final {
    static inline margelo::nitro::lunardatepicker::LDP_CustomStyle fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
      jsi::Object obj = arg.asObject(runtime);
      return margelo::nitro::lunardatepicker::LDP_CustomStyle(
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "titleColor"))),
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "cancelColor"))),
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "dateLabelColor"))),
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "todayLabelColor"))),
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "lunarDateLabelColor"))),
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "selectedTextColor"))),
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "weekendLabelColor"))),
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "specialDayLabelColor"))),
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "monthLabelColor"))),
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "secondColor"))),
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "backgroundColor"))),
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "weekViewBackgroundColor"))),
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "selectedBackgroundColor"))),
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "rangeBackgroundColor"))),
        JSIConverter<std::vector<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "gradientColors"))),
        JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "borderColor")))
      );
    }
    static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::lunardatepicker::LDP_CustomStyle& arg) {
      jsi::Object obj(runtime);
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "titleColor"), JSIConverter<std::string>::toJSI(runtime, arg.titleColor));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "cancelColor"), JSIConverter<std::string>::toJSI(runtime, arg.cancelColor));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "dateLabelColor"), JSIConverter<std::string>::toJSI(runtime, arg.dateLabelColor));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "todayLabelColor"), JSIConverter<std::string>::toJSI(runtime, arg.todayLabelColor));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "lunarDateLabelColor"), JSIConverter<std::string>::toJSI(runtime, arg.lunarDateLabelColor));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "selectedTextColor"), JSIConverter<std::string>::toJSI(runtime, arg.selectedTextColor));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "weekendLabelColor"), JSIConverter<std::string>::toJSI(runtime, arg.weekendLabelColor));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "specialDayLabelColor"), JSIConverter<std::string>::toJSI(runtime, arg.specialDayLabelColor));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "monthLabelColor"), JSIConverter<std::string>::toJSI(runtime, arg.monthLabelColor));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "secondColor"), JSIConverter<std::string>::toJSI(runtime, arg.secondColor));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "backgroundColor"), JSIConverter<std::string>::toJSI(runtime, arg.backgroundColor));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "weekViewBackgroundColor"), JSIConverter<std::string>::toJSI(runtime, arg.weekViewBackgroundColor));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "selectedBackgroundColor"), JSIConverter<std::string>::toJSI(runtime, arg.selectedBackgroundColor));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "rangeBackgroundColor"), JSIConverter<std::string>::toJSI(runtime, arg.rangeBackgroundColor));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "gradientColors"), JSIConverter<std::vector<std::string>>::toJSI(runtime, arg.gradientColors));
      obj.setProperty(runtime, PropNameIDCache::get(runtime, "borderColor"), JSIConverter<std::string>::toJSI(runtime, arg.borderColor));
      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<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "titleColor")))) return false;
      if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "cancelColor")))) return false;
      if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "dateLabelColor")))) return false;
      if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "todayLabelColor")))) return false;
      if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "lunarDateLabelColor")))) return false;
      if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "selectedTextColor")))) return false;
      if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "weekendLabelColor")))) return false;
      if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "specialDayLabelColor")))) return false;
      if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "monthLabelColor")))) return false;
      if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "secondColor")))) return false;
      if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "backgroundColor")))) return false;
      if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "weekViewBackgroundColor")))) return false;
      if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "selectedBackgroundColor")))) return false;
      if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "rangeBackgroundColor")))) return false;
      if (!JSIConverter<std::vector<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "gradientColors")))) return false;
      if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "borderColor")))) return false;
      return true;
    }
  };

} // namespace margelo::nitro
