/* preference_group.c generated by valac 0.56.19, the Vala compiler
 * generated from preference_group.vala, do not modify */

#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gee.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define _g_free0(var) (var = (g_free (var), NULL))

#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_ANY (dino_ui_view_model_preferences_row_any_get_type ())
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_ANY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_ANY, DinoUiViewModelPreferencesRowAny))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_ANY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_ANY, DinoUiViewModelPreferencesRowAnyClass))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_ANY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_ANY))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_ANY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_ANY))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_ANY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_ANY, DinoUiViewModelPreferencesRowAnyClass))

typedef struct _DinoUiViewModelPreferencesRowAny DinoUiViewModelPreferencesRowAny;
typedef struct _DinoUiViewModelPreferencesRowAnyClass DinoUiViewModelPreferencesRowAnyClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_ENTRY (dino_ui_view_model_preferences_row_entry_get_type ())
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_ENTRY, DinoUiViewModelPreferencesRowEntry))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_ENTRY, DinoUiViewModelPreferencesRowEntryClass))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_ENTRY))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_ENTRY))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_ENTRY, DinoUiViewModelPreferencesRowEntryClass))

typedef struct _DinoUiViewModelPreferencesRowEntry DinoUiViewModelPreferencesRowEntry;
typedef struct _DinoUiViewModelPreferencesRowEntryClass DinoUiViewModelPreferencesRowEntryClass;

#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_PRIVATE_TEXT (dino_ui_view_model_preferences_row_private_text_get_type ())
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_PRIVATE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_PRIVATE_TEXT, DinoUiViewModelPreferencesRowPrivateText))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_PRIVATE_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_PRIVATE_TEXT, DinoUiViewModelPreferencesRowPrivateTextClass))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_PRIVATE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_PRIVATE_TEXT))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_PRIVATE_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_PRIVATE_TEXT))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_PRIVATE_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_PRIVATE_TEXT, DinoUiViewModelPreferencesRowPrivateTextClass))

typedef struct _DinoUiViewModelPreferencesRowPrivateText DinoUiViewModelPreferencesRowPrivateText;
typedef struct _DinoUiViewModelPreferencesRowPrivateTextClass DinoUiViewModelPreferencesRowPrivateTextClass;
typedef struct _Block73Data Block73Data;

#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_TEXT (dino_ui_view_model_preferences_row_text_get_type ())
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_TEXT, DinoUiViewModelPreferencesRowText))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_TEXT, DinoUiViewModelPreferencesRowTextClass))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_TEXT))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_TEXT))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_TEXT, DinoUiViewModelPreferencesRowTextClass))

typedef struct _DinoUiViewModelPreferencesRowText DinoUiViewModelPreferencesRowText;
typedef struct _DinoUiViewModelPreferencesRowTextClass DinoUiViewModelPreferencesRowTextClass;

#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_TOGGLE (dino_ui_view_model_preferences_row_toggle_get_type ())
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TOGGLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_TOGGLE, DinoUiViewModelPreferencesRowToggle))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TOGGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_TOGGLE, DinoUiViewModelPreferencesRowToggleClass))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_TOGGLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_TOGGLE))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_TOGGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_TOGGLE))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TOGGLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_TOGGLE, DinoUiViewModelPreferencesRowToggleClass))

typedef struct _DinoUiViewModelPreferencesRowToggle DinoUiViewModelPreferencesRowToggle;
typedef struct _DinoUiViewModelPreferencesRowToggleClass DinoUiViewModelPreferencesRowToggleClass;

#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_COMBO_BOX (dino_ui_view_model_preferences_row_combo_box_get_type ())
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_COMBO_BOX, DinoUiViewModelPreferencesRowComboBox))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_COMBO_BOX, DinoUiViewModelPreferencesRowComboBoxClass))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_COMBO_BOX))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_COMBO_BOX))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_COMBO_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_COMBO_BOX, DinoUiViewModelPreferencesRowComboBoxClass))

