///
/// JLDP_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

#include <fbjni/fbjni.h>
#include "LDP_CustomStyle.hpp"

#include <string>

namespace margelo::nitro::lunardatepicker {

  using namespace facebook;

  /**
   * The C++ JNI bridge between the C++ struct "LDP_CustomStyle" and the the Kotlin data class "LDP_CustomStyle".
   */
  struct JLDP_CustomStyle final: public jni::JavaClass<JLDP_CustomStyle> {
  public:
    static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/lunardatepicker/LDP_CustomStyle;";

  public:
    /**
     * Convert this Java/Kotlin-based struct to the C++ struct LDP_CustomStyle by copying all values to C++.
     */
    [[maybe_unused]]
    [[nodiscard]]
    LDP_CustomStyle toCpp() const {
      static const auto clazz = javaClassStatic();
      static const auto fieldTitleColor = clazz->getField<jni::JString>("titleColor");
      jni::local_ref<jni::JString> titleColor = this->getFieldValue(fieldTitleColor);
      static const auto fieldCancelColor = clazz->getField<jni::JString>("cancelColor");
      jni::local_ref<jni::JString> cancelColor = this->getFieldValue(fieldCancelColor);
      static const auto fieldDateLabelColor = clazz->getField<jni::JString>("dateLabelColor");
      jni::local_ref<jni::JString> dateLabelColor = this->getFieldValue(fieldDateLabelColor);
      static const auto fieldLunarDateLabelColor = clazz->getField<jni::JString>("lunarDateLabelColor");
      jni::local_ref<jni::JString> lunarDateLabelColor = this->getFieldValue(fieldLunarDateLabelColor);
      static const auto fieldSelectedTextColor = clazz->getField<jni::JString>("selectedTextColor");
      jni::local_ref<jni::JString> selectedTextColor = this->getFieldValue(fieldSelectedTextColor);
      static const auto fieldWeekendLabelColor = clazz->getField<jni::JString>("weekendLabelColor");
      jni::local_ref<jni::JString> weekendLabelColor = this->getFieldValue(fieldWeekendLabelColor);
      static const auto fieldSpecialDayLabelColor = clazz->getField<jni::JString>("specialDayLabelColor");
      jni::local_ref<jni::JString> specialDayLabelColor = this->getFieldValue(fieldSpecialDayLabelColor);
      static const auto fieldPriceLabelColor = clazz->getField<jni::JString>("priceLabelColor");
      jni::local_ref<jni::JString> priceLabelColor = this->getFieldValue(fieldPriceLabelColor);
      static const auto fieldCheapestPriceLabelColor = clazz->getField<jni::JString>("cheapestPriceLabelColor");
      jni::local_ref<jni::JString> cheapestPriceLabelColor = this->getFieldValue(fieldCheapestPriceLabelColor);
      static const auto fieldMonthLabelColor = clazz->getField<jni::JString>("monthLabelColor");
      jni::local_ref<jni::JString> monthLabelColor = this->getFieldValue(fieldMonthLabelColor);
      static const auto fieldBackgroundColor = clazz->getField<jni::JString>("backgroundColor");
      jni::local_ref<jni::JString> backgroundColor = this->getFieldValue(fieldBackgroundColor);
      static const auto fieldWeekViewBackgroundColor = clazz->getField<jni::JString>("weekViewBackgroundColor");
      jni::local_ref<jni::JString> weekViewBackgroundColor = this->getFieldValue(fieldWeekViewBackgroundColor);
      static const auto fieldSelectedBackgroundColor = clazz->getField<jni::JString>("selectedBackgroundColor");
      jni::local_ref<jni::JString> selectedBackgroundColor = this->getFieldValue(fieldSelectedBackgroundColor);
      static const auto fieldRangeBackgroundColor = clazz->getField<jni::JString>("rangeBackgroundColor");
      jni::local_ref<jni::JString> rangeBackgroundColor = this->getFieldValue(fieldRangeBackgroundColor);
      return LDP_CustomStyle(
        titleColor->toStdString(),
        cancelColor->toStdString(),
        dateLabelColor->toStdString(),
        lunarDateLabelColor->toStdString(),
        selectedTextColor->toStdString(),
        weekendLabelColor->toStdString(),
        specialDayLabelColor->toStdString(),
        priceLabelColor->toStdString(),
        cheapestPriceLabelColor->toStdString(),
        monthLabelColor->toStdString(),
        backgroundColor->toStdString(),
        weekViewBackgroundColor->toStdString(),
        selectedBackgroundColor->toStdString(),
        rangeBackgroundColor->toStdString()
      );
    }

  public:
    /**
     * Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
     */
    [[maybe_unused]]
    static jni::local_ref<JLDP_CustomStyle::javaobject> fromCpp(const LDP_CustomStyle& value) {
      return newInstance(
        jni::make_jstring(value.titleColor),
        jni::make_jstring(value.cancelColor),
        jni::make_jstring(value.dateLabelColor),
        jni::make_jstring(value.lunarDateLabelColor),
        jni::make_jstring(value.selectedTextColor),
        jni::make_jstring(value.weekendLabelColor),
        jni::make_jstring(value.specialDayLabelColor),
        jni::make_jstring(value.priceLabelColor),
        jni::make_jstring(value.cheapestPriceLabelColor),
        jni::make_jstring(value.monthLabelColor),
        jni::make_jstring(value.backgroundColor),
        jni::make_jstring(value.weekViewBackgroundColor),
        jni::make_jstring(value.selectedBackgroundColor),
        jni::make_jstring(value.rangeBackgroundColor)
      );
    }
  };

} // namespace margelo::nitro::lunardatepicker
