///
/// LDP_CustomStyle.hpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © 2025 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



#include <string>

namespace margelo::nitro::lunardatepicker {

  /**
   * A struct which can be represented as a JavaScript object (LDP_CustomStyle).
   */
  struct LDP_CustomStyle {
  public:
    std::string titleColor     SWIFT_PRIVATE;
    std::string cancelColor     SWIFT_PRIVATE;
    std::string dateLabelColor     SWIFT_PRIVATE;
    std::string lunarDateLabelColor     SWIFT_PRIVATE;
    std::string selectedTextColor     SWIFT_PRIVATE;
    std::string weekendLabelColor     SWIFT_PRIVATE;
    std::string specialDayLabelColor     SWIFT_PRIVATE;
    std::string priceLabelColor     SWIFT_PRIVATE;
    std::string cheapestPriceLabelColor     SWIFT_PRIVATE;
    std::string monthLabelColor     SWIFT_PRIVATE;
    std::string backgroundColor     SWIFT_PRIVATE;
    std::string weekViewBackgroundColor     SWIFT_PRIVATE;
    std::string selectedBackgroundColor     SWIFT_PRIVATE;
    std::string rangeBackgroundColor     SWIFT_PRIVATE;

  public:
    LDP_CustomStyle() = default;
    explicit LDP_CustomStyle(std::string titleColor, std::string cancelColor, std::string dateLabelColor, std::string lunarDateLabelColor, std::string selectedTextColor, std::string weekendLabelColor, std::string specialDayLabelColor, std::string priceLabelColor, std::string cheapestPriceLabelColor, std::string monthLabelColor, std::string backgroundColor, std::string weekViewBackgroundColor, std::string selectedBackgroundColor, std::string rangeBackgroundColor): titleColor(titleColor), cancelColor(cancelColor), dateLabelColor(dateLabelColor), lunarDateLabelColor(lunarDateLabelColor), selectedTextColor(selectedTextColor), weekendLabelColor(weekendLabelColor), specialDayLabelColor(specialDayLabelColor), priceLabelColor(priceLabelColor), cheapestPriceLabelColor(cheapestPriceLabelColor), monthLabelColor(monthLabelColor), backgroundColor(backgroundColor), weekViewBackgroundColor(weekViewBackgroundColor), selectedBackgroundColor(selectedBackgroundColor), rangeBackgroundColor(rangeBackgroundColor) {}
  };

} // namespace margelo::nitro::lunardatepicker

namespace margelo::nitro {

  using namespace margelo::nitro::lunardatepicker;

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

} // namespace margelo::nitro