typedef struct _DinoUiViewModelPreferencesRowComboBox DinoUiViewModelPreferencesRowComboBox;
typedef struct _DinoUiViewModelPreferencesRowComboBoxClass DinoUiViewModelPreferencesRowComboBoxClass;
typedef struct _DinoUiViewModelPreferencesRowAnyPrivate DinoUiViewModelPreferencesRowAnyPrivate;
typedef struct _DinoUiViewModelPreferencesRowComboBoxPrivate DinoUiViewModelPreferencesRowComboBoxPrivate;

#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_WIDGET_DEPRECATED (dino_ui_view_model_preferences_row_widget_deprecated_get_type ())
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_WIDGET_DEPRECATED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_WIDGET_DEPRECATED, DinoUiViewModelPreferencesRowWidgetDeprecated))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_WIDGET_DEPRECATED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_WIDGET_DEPRECATED, DinoUiViewModelPreferencesRowWidgetDeprecatedClass))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_WIDGET_DEPRECATED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_WIDGET_DEPRECATED))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_WIDGET_DEPRECATED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_WIDGET_DEPRECATED))
#define DINO_UI_VIEW_MODEL_PREFERENCES_ROW_WIDGET_DEPRECATED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_WIDGET_DEPRECATED, DinoUiViewModelPreferencesRowWidgetDeprecatedClass))

typedef struct _DinoUiViewModelPreferencesRowWidgetDeprecated DinoUiViewModelPreferencesRowWidgetDeprecated;
typedef struct _DinoUiViewModelPreferencesRowWidgetDeprecatedClass DinoUiViewModelPreferencesRowWidgetDeprecatedClass;
typedef struct _DinoUiViewModelPreferencesRowWidgetDeprecatedPrivate DinoUiViewModelPreferencesRowWidgetDeprecatedPrivate;

struct _Block73Data {
	int _ref_count_;
	DinoUiViewModelPreferencesRowEntry* entry_view_model;
	DinoUiViewModelPreferencesRowPrivateText* password_view_model;
};

struct _DinoUiViewModelPreferencesRowAny {
	GObject parent_instance;
	DinoUiViewModelPreferencesRowAnyPrivate * priv;
};

struct _DinoUiViewModelPreferencesRowAnyClass {
	GObjectClass parent_class;
};

struct _DinoUiViewModelPreferencesRowComboBox {
	DinoUiViewModelPreferencesRowAny parent_instance;
	DinoUiViewModelPreferencesRowComboBoxPrivate * priv;
	GeeList* items;
};

struct _DinoUiViewModelPreferencesRowComboBoxClass {
	DinoUiViewModelPreferencesRowAnyClass parent_class;
};

struct _DinoUiViewModelPreferencesRowWidgetDeprecated {
	DinoUiViewModelPreferencesRowAny parent_instance;
	DinoUiViewModelPreferencesRowWidgetDeprecatedPrivate * priv;
	GtkWidget* widget;
};

struct _DinoUiViewModelPreferencesRowWidgetDeprecatedClass {
	DinoUiViewModelPreferencesRowAnyClass parent_class;
};

VALA_EXTERN AdwPreferencesGroup* dino_ui_util_rows_to_preference_group (GListStore* row_view_models,
                                                            const gchar* title);
VALA_EXTERN GType dino_ui_view_model_preferences_row_any_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelPreferencesRowAny, g_object_unref)
VALA_EXTERN AdwPreferencesRow* dino_ui_util_row_to_preference_row (DinoUiViewModelPreferencesRowAny* preferences_row);
VALA_EXTERN GType dino_ui_view_model_preferences_row_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelPreferencesRowEntry, g_object_unref)
VALA_EXTERN GType dino_ui_view_model_preferences_row_private_text_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelPreferencesRowPrivateText, g_object_unref)
static Block73Data* block73_data_ref (Block73Data* _data73_);
static void block73_data_unref (void * _userdata_);
VALA_EXTERN const gchar* dino_ui_view_model_preferences_row_any_get_title (DinoUiViewModelPreferencesRowAny* self);
static gboolean ___lambda164_ (GBinding* _,
                        GValue* from,
                        GValue* to);
static gboolean ____lambda164__gbinding_transform_func (GBinding* binding,
                                                 GValue* from_value,
                                                 GValue* to_value,
                                                 gpointer self);
static void ___lambda165_ (Block73Data* _data73_);
static void ____lambda165__adw_entry_row_apply (AdwEntryRow* _sender,
                                         gpointer self);
static gboolean ___lambda166_ (GBinding* _,
                        GValue* from,
                        GValue* to);
static gboolean ____lambda166__gbinding_transform_func (GBinding* binding,
                                                 GValue* from_value,
                                                 GValue* to_value,
                                                 gpointer self);
static void ___lambda167_ (Block73Data* _data73_);
static void ____lambda167__adw_entry_row_apply (AdwEntryRow* _sender,
                                         gpointer self);
VALA_EXTERN GType dino_ui_view_model_preferences_row_text_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelPreferencesRowText, g_object_unref)
VALA_EXTERN const gchar* dino_ui_view_model_preferences_row_text_get_text (DinoUiViewModelPreferencesRowText* self);
VALA_EXTERN GtkCssProvider* dino_ui_util_force_css (GtkWidget* widget,
                                        const gchar* css);
VALA_EXTERN GType dino_ui_view_model_preferences_row_toggle_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelPreferencesRowToggle, g_object_unref)
VALA_EXTERN const gchar* dino_ui_view_model_preferences_row_toggle_get_subtitle (DinoUiViewModelPreferencesRowToggle* self);
VALA_EXTERN GType dino_ui_view_model_preferences_row_combo_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelPreferencesRowComboBox, g_object_unref)
VALA_EXTERN GType dino_ui_view_model_preferences_row_widget_deprecated_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelPreferencesRowWidgetDeprecated, g_object_unref)
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

AdwPreferencesGroup*
dino_ui_util_rows_to_preference_group (GListStore* row_view_models,
                                       const gchar* title)
{
	AdwPreferencesGroup* preference_group = NULL;
	gchar* _tmp0_;
	AdwPreferencesGroup* _tmp1_ = NULL;
	AdwPreferencesGroup* result;
	g_return_val_if_fail (row_view_models != NULL, NULL);
	g_return_val_if_fail (title != NULL, NULL);
	_tmp0_ = g_strdup (title);
	_tmp1_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	adw_preferences_group_set_title (_tmp1_, _tmp0_);
	_g_free0 (_tmp0_);
	g_object_ref_sink (_tmp1_);
	preference_group = _tmp1_;
	{
		gint preference_group_i = 0;
		preference_group_i = 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				DinoUiViewModelPreferencesRowAny* preferences_row = NULL;
				GObject* _tmp4_;
				GtkWidget* w = NULL;
				DinoUiViewModelPreferencesRowAny* _tmp5_;
				AdwPreferencesRow* _tmp6_;
				GtkWidget* _tmp7_;
				AdwPreferencesGroup* _tmp8_;
				GtkWidget* _tmp9_;
				if (!_tmp2_) {
					gint _tmp3_;
					_tmp3_ = preference_group_i;
					preference_group_i = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				if (!(((guint) preference_group_i) < g_list_model_get_n_items ((GListModel*) row_view_models))) {
					break;
				}
				_tmp4_ = g_list_model_get_item ((GListModel*) row_view_models, (guint) preference_group_i);
				preferences_row = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, DINO_UI_VIEW_MODEL_PREFERENCES_ROW_TYPE_ANY, DinoUiViewModelPreferencesRowAny);
				_tmp5_ = preferences_row;
				_tmp6_ = dino_ui_util_row_to_preference_row (_tmp5_);
				w = (GtkWidget*) _tmp6_;
				_tmp7_ = w;
				if (_tmp7_ == NULL) {
					_g_object_unref0 (w);
					_g_object_unref0 (preferences_row);
					continue;
				}
				_tmp8_ = preference_group;
				_tmp9_ = w;
				adw_preferences_group_add (_tmp8_, _tmp9_);
				_g_object_unref0 (w);
				_g_object_unref0 (preferences_row);
			}
		}
	}
	result = preference_group;
	return result;
}

static Block73Data*
block73_data_ref (Block73Data* _data73_)
{
	g_atomic_int_inc (&_data73_->_ref_count_);
	return _data73_;
}

static void
block73_data_unref (void * _userdata_)
{
	Block73Data* _data73_;
	_data73_ = (Block73Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data73_->_ref_count_)) {
		_g_object_unref0 (_data73_->password_view_model);
		_g_object_unref0 (_data73_->entry_view_model);
		g_slice_free (Block73Data, _data73_);
	}
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static gboolean
___lambda164_ (GBinding* _,
               GValue* from,
               GValue* to)
{
	gchar* str = NULL;
	GValue _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_;
	GValue _tmp4_ = {0};
	gboolean result;
	g_return_val_if_fail (_ != NULL, FALSE);
	g_return_val_if_fail (from != NULL, FALSE);
	g_return_val_if_fail (to != NULL, FALSE);
	_tmp0_ = *from;
	_tmp1_ = g_strdup (g_value_get_string (&_tmp0_));
	str = _tmp1_;
	_tmp3_ = str;
	_tmp2_ = _tmp3_;
	if (_tmp2_ == NULL) {
		_tmp2_ = "";
	}
	g_value_init (&_tmp4_, G_TYPE_STRING);
	g_value_set_string (&_tmp4_, _tmp2_);
	G_IS_VALUE (to) ? (g_value_unset (to), NULL) : NULL;
	*to = _tmp4_;
	result = TRUE;
	_g_free0 (str);
	return result;
}

static gboolean
____lambda164__gbinding_transform_func (GBinding* binding,
                                        GValue* from_value,
                                        GValue* to_value,
                                        gpointer self)
{
	gboolean result;
	result = ___lambda164_ (binding, from_value, to_value);
	return result;
}

static void
___lambda165_ (Block73Data* _data73_)
{
	DinoUiViewModelPreferencesRowEntry* _tmp0_;
	_tmp0_ = _data73_->entry_view_model;
	g_signal_emit_by_name (_tmp0_, "changed");
}

static void
____lambda165__adw_entry_row_apply (AdwEntryRow* _sender,
                                    gpointer self)
{
	___lambda165_ (self);
}

static gboolean
___lambda166_ (GBinding* _,
               GValue* from,
               GValue* to)
{
	gchar* str = NULL;
	GValue _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_;
	GValue _tmp4_ = {0};
	gboolean result;
	g_return_val_if_fail (_ != NULL, FALSE);
	g_return_val_if_fail (from != NULL, FALSE);
	g_return_val_if_fail (to != NULL, FALSE);
	_tmp0_ = *from;
	_tmp1_ = g_strdup (g_value_get_string (&_tmp0_));
	str = _tmp1_;
	_tmp3_ = str;
	_tmp2_ = _tmp3_;
	if (_tmp2_ == NULL) {
		_tmp2_ = "";
	}
	g_value_init (&_tmp4_, G_TYPE_STRING);
	g_value_set_string (&_tmp4_, _tmp2_);
	G_IS_VALUE (to) ? (g_value_unset (to), NULL) : NULL;
	*to = _tmp4_;
	result = TRUE;
	_g_free0 (str);
	return result;
}

static gboolean
____lambda166__gbinding_transform_func (GBinding* binding,
                                        GValue* from_value,
                                        GValue* to_value,
                                        gpointer self)
{
	gboolean result;
	result = ___lambda166_ (binding, from_value, to_value);
	return result;
}

static void
___lambda167_ (Block73Data* _data73_)
{
	DinoUiViewModelPreferencesRowPrivateText* _tmp0_;
	_tmp0_ = _data73_->password_view_model;
	g_signal_emit_by_name (_tmp0_, "changed");
}

static void
____lambda167__adw_entry_row_apply (AdwEntryRow* _sender,
                                    gpointer self)
{
	___lambda167_ (self);
}

AdwPreferencesRow*
dino_ui_util_row_to_preference_row (DinoUiViewModelPreferencesRowAny* preferences_row)
{
	Block73Data* _data73_;
	DinoUiViewModelPreferencesRowEntry* _tmp0_;
	DinoUiViewModelPreferencesRowEntry* _tmp1_;
	DinoUiViewModelPreferencesRowPrivateText* _tmp10_;
	DinoUiViewModelPreferencesRowPrivateText* _tmp11_;
	DinoUiViewModelPreferencesRowText* row_text = NULL;
	DinoUiViewModelPreferencesRowText* _tmp20_;
	DinoUiViewModelPreferencesRowText* _tmp21_;
	DinoUiViewModelPreferencesRowToggle* toggle_view_model = NULL;
	DinoUiViewModelPreferencesRowToggle* _tmp38_;
	DinoUiViewModelPreferencesRowToggle* _tmp39_;
	DinoUiViewModelPreferencesRowComboBox* combobox_view_model = NULL;
	DinoUiViewModelPreferencesRowComboBox* _tmp56_;
	DinoUiViewModelPreferencesRowComboBox* _tmp57_;
	DinoUiViewModelPreferencesRowWidgetDeprecated* widget_view_model = NULL;
	DinoUiViewModelPreferencesRowWidgetDeprecated* _tmp79_;
	DinoUiViewModelPreferencesRowWidgetDeprecated* _tmp80_;
	AdwPreferencesRow* result;
	g_return_val_if_fail (preferences_row != NULL, NULL);
	_data73_ = g_slice_new0 (Block73Data);
	_data73_->_ref_count_ = 1;
	_tmp0_ = _g_object_ref0 (DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_ENTRY (preferences_row) ? ((DinoUiViewModelPreferencesRowEntry*) preferences_row) : NULL);
	_data73_->entry_view_model = _tmp0_;
	_tmp1_ = _data73_->entry_view_model;
	if (_tmp1_ != NULL) {
		AdwEntryRow* view = NULL;
		DinoUiViewModelPreferencesRowEntry* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		AdwEntryRow* _tmp6_ = NULL;
		DinoUiViewModelPreferencesRowEntry* _tmp7_;
		AdwEntryRow* _tmp8_;
		AdwEntryRow* _tmp9_;
		_tmp2_ = _data73_->entry_view_model;
		_tmp3_ = dino_ui_view_model_preferences_row_any_get_title ((DinoUiViewModelPreferencesRowAny*) _tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_strdup (_tmp4_);
		_tmp6_ = (AdwEntryRow*) adw_entry_row_new ();
		adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp6_, _tmp5_);
		_g_free0 (_tmp5_);
		adw_entry_row_set_show_apply_button (_tmp6_, TRUE);
		g_object_ref_sink (_tmp6_);
		view = _tmp6_;
		_tmp7_ = _data73_->entry_view_model;
		_tmp8_ = view;
		g_object_bind_property_with_closures ((GObject*) _tmp7_, "text", (GObject*) _tmp8_, "text", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL, (GClosure*) ((____lambda164__gbinding_transform_func == NULL) ? NULL : g_cclosure_new ((GCallback) ____lambda164__gbinding_transform_func, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
		_tmp9_ = view;
		g_signal_connect_data (_tmp9_, "apply", (GCallback) ____lambda165__adw_entry_row_apply, block73_data_ref (_data73_), (GClosureNotify) block73_data_unref, 0);
		result = (AdwPreferencesRow*) view;
		block73_data_unref (_data73_);
		_data73_ = NULL;
		return result;
	}
	_tmp10_ = _g_object_ref0 (DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_PRIVATE_TEXT (preferences_row) ? ((DinoUiViewModelPreferencesRowPrivateText*) preferences_row) : NULL);
	_data73_->password_view_model = _tmp10_;
	_tmp11_ = _data73_->password_view_model;
	if (_tmp11_ != NULL) {
		AdwPasswordEntryRow* view = NULL;
		DinoUiViewModelPreferencesRowPrivateText* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		gchar* _tmp15_;
		AdwPasswordEntryRow* _tmp16_ = NULL;
		DinoUiViewModelPreferencesRowPrivateText* _tmp17_;
		AdwPasswordEntryRow* _tmp18_;
		AdwPasswordEntryRow* _tmp19_;
		_tmp12_ = _data73_->password_view_model;
		_tmp13_ = dino_ui_view_model_preferences_row_any_get_title ((DinoUiViewModelPreferencesRowAny*) _tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = g_strdup (_tmp14_);
		_tmp16_ = (AdwPasswordEntryRow*) adw_password_entry_row_new ();
		adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp16_, _tmp15_);
		_g_free0 (_tmp15_);
		adw_entry_row_set_show_apply_button ((AdwEntryRow*) _tmp16_, TRUE);
		g_object_ref_sink (_tmp16_);
		view = _tmp16_;
		_tmp17_ = _data73_->password_view_model;
		_tmp18_ = view;
		g_object_bind_property_with_closures ((GObject*) _tmp17_, "text", (GObject*) _tmp18_, "text", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL, (GClosure*) ((____lambda166__gbinding_transform_func == NULL) ? NULL : g_cclosure_new ((GCallback) ____lambda166__gbinding_transform_func, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
		_tmp19_ = view;
		g_signal_connect_data ((AdwEntryRow*) _tmp19_, "apply", (GCallback) ____lambda167__adw_entry_row_apply, block73_data_ref (_data73_), (GClosureNotify) block73_data_unref, 0);
		result = (AdwPreferencesRow*) view;
		block73_data_unref (_data73_);
		_data73_ = NULL;
		return result;
	}
	_tmp20_ = _g_object_ref0 (DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_TEXT (preferences_row) ? ((DinoUiViewModelPreferencesRowText*) preferences_row) : NULL);
	row_text = _tmp20_;
	_tmp21_ = row_text;
	if (_tmp21_ != NULL) {
		AdwActionRow* view = NULL;
		DinoUiViewModelPreferencesRowText* _tmp22_;
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		gchar* _tmp25_;
		DinoUiViewModelPreferencesRowText* _tmp26_;
		const gchar* _tmp27_;
		const gchar* _tmp28_;
		gchar* _tmp29_;
		AdwActionRow* _tmp30_ = NULL;
		AdwActionRow* _tmp31_;
		AdwActionRow* _tmp32_;
		GtkCssProvider* _tmp33_;
		GtkCssProvider* _tmp34_;
		AdwActionRow* _tmp35_;
		GtkCssProvider* _tmp36_;
		GtkCssProvider* _tmp37_;
		_tmp22_ = row_text;
		_tmp23_ = dino_ui_view_model_preferences_row_any_get_title ((DinoUiViewModelPreferencesRowAny*) _tmp22_);
		_tmp24_ = _tmp23_;
		_tmp25_ = g_strdup (_tmp24_);
		_tmp26_ = row_text;
		_tmp27_ = dino_ui_view_model_preferences_row_text_get_text (_tmp26_);
		_tmp28_ = _tmp27_;
		_tmp29_ = g_strdup (_tmp28_);
		_tmp30_ = (AdwActionRow*) adw_action_row_new ();
		adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp30_, _tmp25_);
		_g_free0 (_tmp25_);
		adw_action_row_set_subtitle (_tmp30_, _tmp29_);
		_g_free0 (_tmp29_);
		adw_action_row_set_subtitle_selectable (_tmp30_, TRUE);
		g_object_ref_sink (_tmp30_);
		view = _tmp30_;
		_tmp31_ = view;
		gtk_widget_add_css_class ((GtkWidget*) _tmp31_, "property");
		_tmp32_ = view;
		_tmp33_ = dino_ui_util_force_css ((GtkWidget*) _tmp32_, "row.property > box.header > box.title > .title { font-weight: 400; fon" \
"t-size: 9pt; opacity: 0.55; }");
		_tmp34_ = _tmp33_;
		_g_object_unref0 (_tmp34_);
		_tmp35_ = view;
		_tmp36_ = dino_ui_util_force_css ((GtkWidget*) _tmp35_, "row.property > box.header > box.title > .subtitle { font-size: inherit" \
"; opacity: 1; }");
		_tmp37_ = _tmp36_;
		_g_object_unref0 (_tmp37_);
		result = (AdwPreferencesRow*) view;
		_g_object_unref0 (row_text);
		block73_data_unref (_data73_);
		_data73_ = NULL;
		return result;
	}
	_tmp38_ = _g_object_ref0 (DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_TOGGLE (preferences_row) ? ((DinoUiViewModelPreferencesRowToggle*) preferences_row) : NULL);
	toggle_view_model = _tmp38_;
	_tmp39_ = toggle_view_model;
	if (_tmp39_ != NULL) {
		AdwActionRow* view = NULL;
		DinoUiViewModelPreferencesRowToggle* _tmp40_;
		const gchar* _tmp41_;
		const gchar* _tmp42_;
		gchar* _tmp43_;
		DinoUiViewModelPreferencesRowToggle* _tmp44_;
		const gchar* _tmp45_;
		const gchar* _tmp46_;
		gchar* _tmp47_;
		AdwActionRow* _tmp48_ = NULL;
		GtkSwitch* toggle = NULL;
		GtkSwitch* _tmp49_ = NULL;
		AdwActionRow* _tmp50_;
		GtkSwitch* _tmp51_;
		AdwActionRow* _tmp52_;
		GtkSwitch* _tmp53_;
		DinoUiViewModelPreferencesRowToggle* _tmp54_;
		GtkSwitch* _tmp55_;
		_tmp40_ = toggle_view_model;
		_tmp41_ = dino_ui_view_model_preferences_row_any_get_title ((DinoUiViewModelPreferencesRowAny*) _tmp40_);
		_tmp42_ = _tmp41_;
		_tmp43_ = g_strdup (_tmp42_);
		_tmp44_ = toggle_view_model;
		_tmp45_ = dino_ui_view_model_preferences_row_toggle_get_subtitle (_tmp44_);
		_tmp46_ = _tmp45_;
		_tmp47_ = g_strdup (_tmp46_);
		_tmp48_ = (AdwActionRow*) adw_action_row_new ();
		adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp48_, _tmp43_);
		_g_free0 (_tmp43_);
		adw_action_row_set_subtitle (_tmp48_, _tmp47_);
		_g_free0 (_tmp47_);
		g_object_ref_sink (_tmp48_);
		view = _tmp48_;
		_tmp49_ = (GtkSwitch*) gtk_switch_new ();
		gtk_widget_set_valign ((GtkWidget*) _tmp49_, GTK_ALIGN_CENTER);
		g_object_ref_sink (_tmp49_);
		toggle = _tmp49_;
		_tmp50_ = view;
		_tmp51_ = toggle;
		adw_action_row_set_activatable_widget (_tmp50_, (GtkWidget*) _tmp51_);
		_tmp52_ = view;
		_tmp53_ = toggle;
		adw_action_row_add_suffix (_tmp52_, (GtkWidget*) _tmp53_);
		_tmp54_ = toggle_view_model;
		_tmp55_ = toggle;
		g_object_bind_property_with_closures ((GObject*) _tmp54_, "state", (GObject*) _tmp55_, "active", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
		result = (AdwPreferencesRow*) view;
		_g_object_unref0 (toggle);
		_g_object_unref0 (toggle_view_model);
		_g_object_unref0 (row_text);
		block73_data_unref (_data73_);
		_data73_ = NULL;
		return result;
	}
	_tmp56_ = _g_object_ref0 (DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_COMBO_BOX (preferences_row) ? ((DinoUiViewModelPreferencesRowComboBox*) preferences_row) : NULL);
	combobox_view_model = _tmp56_;
	_tmp57_ = combobox_view_model;
	if (_tmp57_ != NULL) {
		GtkStringList* string_list = NULL;
		GtkStringList* _tmp58_;
		AdwComboRow* view = NULL;
		DinoUiViewModelPreferencesRowComboBox* _tmp70_;
		const gchar* _tmp71_;
		const gchar* _tmp72_;
		gchar* _tmp73_;
		AdwComboRow* _tmp74_ = NULL;
		AdwComboRow* _tmp75_;
		GtkStringList* _tmp76_;
		DinoUiViewModelPreferencesRowComboBox* _tmp77_;
		AdwComboRow* _tmp78_;
		_tmp58_ = gtk_string_list_new (NULL);
		string_list = _tmp58_;
		{
			GeeList* _text_list = NULL;
			DinoUiViewModelPreferencesRowComboBox* _tmp59_;
			GeeList* _tmp60_;
			gint _text_size = 0;
			GeeList* _tmp61_;
			gint _tmp62_;
			gint _tmp63_;
			gint _text_index = 0;
			_tmp59_ = combobox_view_model;
			_tmp60_ = _tmp59_->items;
			_text_list = _tmp60_;
			_tmp61_ = _text_list;
			_tmp62_ = gee_collection_get_size ((GeeCollection*) _tmp61_);
			_tmp63_ = _tmp62_;
			_text_size = _tmp63_;
			_text_index = -1;
			while (TRUE) {
				gint _tmp64_;
				gint _tmp65_;
				gchar* text = NULL;
				GeeList* _tmp66_;
				gpointer _tmp67_;
				GtkStringList* _tmp68_;
				const gchar* _tmp69_;
				_text_index = _text_index + 1;
				_tmp64_ = _text_index;
				_tmp65_ = _text_size;
				if (!(_tmp64_ < _tmp65_)) {
					break;
				}
				_tmp66_ = _text_list;
				_tmp67_ = gee_list_get (_tmp66_, _text_index);
				text = (gchar*) _tmp67_;
				_tmp68_ = string_list;
				_tmp69_ = text;
				gtk_string_list_append (_tmp68_, _tmp69_);
				_g_free0 (text);
			}
		}
		_tmp70_ = combobox_view_model;
		_tmp71_ = dino_ui_view_model_preferences_row_any_get_title ((DinoUiViewModelPreferencesRowAny*) _tmp70_);
		_tmp72_ = _tmp71_;
		_tmp73_ = g_strdup (_tmp72_);
		_tmp74_ = (AdwComboRow*) adw_combo_row_new ();
		adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp74_, _tmp73_);
		_g_free0 (_tmp73_);
		g_object_ref_sink (_tmp74_);
		view = _tmp74_;
		_tmp75_ = view;
		_tmp76_ = string_list;
		adw_combo_row_set_model (_tmp75_, (GListModel*) _tmp76_);
		_tmp77_ = combobox_view_model;
		_tmp78_ = view;
		g_object_bind_property_with_closures ((GObject*) _tmp77_, "active-item", (GObject*) _tmp78_, "selected", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
		result = (AdwPreferencesRow*) view;
		_g_object_unref0 (string_list);
		_g_object_unref0 (combobox_view_model);
		_g_object_unref0 (toggle_view_model);
		_g_object_unref0 (row_text);
		block73_data_unref (_data73_);
		_data73_ = NULL;
		return result;
	}
	_tmp79_ = _g_object_ref0 (DINO_UI_VIEW_MODEL_PREFERENCES_ROW_IS_WIDGET_DEPRECATED (preferences_row) ? ((DinoUiViewModelPreferencesRowWidgetDeprecated*) preferences_row) : NULL);
	widget_view_model = _tmp79_;
	_tmp80_ = widget_view_model;
	if (_tmp80_ != NULL) {
		AdwActionRow* view = NULL;
		DinoUiViewModelPreferencesRowWidgetDeprecated* _tmp81_;
		const gchar* _tmp82_;
		const gchar* _tmp83_;
		gchar* _tmp84_;
		AdwActionRow* _tmp85_ = NULL;
		AdwActionRow* _tmp86_;
		DinoUiViewModelPreferencesRowWidgetDeprecated* _tmp87_;
		GtkWidget* _tmp88_;
		_tmp81_ = widget_view_model;
		_tmp82_ = dino_ui_view_model_preferences_row_any_get_title ((DinoUiViewModelPreferencesRowAny*) _tmp81_);
		_tmp83_ = _tmp82_;
		_tmp84_ = g_strdup (_tmp83_);
		_tmp85_ = (AdwActionRow*) adw_action_row_new ();
		adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp85_, _tmp84_);
		_g_free0 (_tmp84_);
		g_object_ref_sink (_tmp85_);
		view = _tmp85_;
		_tmp86_ = view;
		_tmp87_ = widget_view_model;
		_tmp88_ = _tmp87_->widget;
		adw_action_row_add_suffix (_tmp86_, _tmp88_);
		result = (AdwPreferencesRow*) view;
		_g_object_unref0 (widget_view_model);
		_g_object_unref0 (combobox_view_model);
		_g_object_unref0 (toggle_view_model);
		_g_object_unref0 (row_text);
		block73_data_unref (_data73_);
		_data73_ = NULL;
		return result;
	}
	result = NULL;
	_g_object_unref0 (widget_view_model);
	_g_object_unref0 (combobox_view_model);
	_g_object_unref0 (toggle_view_model);
	_g_object_unref0 (row_text);
	block73_data_unref (_data73_);
	_data73_ = NULL;
	return result;
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

