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

/*
 * Copyright © 2023 Alain M. (https://github.com/alainm23/planify)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301 USA
 *
 * Authored by: Alain M. <alainmh23@gmail.com>
 */

#include "planify.h"
#include <gtk/gtk.h>
#include <adwaita.h>
#include <gee.h>
#include <glib-object.h>
#include <glib.h>
#include <chrono.h>
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <pango/pango.h>
#include <gdk/gdk.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

enum  {
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_0_PROPERTY,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_HAS_TIME_PROPERTY,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_HAS_RECURRENCY_PROPERTY,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_DUEDATE_PROPERTY,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_VISIBLE_NO_DATE_PROPERTY,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_NUM_PROPERTIES
};
static GParamSpec* widgets_date_time_picker_date_time_picker_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
typedef struct _Block29Data Block29Data;
enum  {
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_0_PROPERTY,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_DUE_DATE_PROPERTY,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_TITLE_PROPERTY,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_NUM_PROPERTIES
};
static GParamSpec* widgets_date_time_picker_date_time_picker_suggested_date_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_NUM_PROPERTIES];
enum  {
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_CLICKED_SIGNAL,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_NUM_SIGNALS
};
static guint widgets_date_time_picker_date_time_picker_suggested_date_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_NUM_SIGNALS] = {0};
enum  {
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_NO_DATE_BUTTON_0_PROPERTY,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_NO_DATE_BUTTON_NUM_PROPERTIES
};
static GParamSpec* widgets_date_time_picker_date_time_picker_no_date_button_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_NO_DATE_BUTTON_NUM_PROPERTIES];
enum  {
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_NO_DATE_BUTTON_CLICKED_SIGNAL,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_NO_DATE_BUTTON_NUM_SIGNALS
};
static guint widgets_date_time_picker_date_time_picker_no_date_button_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_NO_DATE_BUTTON_NUM_SIGNALS] = {0};
enum  {
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_0_PROPERTY,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_MAIN_BUTTON_PROPERTY,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_CLEAR_REVEALER_PROPERTY,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_ICON_NAME_PROPERTY,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_TEXT_PROPERTY,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_HAS_VALUE_PROPERTY,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_LABEL_TEXT_PROPERTY,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_NUM_PROPERTIES
};
static GParamSpec* widgets_date_time_picker_date_time_picker_option_button_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_NUM_PROPERTIES];
enum  {
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_CLICKED_SIGNAL,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_CLEAR_CLICKED_SIGNAL,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_NUM_SIGNALS
};
static guint widgets_date_time_picker_date_time_picker_option_button_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_NUM_SIGNALS] = {0};
typedef struct _Block30Data Block30Data;
enum  {
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_DUEDATE_CHANGED_SIGNAL,
	WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_NUM_SIGNALS
};
static guint widgets_date_time_picker_date_time_picker_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_NUM_SIGNALS] = {0};

struct _WidgetsDateTimePickerDateTimePickerPrivate {
	WidgetsDateTimePickerTimePicker* time_picker;
	WidgetsCalendarCalendarMonth* calendar_view;
	WidgetsCalendarCalendarScroll* calendar_scroll_view;
	WidgetsDateTimePickerDateTimePickerNoDateButton* no_date_button;
	WidgetsDateTimePickerDateTimePickerOptionButton* time_option_button;
	WidgetsDateTimePickerDateTimePickerOptionButton* repeat_option_button;
	GtkRevealer* time_option_revealer;
	AdwBin* dimming_widget;
	GtkOverlay* main_overlay;
	GeeArrayList* active_revealers;
	GtkRevealer* repeat_option_revealer;
	GtkStack* main_stack;
	WidgetsDateTimePickerRepeatConfig* repeat_config_widget;
	gboolean _has_time;
	gboolean _has_recurrency;
	ObjectsDueDate* _duedate;
	GeeHashMap* signal_map;
	ChronoCore* chrono;
	guint search_timeout_id;
};

struct _Block29Data {
	int _ref_count_;
	WidgetsDateTimePickerDateTimePicker* self;
	WidgetsDateTimePickerDateTimePickerSuggestedDate* suggested_date;
};

struct _WidgetsDateTimePickerDateTimePickerSuggestedDatePrivate {
	ObjectsDueDate* _due_date;
	GtkImage* date_icon;
	GtkLabel* date_label;
	GtkButton* button;
};

struct _WidgetsDateTimePickerDateTimePickerOptionButtonPrivate {
	GtkButton* _main_button;
	GtkRevealer* _clear_revealer;
	GtkLabel* label;
	GtkImage* add_icon;
	gchar* _icon_name;
	gchar* _text;
	gboolean _has_value;
};

struct _Block30Data {
	int _ref_count_;
	WidgetsDateTimePickerDateTimePicker* self;
	ObjectsDueDate* last_parsed_duedate;
	GtkSearchEntry* search_entry;
	AdwWrapBox* suggested_date_box;
};

static gint WidgetsDateTimePickerDateTimePicker_private_offset;
static gpointer widgets_date_time_picker_date_time_picker_parent_class = NULL;
static gint WidgetsDateTimePickerDateTimePickerSuggestedDate_private_offset;
static gpointer widgets_date_time_picker_date_time_picker_suggested_date_parent_class = NULL;
static gpointer widgets_date_time_picker_date_time_picker_no_date_button_parent_class = NULL;
static gint WidgetsDateTimePickerDateTimePickerOptionButton_private_offset;
static gpointer widgets_date_time_picker_date_time_picker_option_button_parent_class = NULL;

static void widgets_date_time_picker_date_time_picker_add_default_suggestions (WidgetsDateTimePickerDateTimePicker* self,
                                                                        AdwWrapBox* box);
static ObjectsDueDate* widgets_date_time_picker_date_time_picker_build_duedate (WidgetsDateTimePickerDateTimePicker* self,
                                                                         GDateTime* date);
static void widgets_date_time_picker_date_time_picker_connect_suggested_date (WidgetsDateTimePickerDateTimePicker* self,
                                                                       WidgetsDateTimePickerDateTimePickerSuggestedDate* suggested_date);
static void __lambda188_ (WidgetsDateTimePickerDateTimePicker* self);
static void ___lambda188__widgets_date_time_picker_date_time_picker_no_date_button_clicked (WidgetsDateTimePickerDateTimePickerNoDateButton* _sender,
                                                                                     gpointer self);
static Block29Data* block29_data_ref (Block29Data* _data29_);
static void block29_data_unref (void * _userdata_);
static void __lambda187_ (Block29Data* _data29_);
static void ___lambda187__widgets_date_time_picker_date_time_picker_suggested_date_clicked (WidgetsDateTimePickerDateTimePickerSuggestedDate* _sender,
                                                                                     gpointer self);
static void widgets_date_time_picker_date_time_picker_save_time (WidgetsDateTimePickerDateTimePicker* self);
static void widgets_date_time_picker_date_time_picker_set_date (WidgetsDateTimePickerDateTimePicker* self,
                                                         GDateTime* date,
                                                         gboolean hide_popover,
                                                         gboolean no_signal);
static GDateTime* widgets_date_time_picker_date_time_picker_add_date_time (WidgetsDateTimePickerDateTimePicker* self,
                                                                    GDateTime* date,
                                                                    GDateTime* time);
static void widgets_date_time_picker_date_time_picker_build_time_picker_revealer (WidgetsDateTimePickerDateTimePicker* self);
static void widgets_date_time_picker_date_time_picker_register_revealer (WidgetsDateTimePickerDateTimePicker* self,
                                                                  GtkRevealer* revealer);
static void __lambda190_ (WidgetsDateTimePickerDateTimePicker* self);
static void ___lambda190__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda191_ (WidgetsDateTimePickerDateTimePicker* self);
static void ___lambda191__widgets_date_time_picker_time_picker_activated (WidgetsDateTimePickerTimePicker* _sender,
                                                                   gpointer self);
static void widgets_date_time_picker_date_time_picker_build_repeat_picker_revealer (WidgetsDateTimePickerDateTimePicker* self);
static void __lambda192_ (WidgetsDateTimePickerDateTimePicker* self);
static void widgets_date_time_picker_date_time_picker_apply_recurrency (WidgetsDateTimePickerDateTimePicker* self,
                                                                 RecurrencyType type,
                                                                 gint interval,
                                                                 const gchar* weeks,
                                                                 gboolean is_recurring);
static void ___lambda192__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda193_ (WidgetsDateTimePickerDateTimePicker* self);
static void ___lambda193__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda194_ (WidgetsDateTimePickerDateTimePicker* self);
static void ___lambda194__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda195_ (WidgetsDateTimePickerDateTimePicker* self);
static void ___lambda195__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda196_ (WidgetsDateTimePickerDateTimePicker* self);
static void ___lambda196__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda197_ (WidgetsDateTimePickerDateTimePicker* self);
static void ___lambda197__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda198_ (WidgetsDateTimePickerDateTimePicker* self);
static void ___lambda198__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda189_ (WidgetsDateTimePickerDateTimePicker* self);
static void widgets_date_time_picker_date_time_picker_update_dimming_visibility (WidgetsDateTimePickerDateTimePicker* self);
static void ___lambda189__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void widgets_date_time_picker_date_time_picker_show_revealer (WidgetsDateTimePickerDateTimePicker* self,
                                                              GtkRevealer* revealer,
                                                              GVoidFunc callback);
static void widgets_date_time_picker_date_time_picker_hide_all_revealers (WidgetsDateTimePickerDateTimePicker* self);
static GtkWidget* widgets_date_time_picker_date_time_picker_build_calendar_page (WidgetsDateTimePickerDateTimePicker* self);
static void __lambda199_ (WidgetsDateTimePickerDateTimePicker* self);
static void ___lambda199__widgets_calendar_calendar_scroll_day_selected (WidgetsCalendarCalendarScroll* _sender,
                                                                  gpointer self);
static void __lambda200_ (WidgetsDateTimePickerDateTimePicker* self);
static void ___lambda200__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static GtkWidget* widgets_date_time_picker_date_time_picker_build_repeat_config_page (WidgetsDateTimePickerDateTimePicker* self,
                                                                               WidgetsDateTimePickerRepeatConfig* repeat_config_widget);
static void __lambda201_ (WidgetsDateTimePickerDateTimePicker* self,
                   ObjectsDueDate* value);
static void ___lambda201__widgets_date_time_picker_repeat_config_duedate_change (WidgetsDateTimePickerRepeatConfig* _sender,
                                                                          ObjectsDueDate* duedate,
                                                                          gpointer self);
static void __lambda202_ (WidgetsDateTimePickerDateTimePicker* self);
static void ___lambda202__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static GObject * widgets_date_time_picker_date_time_picker_suggested_date_constructor (GType type,
                                                                                guint n_construct_properties,
                                                                                GObjectConstructParam * construct_properties);
static void _widgets_date_time_picker_date_time_picker_suggested_date___lambda186_ (WidgetsDateTimePickerDateTimePickerSuggestedDate* self);
static void __widgets_date_time_picker_date_time_picker_suggested_date___lambda186__gtk_button_clicked (GtkButton* _sender,
                                                                                                 gpointer self);
static void widgets_date_time_picker_date_time_picker_suggested_date_finalize (GObject * obj);
static GType widgets_date_time_picker_date_time_picker_suggested_date_get_type_once (void);
static void _vala_widgets_date_time_picker_date_time_picker_suggested_date_get_property (GObject * object,
                                                                                  guint property_id,
                                                                                  GValue * value,
                                                                                  GParamSpec * pspec);
static void _vala_widgets_date_time_picker_date_time_picker_suggested_date_set_property (GObject * object,
                                                                                  guint property_id,
                                                                                  const GValue * value,
                                                                                  GParamSpec * pspec);
static GObject * widgets_date_time_picker_date_time_picker_no_date_button_constructor (GType type,
                                                                                guint n_construct_properties,
                                                                                GObjectConstructParam * construct_properties);
static void _widgets_date_time_picker_date_time_picker_no_date_button___lambda154_ (WidgetsDateTimePickerDateTimePickerNoDateButton* self);
static void __widgets_date_time_picker_date_time_picker_no_date_button___lambda154__gtk_button_clicked (GtkButton* _sender,
                                                                                                 gpointer self);
static GType widgets_date_time_picker_date_time_picker_no_date_button_get_type_once (void);
static void widgets_date_time_picker_date_time_picker_option_button_set_main_button (WidgetsDateTimePickerDateTimePickerOptionButton* self,
                                                                              GtkButton* value);
static void widgets_date_time_picker_date_time_picker_option_button_set_clear_revealer (WidgetsDateTimePickerDateTimePickerOptionButton* self,
                                                                                 GtkRevealer* value);
static GObject * widgets_date_time_picker_date_time_picker_option_button_constructor (GType type,
                                                                               guint n_construct_properties,
                                                                               GObjectConstructParam * construct_properties);
static void _widgets_date_time_picker_date_time_picker_option_button___lambda155_ (WidgetsDateTimePickerDateTimePickerOptionButton* self);
static void __widgets_date_time_picker_date_time_picker_option_button___lambda155__gtk_button_clicked (GtkButton* _sender,
                                                                                                gpointer self);
static void _widgets_date_time_picker_date_time_picker_option_button___lambda156_ (WidgetsDateTimePickerDateTimePickerOptionButton* self);
static void __widgets_date_time_picker_date_time_picker_option_button___lambda156__gtk_button_clicked (GtkButton* _sender,
                                                                                                gpointer self);
static void widgets_date_time_picker_date_time_picker_option_button_finalize (GObject * obj);
static GType widgets_date_time_picker_date_time_picker_option_button_get_type_once (void);
static void _vala_widgets_date_time_picker_date_time_picker_option_button_get_property (GObject * object,
                                                                                 guint property_id,
                                                                                 GValue * value,
                                                                                 GParamSpec * pspec);
static void _vala_widgets_date_time_picker_date_time_picker_option_button_set_property (GObject * object,
                                                                                 guint property_id,
                                                                                 const GValue * value,
                                                                                 GParamSpec * pspec);
static GObject * widgets_date_time_picker_date_time_picker_constructor (GType type,
                                                                 guint n_construct_properties,
                                                                 GObjectConstructParam * construct_properties);
static Block30Data* block30_data_ref (Block30Data* _data30_);
static void block30_data_unref (void * _userdata_);
static void _widgets_date_time_picker_date_time_picker___lambda203_ (Block30Data* _data30_);
static gboolean __lambda204_ (Block30Data* _data30_);
static gboolean ___lambda204__gsource_func (gpointer self);
static void __widgets_date_time_picker_date_time_picker___lambda203__gtk_widget_show (GtkWidget* _sender,
                                                                               gpointer self);
static gboolean _widgets_date_time_picker_date_time_picker___lambda205_ (WidgetsDateTimePickerDateTimePicker* self,
                                                                  guint keyval,
                                                                  guint keycode,
                                                                  GdkModifierType state);
static gboolean __widgets_date_time_picker_date_time_picker___lambda205__gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                                                                        guint keyval,
                                                                                                        guint keycode,
                                                                                                        GdkModifierType state,
                                                                                                        gpointer self);
static void _widgets_date_time_picker_date_time_picker___lambda206_ (WidgetsDateTimePickerDateTimePicker* self);
static void __widgets_date_time_picker_date_time_picker___lambda206__widgets_date_time_picker_date_time_picker_option_button_clicked (WidgetsDateTimePickerDateTimePickerOptionButton* _sender,
                                                                                                                               gpointer self);
static void _widgets_date_time_picker_date_time_picker___lambda207_ (WidgetsDateTimePickerDateTimePicker* self);
static void __widgets_date_time_picker_date_time_picker___lambda207__widgets_date_time_picker_date_time_picker_option_button_clear_clicked (WidgetsDateTimePickerDateTimePickerOptionButton* _sender,
                                                                                                                                     gpointer self);
static void _widgets_date_time_picker_date_time_picker___lambda208_ (WidgetsDateTimePickerDateTimePicker* self);
static void __widgets_date_time_picker_date_time_picker___lambda208__widgets_date_time_picker_date_time_picker_option_button_clicked (WidgetsDateTimePickerDateTimePickerOptionButton* _sender,
                                                                                                                               gpointer self);
static void _widgets_date_time_picker_date_time_picker___lambda209_ (WidgetsDateTimePickerDateTimePicker* self);
static void __widgets_date_time_picker_date_time_picker___lambda209__widgets_date_time_picker_date_time_picker_option_button_clear_clicked (WidgetsDateTimePickerDateTimePickerOptionButton* _sender,
                                                                                                                                     gpointer self);
static void _widgets_date_time_picker_date_time_picker___lambda210_ (WidgetsDateTimePickerDateTimePicker* self);
static void __widgets_date_time_picker_date_time_picker___lambda210__gtk_popover_closed (GtkPopover* _sender,
                                                                                  gpointer self);
static void _widgets_date_time_picker_date_time_picker___lambda211_ (Block30Data* _data30_);
static void __widgets_date_time_picker_date_time_picker___lambda211__gtk_search_entry_activate (GtkSearchEntry* _sender,
                                                                                         gpointer self);
static void _widgets_date_time_picker_date_time_picker___lambda212_ (Block30Data* _data30_);
static gboolean __lambda213_ (Block30Data* _data30_);
static gboolean ___lambda213__gsource_func (gpointer self);
static void __widgets_date_time_picker_date_time_picker___lambda212__gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                                                               gpointer self);
static void _widgets_date_time_picker_date_time_picker___lambda214_ (WidgetsDateTimePickerDateTimePicker* self);
static void __widgets_date_time_picker_date_time_picker___lambda214__widgets_calendar_calendar_month_day_selected (WidgetsCalendarCalendarMonth* _sender,
                                                                                                            gpointer self);
static void _widgets_date_time_picker_date_time_picker___lambda215_ (WidgetsDateTimePickerDateTimePicker* self);
static gboolean __lambda216_ (WidgetsDateTimePickerDateTimePicker* self);
static gboolean ___lambda216__gsource_func (gpointer self);
static void __widgets_date_time_picker_date_time_picker___lambda215__widgets_calendar_calendar_month_choose_date_clicked (WidgetsCalendarCalendarMonth* _sender,
                                                                                                                   gpointer self);
static void _widgets_date_time_picker_date_time_picker___lambda217_ (WidgetsDateTimePickerDateTimePicker* self);
static void __widgets_date_time_picker_date_time_picker___lambda217__gtk_widget_hide (GtkWidget* _sender,
                                                                               gpointer self);
static void _widgets_date_time_picker_date_time_picker___lambda218_ (WidgetsDateTimePickerDateTimePicker* self,
                                                              gint n_press,
                                                              gdouble x,
                                                              gdouble y);
static void __widgets_date_time_picker_date_time_picker___lambda218__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                                         gint n_press,
                                                                                         gdouble x,
                                                                                         gdouble y,
                                                                                         gpointer self);
static void widgets_date_time_picker_date_time_picker_finalize (GObject * obj);
static GType widgets_date_time_picker_date_time_picker_get_type_once (void);
static void _vala_widgets_date_time_picker_date_time_picker_get_property (GObject * object,
                                                                   guint property_id,
                                                                   GValue * value,
                                                                   GParamSpec * pspec);
static void _vala_widgets_date_time_picker_date_time_picker_set_property (GObject * object,
                                                                   guint property_id,
                                                                   const GValue * value,
                                                                   GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
widgets_date_time_picker_date_time_picker_get_instance_private (WidgetsDateTimePickerDateTimePicker* self)
{
	return G_STRUCT_MEMBER_P (self, WidgetsDateTimePickerDateTimePicker_private_offset);
}

WidgetsDateTimePickerDateTimePicker*
widgets_date_time_picker_date_time_picker_construct (GType object_type)
{
	WidgetsDateTimePickerDateTimePicker * self = NULL;
	self = (WidgetsDateTimePickerDateTimePicker*) g_object_new (object_type, "has-arrow", FALSE, "position", GTK_POS_RIGHT, "width-request", 275, NULL);
	return self;
}

WidgetsDateTimePickerDateTimePicker*
widgets_date_time_picker_date_time_picker_new (void)
{
	return widgets_date_time_picker_date_time_picker_construct (WIDGETS_DATE_TIME_PICKER_TYPE_DATE_TIME_PICKER);
}

static void
__lambda188_ (WidgetsDateTimePickerDateTimePicker* self)
{
	ObjectsDueDate* _tmp0_;
	ObjectsDueDate* _tmp1_;
	_tmp0_ = objects_due_date_new ();
	_tmp1_ = _tmp0_;
	widgets_date_time_picker_date_time_picker_set_duedate (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	widgets_date_time_picker_date_time_picker_reset (self);
	g_signal_emit (self, widgets_date_time_picker_date_time_picker_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_DUEDATE_CHANGED_SIGNAL], 0);
	gtk_popover_popdown ((GtkPopover*) self);
}

static void
___lambda188__widgets_date_time_picker_date_time_picker_no_date_button_clicked (WidgetsDateTimePickerDateTimePickerNoDateButton* _sender,
                                                                                gpointer self)
{
	__lambda188_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
widgets_date_time_picker_date_time_picker_add_default_suggestions (WidgetsDateTimePickerDateTimePicker* self,
                                                                   AdwWrapBox* box)
{
	WidgetsDateTimePickerDateTimePickerSuggestedDate* today_item = NULL;
	GDateTime* _tmp0_;
	GDateTime* _tmp1_;
	ObjectsDueDate* _tmp2_;
	ObjectsDueDate* _tmp3_;
	gchar* _tmp4_;
	WidgetsDateTimePickerDateTimePickerSuggestedDate* _tmp5_ = NULL;
	WidgetsDateTimePickerDateTimePickerSuggestedDate* _tmp6_;
	WidgetsDateTimePickerDateTimePickerSuggestedDate* tomorrow_item = NULL;
	GDateTime* _tmp7_;
	GDateTime* _tmp8_;
	GDateTime* _tmp9_;
	GDateTime* _tmp10_;
	ObjectsDueDate* _tmp11_;
	ObjectsDueDate* _tmp12_;
	gchar* _tmp13_;
	WidgetsDateTimePickerDateTimePickerSuggestedDate* _tmp14_ = NULL;
	WidgetsDateTimePickerDateTimePickerSuggestedDate* _tmp15_;
	WidgetsDateTimePickerDateTimePickerSuggestedDate* next_week_item = NULL;
	GDateTime* _tmp16_;
	GDateTime* _tmp17_;
	GDateTime* _tmp18_;
	GDateTime* _tmp19_;
	ObjectsDueDate* _tmp20_;
	ObjectsDueDate* _tmp21_;
	gchar* _tmp22_;
	WidgetsDateTimePickerDateTimePickerSuggestedDate* _tmp23_ = NULL;
	WidgetsDateTimePickerDateTimePickerSuggestedDate* _tmp24_;
	WidgetsDateTimePickerDateTimePickerNoDateButton* _tmp25_ = NULL;
	WidgetsDateTimePickerDateTimePickerNoDateButton* _tmp26_;
	WidgetsDateTimePickerDateTimePickerNoDateButton* _tmp27_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (box != NULL);
	_tmp0_ = g_date_time_new_now_local ();
	_tmp1_ = _tmp0_;
	_tmp2_ = widgets_date_time_picker_date_time_picker_build_duedate (self, _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup (_ ("Today"));
	_tmp5_ = widgets_date_time_picker_date_time_picker_suggested_date_new (_tmp3_);
	widgets_date_time_picker_date_time_picker_suggested_date_set_title (_tmp5_, _tmp4_);
	_g_free0 (_tmp4_);
	g_object_ref_sink (_tmp5_);
	_tmp6_ = _tmp5_;
	_g_object_unref0 (_tmp3_);
	_g_date_time_unref0 (_tmp1_);
	today_item = _tmp6_;
	adw_wrap_box_append (box, (GtkWidget*) today_item);
	widgets_date_time_picker_date_time_picker_connect_suggested_date (self, today_item);
	_tmp7_ = g_date_time_new_now_local ();
	_tmp8_ = _tmp7_;
	_tmp9_ = g_date_time_add_days (_tmp8_, 1);
	_tmp10_ = _tmp9_;
	_tmp11_ = widgets_date_time_picker_date_time_picker_build_duedate (self, _tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = g_strdup (_ ("Tomorrow"));
	_tmp14_ = widgets_date_time_picker_date_time_picker_suggested_date_new (_tmp12_);
	widgets_date_time_picker_date_time_picker_suggested_date_set_title (_tmp14_, _tmp13_);
	_g_free0 (_tmp13_);
	g_object_ref_sink (_tmp14_);
	_tmp15_ = _tmp14_;
	_g_object_unref0 (_tmp12_);
	_g_date_time_unref0 (_tmp10_);
	_g_date_time_unref0 (_tmp8_);
	tomorrow_item = _tmp15_;
	adw_wrap_box_append (box, (GtkWidget*) tomorrow_item);
	widgets_date_time_picker_date_time_picker_connect_suggested_date (self, tomorrow_item);
	_tmp16_ = g_date_time_new_now_local ();
	_tmp17_ = _tmp16_;
	_tmp18_ = g_date_time_add_days (_tmp17_, 7);
	_tmp19_ = _tmp18_;
	_tmp20_ = widgets_date_time_picker_date_time_picker_build_duedate (self, _tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = g_strdup (_ ("Next week"));
	_tmp23_ = widgets_date_time_picker_date_time_picker_suggested_date_new (_tmp21_);
	widgets_date_time_picker_date_time_picker_suggested_date_set_title (_tmp23_, _tmp22_);
	_g_free0 (_tmp22_);
	g_object_ref_sink (_tmp23_);
	_tmp24_ = _tmp23_;
	_g_object_unref0 (_tmp21_);
	_g_date_time_unref0 (_tmp19_);
	_g_date_time_unref0 (_tmp17_);
	next_week_item = _tmp24_;
	adw_wrap_box_append (box, (GtkWidget*) next_week_item);
	widgets_date_time_picker_date_time_picker_connect_suggested_date (self, next_week_item);
	_tmp25_ = widgets_date_time_picker_date_time_picker_no_date_button_new ();
	gtk_widget_set_visible ((GtkWidget*) _tmp25_, FALSE);
	g_object_ref_sink (_tmp25_);
	_g_object_unref0 (self->priv->no_date_button);
	self->priv->no_date_button = _tmp25_;
	_tmp26_ = self->priv->no_date_button;
	adw_wrap_box_append (box, (GtkWidget*) _tmp26_);
	_tmp27_ = self->priv->no_date_button;
	g_signal_connect_object (_tmp27_, "clicked", (GCallback) ___lambda188__widgets_date_time_picker_date_time_picker_no_date_button_clicked, self, 0);
	_g_object_unref0 (next_week_item);
	_g_object_unref0 (tomorrow_item);
	_g_object_unref0 (today_item);
}

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

static Block29Data*
block29_data_ref (Block29Data* _data29_)
{
	g_atomic_int_inc (&_data29_->_ref_count_);
	return _data29_;
}

static void
block29_data_unref (void * _userdata_)
{
	Block29Data* _data29_;
	_data29_ = (Block29Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data29_->_ref_count_)) {
		WidgetsDateTimePickerDateTimePicker* self;
		self = _data29_->self;
		_g_object_unref0 (_data29_->suggested_date);
		_g_object_unref0 (self);
		g_slice_free (Block29Data, _data29_);
	}
}

static void
__lambda187_ (Block29Data* _data29_)
{
	WidgetsDateTimePickerDateTimePicker* self;
	ObjectsDueDate* _tmp0_;
	ObjectsDueDate* _tmp1_;
	ObjectsDueDate* _tmp2_;
	GDateTime* _tmp3_;
	GDateTime* _tmp4_;
	self = _data29_->self;
	_tmp0_ = self->priv->_duedate;
	_tmp1_ = widgets_date_time_picker_date_time_picker_suggested_date_get_due_date (_data29_->suggested_date);
	_tmp2_ = _tmp1_;
	_tmp3_ = objects_due_date_get_datetime (_tmp2_);
	_tmp4_ = _tmp3_;
	objects_due_date_set_datetime (_tmp0_, _tmp4_);
	widgets_date_time_picker_date_time_picker_set_visible_no_date (self, TRUE);
	g_signal_emit (self, widgets_date_time_picker_date_time_picker_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_DUEDATE_CHANGED_SIGNAL], 0);
	gtk_popover_popdown ((GtkPopover*) self);
}

static void
___lambda187__widgets_date_time_picker_date_time_picker_suggested_date_clicked (WidgetsDateTimePickerDateTimePickerSuggestedDate* _sender,
                                                                                gpointer self)
{
	__lambda187_ (self);
}

static void
widgets_date_time_picker_date_time_picker_connect_suggested_date (WidgetsDateTimePickerDateTimePicker* self,
                                                                  WidgetsDateTimePickerDateTimePickerSuggestedDate* suggested_date)
{
	Block29Data* _data29_;
	WidgetsDateTimePickerDateTimePickerSuggestedDate* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (suggested_date != NULL);
	_data29_ = g_slice_new0 (Block29Data);
	_data29_->_ref_count_ = 1;
	_data29_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (suggested_date);
	_g_object_unref0 (_data29_->suggested_date);
	_data29_->suggested_date = _tmp0_;
	g_signal_connect_data (_data29_->suggested_date, "clicked", (GCallback) ___lambda187__widgets_date_time_picker_date_time_picker_suggested_date_clicked, block29_data_ref (_data29_), (GClosureNotify) block29_data_unref, 0);
	block29_data_unref (_data29_);
	_data29_ = NULL;
}

static void
widgets_date_time_picker_date_time_picker_save_time (WidgetsDateTimePickerDateTimePicker* self)
{
	ObjectsDueDate* _tmp0_;
	ObjectsDueDate* _tmp1_;
	GDateTime* _tmp2_;
	GDateTime* _tmp3_;
	WidgetsDateTimePickerDateTimePickerOptionButton* _tmp8_;
	WidgetsDateTimePickerTimePicker* _tmp9_;
	GDateTime* _tmp10_;
	GDateTime* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	GtkRevealer* _tmp16_;
	g_return_if_fail (self != NULL);
	widgets_date_time_picker_date_time_picker_set_visible_no_date (self, TRUE);
	widgets_date_time_picker_date_time_picker_set_has_time (self, TRUE);
	_tmp0_ = widgets_date_time_picker_date_time_picker_get_duedate (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = objects_due_date_get_datetime (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == NULL) {
		ObjectsDueDate* _tmp4_;
		WidgetsDateTimePickerTimePicker* _tmp5_;
		GDateTime* _tmp6_;
		GDateTime* _tmp7_;
		_tmp4_ = self->priv->_duedate;
		_tmp5_ = self->priv->time_picker;
		_tmp6_ = widgets_date_time_picker_time_picker_get_time (_tmp5_);
		_tmp7_ = _tmp6_;
		objects_due_date_set_datetime (_tmp4_, _tmp7_);
	}
	_tmp8_ = self->priv->time_option_button;
	_tmp9_ = self->priv->time_picker;
	_tmp10_ = widgets_date_time_picker_time_picker_get_time (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = utils_datetime_get_default_time_format (utils_datetime_is_clock_format_12h (), FALSE);
	_tmp13_ = _tmp12_;
	_tmp14_ = g_date_time_format (_tmp11_, _tmp13_);
	_tmp15_ = _tmp14_;
	widgets_date_time_picker_date_time_picker_option_button_set_label_text (_tmp8_, _tmp15_);
	_g_free0 (_tmp15_);
	_g_free0 (_tmp13_);
	_tmp16_ = self->priv->time_option_revealer;
	gtk_revealer_set_reveal_child (_tmp16_, FALSE);
	g_signal_emit (self, widgets_date_time_picker_date_time_picker_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_DUEDATE_CHANGED_SIGNAL], 0);
}

static ObjectsDueDate*
widgets_date_time_picker_date_time_picker_build_duedate (WidgetsDateTimePickerDateTimePicker* self,
                                                         GDateTime* date)
{
	ObjectsDueDate* duedate = NULL;
	ObjectsDueDate* _tmp0_;
	GDateTime* _tmp1_;
	GDateTime* _tmp2_;
	ObjectsDueDate* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (date != NULL, NULL);
	_tmp0_ = objects_due_date_new ();
	duedate = _tmp0_;
	_tmp1_ = utils_datetime_get_date_only (date);
	_tmp2_ = _tmp1_;
	objects_due_date_set_datetime (duedate, _tmp2_);
	_g_date_time_unref0 (_tmp2_);
	result = duedate;
	return result;
}

static void
widgets_date_time_picker_date_time_picker_set_date (WidgetsDateTimePickerDateTimePicker* self,
                                                    GDateTime* date,
                                                    gboolean hide_popover,
                                                    gboolean no_signal)
{
	ObjectsDueDate* _tmp0_;
	GDateTime* _tmp1_;
	GDateTime* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (date != NULL);
	_tmp0_ = self->priv->_duedate;
	_tmp1_ = utils_datetime_get_date_only (date);
	_tmp2_ = _tmp1_;
	objects_due_date_set_datetime (_tmp0_, _tmp2_);
	_g_date_time_unref0 (_tmp2_);
	if (hide_popover) {
		gtk_popover_popdown ((GtkPopover*) self);
	}
	if (!no_signal) {
		g_signal_emit (self, widgets_date_time_picker_date_time_picker_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_DUEDATE_CHANGED_SIGNAL], 0);
	}
}

static GDateTime*
widgets_date_time_picker_date_time_picker_add_date_time (WidgetsDateTimePickerDateTimePicker* self,
                                                         GDateTime* date,
                                                         GDateTime* time)
{
	GDateTime* _tmp0_;
	GDateTime* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (date != NULL, NULL);
	g_return_val_if_fail (time != NULL, NULL);
	_tmp0_ = g_date_time_new_local (g_date_time_get_year (date), g_date_time_get_month (date), g_date_time_get_day_of_month (date), g_date_time_get_hour (time), g_date_time_get_minute (time), (gdouble) g_date_time_get_second (time));
	result = _tmp0_;
	return result;
}

static gpointer
_g_date_time_ref0 (gpointer self)
{
	return self ? g_date_time_ref (self) : NULL;
}

void
widgets_date_time_picker_date_time_picker_set_recurrency (WidgetsDateTimePickerDateTimePicker* self,
                                                          ObjectsDueDate* value)
{
	gboolean _tmp0_ = FALSE;
	RecurrencyType _tmp1_;
	RecurrencyType _tmp2_;
	ObjectsDueDate* _tmp60_;
	gboolean _tmp61_;
	gboolean _tmp62_;
	ObjectsDueDate* _tmp63_;
	RecurrencyType _tmp64_;
	RecurrencyType _tmp65_;
	ObjectsDueDate* _tmp66_;
	gint _tmp67_;
	gint _tmp68_;
	ObjectsDueDate* _tmp69_;
	const gchar* _tmp70_;
	const gchar* _tmp71_;
	ObjectsDueDate* _tmp72_;
	gint _tmp73_;
	gint _tmp74_;
	ObjectsDueDate* _tmp75_;
	const gchar* _tmp76_;
	const gchar* _tmp77_;
	ObjectsDueDate* _tmp78_;
	gboolean _tmp79_;
	gboolean _tmp80_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (value != NULL);
	_tmp1_ = objects_due_date_get_recurrency_type (value);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == RECURRENCY_TYPE_MINUTELY) {
		_tmp0_ = TRUE;
	} else {
		RecurrencyType _tmp3_;
		RecurrencyType _tmp4_;
		_tmp3_ = objects_due_date_get_recurrency_type (value);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ == RECURRENCY_TYPE_HOURLY;
	}
	if (_tmp0_) {
		ObjectsDueDate* _tmp5_;
		GDateTime* _tmp6_;
		GDateTime* _tmp7_;
		_tmp5_ = self->priv->_duedate;
		_tmp6_ = objects_due_date_get_datetime (_tmp5_);
		_tmp7_ = _tmp6_;
		if (_tmp7_ == NULL) {
			ObjectsDueDate* _tmp8_;
			GDateTime* _tmp9_;
			GDateTime* _tmp10_;
			gchar* _tmp11_;
			gchar* _tmp12_;
			_tmp8_ = self->priv->_duedate;
			_tmp9_ = g_date_time_new_now_local ();
			_tmp10_ = _tmp9_;
			_tmp11_ = utils_datetime_get_todoist_datetime_format (_tmp10_);
			_tmp12_ = _tmp11_;
			objects_due_date_set_date (_tmp8_, _tmp12_);
			_g_free0 (_tmp12_);
			_g_date_time_unref0 (_tmp10_);
		}
	} else {
		gboolean _tmp13_ = FALSE;
		gboolean _tmp14_ = FALSE;
		RecurrencyType _tmp15_;
		RecurrencyType _tmp16_;
		_tmp15_ = objects_due_date_get_recurrency_type (value);
		_tmp16_ = _tmp15_;
		if (_tmp16_ == RECURRENCY_TYPE_EVERY_DAY) {
			_tmp14_ = TRUE;
		} else {
			RecurrencyType _tmp17_;
			RecurrencyType _tmp18_;
			_tmp17_ = objects_due_date_get_recurrency_type (value);
			_tmp18_ = _tmp17_;
			_tmp14_ = _tmp18_ == RECURRENCY_TYPE_EVERY_MONTH;
		}
		if (_tmp14_) {
			_tmp13_ = TRUE;
		} else {
			RecurrencyType _tmp19_;
			RecurrencyType _tmp20_;
			_tmp19_ = objects_due_date_get_recurrency_type (value);
			_tmp20_ = _tmp19_;
			_tmp13_ = _tmp20_ == RECURRENCY_TYPE_EVERY_YEAR;
		}
		if (_tmp13_) {
			ObjectsDueDate* _tmp21_;
			GDateTime* _tmp22_;
			GDateTime* _tmp23_;
			_tmp21_ = self->priv->_duedate;
			_tmp22_ = objects_due_date_get_datetime (_tmp21_);
			_tmp23_ = _tmp22_;
			if (_tmp23_ == NULL) {
				ObjectsDueDate* _tmp24_;
				GDateTime* _tmp25_;
				GDateTime* _tmp26_;
				gchar* _tmp27_;
				gchar* _tmp28_;
				_tmp24_ = self->priv->_duedate;
				_tmp25_ = utils_datetime_get_today_format_date ();
				_tmp26_ = _tmp25_;
				_tmp27_ = utils_datetime_get_todoist_datetime_format (_tmp26_);
				_tmp28_ = _tmp27_;
				objects_due_date_set_date (_tmp24_, _tmp28_);
				_g_free0 (_tmp28_);
				_g_date_time_unref0 (_tmp26_);
			}
		} else {
			RecurrencyType _tmp29_;
			RecurrencyType _tmp30_;
			_tmp29_ = objects_due_date_get_recurrency_type (value);
			_tmp30_ = _tmp29_;
			if (_tmp30_ == RECURRENCY_TYPE_EVERY_WEEK) {
				gboolean _tmp31_;
				gboolean _tmp32_;
				_tmp31_ = objects_due_date_get_has_weeks (value);
				_tmp32_ = _tmp31_;
				if (_tmp32_) {
					GDateTime* due_selected = NULL;
					GDateTime* _tmp33_;
					ObjectsDueDate* _tmp34_;
					GDateTime* _tmp35_;
					GDateTime* _tmp36_;
					gint day_of_week = 0;
					GDateTime* _tmp42_;
					gint next_day = 0;
					GDateTime* _tmp43_;
					GDateTime* due_date = NULL;
					ObjectsDueDate* _tmp48_;
					GDateTime* _tmp49_;
					gchar* _tmp50_;
					gchar* _tmp51_;
					_tmp33_ = utils_datetime_get_today_format_date ();
					due_selected = _tmp33_;
					_tmp34_ = self->priv->_duedate;
					_tmp35_ = objects_due_date_get_datetime (_tmp34_);
					_tmp36_ = _tmp35_;
					if (_tmp36_ != NULL) {
						ObjectsDueDate* _tmp37_;
						ObjectsDueDate* _tmp38_;
						GDateTime* _tmp39_;
						GDateTime* _tmp40_;
						GDateTime* _tmp41_;
						_tmp37_ = widgets_date_time_picker_date_time_picker_get_duedate (self);
						_tmp38_ = _tmp37_;
						_tmp39_ = objects_due_date_get_datetime (_tmp38_);
						_tmp40_ = _tmp39_;
						_tmp41_ = _g_date_time_ref0 (_tmp40_);
						_g_date_time_unref0 (due_selected);
						due_selected = _tmp41_;
					}
					_tmp42_ = due_selected;
					day_of_week = g_date_time_get_day_of_week (_tmp42_);
					_tmp43_ = due_selected;
					next_day = utils_datetime_get_next_day_of_week_from_recurrency_week (_tmp43_, value);
					due_date = NULL;
					if (day_of_week == next_day) {
						GDateTime* _tmp44_;
						GDateTime* _tmp45_;
						_tmp44_ = due_selected;
						_tmp45_ = _g_date_time_ref0 (_tmp44_);
						_g_date_time_unref0 (due_date);
						due_date = _tmp45_;
					} else {
						GDateTime* _tmp46_;
						GDateTime* _tmp47_;
						_tmp46_ = due_selected;
						_tmp47_ = utils_datetime_next_recurrency_week (_tmp46_, value, FALSE);
						_g_date_time_unref0 (due_date);
						due_date = _tmp47_;
					}
					_tmp48_ = self->priv->_duedate;
					_tmp49_ = due_date;
					_tmp50_ = utils_datetime_get_todoist_datetime_format (_tmp49_);
					_tmp51_ = _tmp50_;
					objects_due_date_set_date (_tmp48_, _tmp51_);
					_g_free0 (_tmp51_);
					_g_date_time_unref0 (due_date);
					_g_date_time_unref0 (due_selected);
				} else {
					ObjectsDueDate* _tmp52_;
					GDateTime* _tmp53_;
					GDateTime* _tmp54_;
					_tmp52_ = self->priv->_duedate;
					_tmp53_ = objects_due_date_get_datetime (_tmp52_);
					_tmp54_ = _tmp53_;
					if (_tmp54_ == NULL) {
						ObjectsDueDate* _tmp55_;
						GDateTime* _tmp56_;
						GDateTime* _tmp57_;
						gchar* _tmp58_;
						gchar* _tmp59_;
						_tmp55_ = self->priv->_duedate;
						_tmp56_ = utils_datetime_get_today_format_date ();
						_tmp57_ = _tmp56_;
						_tmp58_ = utils_datetime_get_todoist_datetime_format (_tmp57_);
						_tmp59_ = _tmp58_;
						objects_due_date_set_date (_tmp55_, _tmp59_);
						_g_free0 (_tmp59_);
						_g_date_time_unref0 (_tmp57_);
					}
				}
			}
		}
	}
	_tmp60_ = self->priv->_duedate;
	_tmp61_ = objects_due_date_get_is_recurring (value);
	_tmp62_ = _tmp61_;
	objects_due_date_set_is_recurring (_tmp60_, _tmp62_);
	_tmp63_ = self->priv->_duedate;
	_tmp64_ = objects_due_date_get_recurrency_type (value);
	_tmp65_ = _tmp64_;
	objects_due_date_set_recurrency_type (_tmp63_, _tmp65_);
	_tmp66_ = self->priv->_duedate;
	_tmp67_ = objects_due_date_get_recurrency_interval (value);
	_tmp68_ = _tmp67_;
	objects_due_date_set_recurrency_interval (_tmp66_, _tmp68_);
	_tmp69_ = self->priv->_duedate;
	_tmp70_ = objects_due_date_get_recurrency_weeks (value);
	_tmp71_ = _tmp70_;
	objects_due_date_set_recurrency_weeks (_tmp69_, _tmp71_);
	_tmp72_ = self->priv->_duedate;
	_tmp73_ = objects_due_date_get_recurrency_count (value);
	_tmp74_ = _tmp73_;
	objects_due_date_set_recurrency_count (_tmp72_, _tmp74_);
	_tmp75_ = self->priv->_duedate;
	_tmp76_ = objects_due_date_get_recurrency_end (value);
	_tmp77_ = _tmp76_;
	objects_due_date_set_recurrency_end (_tmp75_, _tmp77_);
	_tmp78_ = self->priv->_duedate;
	_tmp79_ = objects_due_date_get_recurrency_last_day_of_month (value);
	_tmp80_ = _tmp79_;
	objects_due_date_set_recurrency_last_day_of_month (_tmp78_, _tmp80_);
	widgets_date_time_picker_date_time_picker_set_visible_no_date (self, TRUE);
}

void
widgets_date_time_picker_date_time_picker_reset (WidgetsDateTimePickerDateTimePicker* self)
{
	WidgetsDateTimePickerDateTimePickerOptionButton* _tmp0_;
	WidgetsDateTimePickerTimePicker* _tmp1_;
	WidgetsCalendarCalendarMonth* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->time_option_button;
	widgets_date_time_picker_date_time_picker_option_button_set_label_text (_tmp0_, _ ("Time"));
	widgets_date_time_picker_date_time_picker_set_has_time (self, FALSE);
	_tmp1_ = self->priv->time_picker;
	if (_tmp1_ != NULL) {
		WidgetsDateTimePickerTimePicker* _tmp2_;
		_tmp2_ = self->priv->time_picker;
		widgets_date_time_picker_time_picker_reset (_tmp2_);
	}
	widgets_date_time_picker_date_time_picker_set_visible_no_date (self, FALSE);
	widgets_date_time_picker_date_time_picker_set_has_recurrency (self, FALSE);
	_tmp3_ = self->priv->calendar_view;
	if (_tmp3_ != NULL) {
		WidgetsCalendarCalendarMonth* _tmp4_;
		_tmp4_ = self->priv->calendar_view;
		widgets_calendar_calendar_month_reset (_tmp4_);
	}
}

static void
__lambda190_ (WidgetsDateTimePickerDateTimePicker* self)
{
	widgets_date_time_picker_date_time_picker_save_time (self);
}

static void
___lambda190__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda190_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
__lambda191_ (WidgetsDateTimePickerDateTimePicker* self)
{
	widgets_date_time_picker_date_time_picker_save_time (self);
}

static void
___lambda191__widgets_date_time_picker_time_picker_activated (WidgetsDateTimePickerTimePicker* _sender,
                                                              gpointer self)
{
	__lambda191_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
widgets_date_time_picker_date_time_picker_build_time_picker_revealer (WidgetsDateTimePickerDateTimePicker* self)
{
	WidgetsDateTimePickerTimePicker* _tmp0_ = NULL;
	GtkButton* save_time_button = NULL;
	GtkButton* _tmp1_;
	GtkBox* time_option_box = NULL;
	GtkBox* _tmp2_ = NULL;
	WidgetsDateTimePickerTimePicker* _tmp3_;
	AdwBin* time_option_container = NULL;
	GtkWidget* _tmp4_;
	AdwBin* _tmp5_ = NULL;
	GtkWidget* _tmp6_;
	GtkRevealer* _tmp7_ = NULL;
	GtkOverlay* _tmp8_;
	GtkRevealer* _tmp9_;
	GtkRevealer* _tmp10_;
	WidgetsDateTimePickerTimePicker* _tmp11_;
	g_return_if_fail (self != NULL);
	_tmp0_ = widgets_date_time_picker_time_picker_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->time_picker);
	self->priv->time_picker = _tmp0_;
	_tmp1_ = (GtkButton*) gtk_button_new_with_label (_ ("Save"));
	g_object_ref_sink (_tmp1_);
	save_time_button = _tmp1_;
	_tmp2_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp2_, 9);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp2_, 9);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp2_, 9);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp2_, 9);
	g_object_ref_sink (_tmp2_);
	time_option_box = _tmp2_;
	_tmp3_ = self->priv->time_picker;
	gtk_box_append (time_option_box, (GtkWidget*) _tmp3_);
	gtk_box_append (time_option_box, (GtkWidget*) save_time_button);
	_tmp4_ = _g_object_ref0 ((GtkWidget*) time_option_box);
	_tmp5_ = (AdwBin*) adw_bin_new ();
	adw_bin_set_child (_tmp5_, _tmp4_);
	_g_object_unref0 (_tmp4_);
	g_object_ref_sink (_tmp5_);
	time_option_container = _tmp5_;
	gtk_widget_add_css_class ((GtkWidget*) time_option_container, "card");
	_tmp6_ = _g_object_ref0 ((GtkWidget*) time_option_container);
	_tmp7_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp7_, _tmp6_);
	_g_object_unref0 (_tmp6_);
	gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_END);
	gtk_revealer_set_transition_type (_tmp7_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP);
	gtk_revealer_set_reveal_child (_tmp7_, FALSE);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->time_option_revealer);
	self->priv->time_option_revealer = _tmp7_;
	_tmp8_ = self->priv->main_overlay;
	_tmp9_ = self->priv->time_option_revealer;
	gtk_overlay_add_overlay (_tmp8_, (GtkWidget*) _tmp9_);
	_tmp10_ = self->priv->time_option_revealer;
	widgets_date_time_picker_date_time_picker_register_revealer (self, _tmp10_);
	g_signal_connect_object (save_time_button, "clicked", (GCallback) ___lambda190__gtk_button_clicked, self, 0);
	_tmp11_ = self->priv->time_picker;
	g_signal_connect_object (_tmp11_, "activated", (GCallback) ___lambda191__widgets_date_time_picker_time_picker_activated, self, 0);
	_g_object_unref0 (time_option_container);
	_g_object_unref0 (time_option_box);
	_g_object_unref0 (save_time_button);
}

static void
__lambda192_ (WidgetsDateTimePickerDateTimePicker* self)
{
	widgets_date_time_picker_date_time_picker_apply_recurrency (self, RECURRENCY_TYPE_EVERY_DAY, 1, NULL, TRUE);
}

static void
___lambda192__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda192_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
__lambda193_ (WidgetsDateTimePickerDateTimePicker* self)
{
	widgets_date_time_picker_date_time_picker_apply_recurrency (self, RECURRENCY_TYPE_EVERY_WEEK, 1, "1,2,3,4,5", TRUE);
}

static void
___lambda193__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda193_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
__lambda194_ (WidgetsDateTimePickerDateTimePicker* self)
{
	widgets_date_time_picker_date_time_picker_apply_recurrency (self, RECURRENCY_TYPE_EVERY_WEEK, 1, "6,7", TRUE);
}

static void
___lambda194__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda194_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
__lambda195_ (WidgetsDateTimePickerDateTimePicker* self)
{
	widgets_date_time_picker_date_time_picker_apply_recurrency (self, RECURRENCY_TYPE_EVERY_WEEK, 1, NULL, TRUE);
}

static void
___lambda195__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda195_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
__lambda196_ (WidgetsDateTimePickerDateTimePicker* self)
{
	widgets_date_time_picker_date_time_picker_apply_recurrency (self, RECURRENCY_TYPE_EVERY_MONTH, 1, NULL, TRUE);
}

static void
___lambda196__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda196_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
__lambda197_ (WidgetsDateTimePickerDateTimePicker* self)
{
	widgets_date_time_picker_date_time_picker_apply_recurrency (self, RECURRENCY_TYPE_EVERY_YEAR, 1, NULL, TRUE);
}

static void
___lambda197__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda197_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
__lambda198_ (WidgetsDateTimePickerDateTimePicker* self)
{
	GtkRevealer* _tmp0_;
	GtkStack* _tmp1_;
	ObjectsDueDate* _tmp2_;
	ObjectsDueDate* _tmp3_;
	_tmp0_ = self->priv->repeat_option_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
	_tmp1_ = self->priv->main_stack;
	gtk_stack_set_visible_child_name (_tmp1_, "repeat-config");
	_tmp2_ = widgets_date_time_picker_date_time_picker_get_duedate (self);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != NULL) {
		WidgetsDateTimePickerRepeatConfig* _tmp4_;
		ObjectsDueDate* _tmp5_;
		ObjectsDueDate* _tmp6_;
		_tmp4_ = self->priv->repeat_config_widget;
		_tmp5_ = widgets_date_time_picker_date_time_picker_get_duedate (self);
		_tmp6_ = _tmp5_;
		widgets_date_time_picker_repeat_config_set_duedate (_tmp4_, _tmp6_);
	}
}

static void
___lambda198__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda198_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
widgets_date_time_picker_date_time_picker_build_repeat_picker_revealer (WidgetsDateTimePickerDateTimePicker* self)
{
	WidgetsContextMenuMenuItem* daily_item = NULL;
	WidgetsContextMenuMenuItem* _tmp0_ = NULL;
	WidgetsContextMenuMenuItem* weekdays_item = NULL;
	WidgetsContextMenuMenuItem* _tmp1_ = NULL;
	WidgetsContextMenuMenuItem* weekends_item = NULL;
	WidgetsContextMenuMenuItem* _tmp2_ = NULL;
	WidgetsContextMenuMenuItem* weekly_item = NULL;
	WidgetsContextMenuMenuItem* _tmp3_ = NULL;
	WidgetsContextMenuMenuItem* monthly_item = NULL;
	WidgetsContextMenuMenuItem* _tmp4_ = NULL;
	WidgetsContextMenuMenuItem* yearly_item = NULL;
	WidgetsContextMenuMenuItem* _tmp5_ = NULL;
	WidgetsContextMenuMenuItem* custom_item = NULL;
	WidgetsContextMenuMenuItem* _tmp6_ = NULL;
	GtkBox* repeat_option_box = NULL;
	GtkBox* _tmp7_ = NULL;
	WidgetsContextMenuMenuSeparator* _tmp8_;
	WidgetsContextMenuMenuSeparator* _tmp9_;
	AdwBin* repeat_option_container = NULL;
	GtkWidget* _tmp10_;
	AdwBin* _tmp11_ = NULL;
	GtkWidget* _tmp12_;
	GtkRevealer* _tmp13_ = NULL;
	GtkOverlay* _tmp14_;
	GtkRevealer* _tmp15_;
	GtkRevealer* _tmp16_;
	GeeHashMap* _tmp17_;
	gulong _tmp18_;
	GeeHashMap* _tmp19_;
	gulong _tmp20_;
	GeeHashMap* _tmp21_;
	gulong _tmp22_;
	GeeHashMap* _tmp23_;
	gulong _tmp24_;
	GeeHashMap* _tmp25_;
	gulong _tmp26_;
	GeeHashMap* _tmp27_;
	gulong _tmp28_;
	GeeHashMap* _tmp29_;
	gulong _tmp30_;
	g_return_if_fail (self != NULL);
	_tmp0_ = widgets_context_menu_menu_item_new (_ ("Daily"), NULL);
	widgets_context_menu_menu_item_set_autohide_popover (_tmp0_, FALSE);
	g_object_ref_sink (_tmp0_);
	daily_item = _tmp0_;
	_tmp1_ = widgets_context_menu_menu_item_new (_ ("Weekdays"), NULL);
	widgets_context_menu_menu_item_set_autohide_popover (_tmp1_, FALSE);
	g_object_ref_sink (_tmp1_);
	weekdays_item = _tmp1_;
	_tmp2_ = widgets_context_menu_menu_item_new (_ ("Weekends"), NULL);
	widgets_context_menu_menu_item_set_autohide_popover (_tmp2_, FALSE);
	g_object_ref_sink (_tmp2_);
	weekends_item = _tmp2_;
	_tmp3_ = widgets_context_menu_menu_item_new (_ ("Weekly"), NULL);
	widgets_context_menu_menu_item_set_autohide_popover (_tmp3_, FALSE);
	g_object_ref_sink (_tmp3_);
	weekly_item = _tmp3_;
	_tmp4_ = widgets_context_menu_menu_item_new (_ ("Monthly"), NULL);
	widgets_context_menu_menu_item_set_autohide_popover (_tmp4_, FALSE);
	g_object_ref_sink (_tmp4_);
	monthly_item = _tmp4_;
	_tmp5_ = widgets_context_menu_menu_item_new (_ ("Yearly"), NULL);
	widgets_context_menu_menu_item_set_autohide_popover (_tmp5_, FALSE);
	g_object_ref_sink (_tmp5_);
	yearly_item = _tmp5_;
	_tmp6_ = widgets_context_menu_menu_item_new (_ ("Custom"), NULL);
	widgets_context_menu_menu_item_set_autohide_popover (_tmp6_, FALSE);
	g_object_ref_sink (_tmp6_);
	custom_item = _tmp6_;
	widgets_context_menu_menu_item_set_arrow (custom_item, TRUE);
	_tmp7_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp7_, 9);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp7_, 9);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp7_, 9);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp7_, 9);
	g_object_ref_sink (_tmp7_);
	repeat_option_box = _tmp7_;
	gtk_box_append (repeat_option_box, (GtkWidget*) daily_item);
	gtk_box_append (repeat_option_box, (GtkWidget*) weekdays_item);
	gtk_box_append (repeat_option_box, (GtkWidget*) weekends_item);
	gtk_box_append (repeat_option_box, (GtkWidget*) weekly_item);
	gtk_box_append (repeat_option_box, (GtkWidget*) monthly_item);
	gtk_box_append (repeat_option_box, (GtkWidget*) yearly_item);
	_tmp8_ = widgets_context_menu_menu_separator_new ();
	g_object_ref_sink (_tmp8_);
	_tmp9_ = _tmp8_;
	gtk_box_append (repeat_option_box, (GtkWidget*) _tmp9_);
	_g_object_unref0 (_tmp9_);
	gtk_box_append (repeat_option_box, (GtkWidget*) custom_item);
	_tmp10_ = _g_object_ref0 ((GtkWidget*) repeat_option_box);
	_tmp11_ = (AdwBin*) adw_bin_new ();
	adw_bin_set_child (_tmp11_, _tmp10_);
	_g_object_unref0 (_tmp10_);
	g_object_ref_sink (_tmp11_);
	repeat_option_container = _tmp11_;
	gtk_widget_add_css_class ((GtkWidget*) repeat_option_container, "card");
	_tmp12_ = _g_object_ref0 ((GtkWidget*) repeat_option_container);
	_tmp13_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp13_, _tmp12_);
	_g_object_unref0 (_tmp12_);
	gtk_widget_set_valign ((GtkWidget*) _tmp13_, GTK_ALIGN_END);
	gtk_revealer_set_transition_type (_tmp13_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP);
	gtk_revealer_set_reveal_child (_tmp13_, FALSE);
	g_object_ref_sink (_tmp13_);
	_g_object_unref0 (self->priv->repeat_option_revealer);
	self->priv->repeat_option_revealer = _tmp13_;
	_tmp14_ = self->priv->main_overlay;
	_tmp15_ = self->priv->repeat_option_revealer;
	gtk_overlay_add_overlay (_tmp14_, (GtkWidget*) _tmp15_);
	_tmp16_ = self->priv->repeat_option_revealer;
	widgets_date_time_picker_date_time_picker_register_revealer (self, _tmp16_);
	_tmp17_ = self->priv->signal_map;
	_tmp18_ = g_signal_connect_object ((GtkButton*) daily_item, "clicked", (GCallback) ___lambda192__gtk_button_clicked, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp17_, (gpointer) ((guintptr) _tmp18_), (GObject*) daily_item);
	_tmp19_ = self->priv->signal_map;
	_tmp20_ = g_signal_connect_object ((GtkButton*) weekdays_item, "clicked", (GCallback) ___lambda193__gtk_button_clicked, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp19_, (gpointer) ((guintptr) _tmp20_), (GObject*) weekdays_item);
	_tmp21_ = self->priv->signal_map;
	_tmp22_ = g_signal_connect_object ((GtkButton*) weekends_item, "clicked", (GCallback) ___lambda194__gtk_button_clicked, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp21_, (gpointer) ((guintptr) _tmp22_), (GObject*) weekends_item);
	_tmp23_ = self->priv->signal_map;
	_tmp24_ = g_signal_connect_object ((GtkButton*) weekly_item, "clicked", (GCallback) ___lambda195__gtk_button_clicked, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp23_, (gpointer) ((guintptr) _tmp24_), (GObject*) weekly_item);
	_tmp25_ = self->priv->signal_map;
	_tmp26_ = g_signal_connect_object ((GtkButton*) monthly_item, "clicked", (GCallback) ___lambda196__gtk_button_clicked, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp25_, (gpointer) ((guintptr) _tmp26_), (GObject*) monthly_item);
	_tmp27_ = self->priv->signal_map;
	_tmp28_ = g_signal_connect_object ((GtkButton*) yearly_item, "clicked", (GCallback) ___lambda197__gtk_button_clicked, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp27_, (gpointer) ((guintptr) _tmp28_), (GObject*) yearly_item);
	_tmp29_ = self->priv->signal_map;
	_tmp30_ = g_signal_connect_object ((GtkButton*) custom_item, "clicked", (GCallback) ___lambda198__gtk_button_clicked, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp29_, (gpointer) ((guintptr) _tmp30_), (GObject*) custom_item);
	_g_object_unref0 (repeat_option_container);
	_g_object_unref0 (repeat_option_box);
	_g_object_unref0 (custom_item);
	_g_object_unref0 (yearly_item);
	_g_object_unref0 (monthly_item);
	_g_object_unref0 (weekly_item);
	_g_object_unref0 (weekends_item);
	_g_object_unref0 (weekdays_item);
	_g_object_unref0 (daily_item);
}

static void
widgets_date_time_picker_date_time_picker_apply_recurrency (WidgetsDateTimePickerDateTimePicker* self,
                                                            RecurrencyType type,
                                                            gint interval,
                                                            const gchar* weeks,
                                                            gboolean is_recurring)
{
	ObjectsDueDate* value = NULL;
	ObjectsDueDate* _tmp0_;
	ObjectsDueDate* _tmp1_;
	ObjectsDueDate* _tmp2_;
	ObjectsDueDate* _tmp3_;
	ObjectsDueDate* _tmp5_;
	GtkRevealer* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = objects_due_date_new ();
	value = _tmp0_;
	_tmp1_ = value;
	objects_due_date_set_is_recurring (_tmp1_, is_recurring);
	_tmp2_ = value;
	objects_due_date_set_recurrency_type (_tmp2_, type);
	_tmp3_ = value;
	objects_due_date_set_recurrency_interval (_tmp3_, interval);
	if (weeks != NULL) {
		ObjectsDueDate* _tmp4_;
		_tmp4_ = value;
		objects_due_date_set_recurrency_weeks (_tmp4_, weeks);
	}
	_tmp5_ = value;
	widgets_date_time_picker_date_time_picker_set_recurrency (self, _tmp5_);
	_tmp6_ = self->priv->repeat_option_revealer;
	gtk_revealer_set_reveal_child (_tmp6_, FALSE);
	g_signal_emit (self, widgets_date_time_picker_date_time_picker_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_DUEDATE_CHANGED_SIGNAL], 0);
	_g_object_unref0 (value);
}

static void
__lambda189_ (WidgetsDateTimePickerDateTimePicker* self)
{
	widgets_date_time_picker_date_time_picker_update_dimming_visibility (self);
}

static void
___lambda189__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda189_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
widgets_date_time_picker_date_time_picker_register_revealer (WidgetsDateTimePickerDateTimePicker* self,
                                                             GtkRevealer* revealer)
{
	GeeArrayList* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (revealer != NULL);
	_tmp0_ = self->priv->active_revealers;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, revealer);
	g_signal_connect_object ((GObject*) revealer, "notify::reveal-child", (GCallback) ___lambda189__g_object_notify, self, 0);
}

static void
widgets_date_time_picker_date_time_picker_update_dimming_visibility (WidgetsDateTimePickerDateTimePicker* self)
{
	gboolean any_visible = FALSE;
	AdwBin* _tmp11_;
	g_return_if_fail (self != NULL);
	any_visible = FALSE;
	{
		GeeArrayList* _revealer_list = NULL;
		GeeArrayList* _tmp0_;
		gint _revealer_size = 0;
		GeeArrayList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _revealer_index = 0;
		_tmp0_ = self->priv->active_revealers;
		_revealer_list = _tmp0_;
		_tmp1_ = _revealer_list;
		_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_revealer_size = _tmp3_;
		_revealer_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			GtkRevealer* revealer = NULL;
			GeeArrayList* _tmp6_;
			gpointer _tmp7_;
			GtkRevealer* _tmp8_;
			gboolean _tmp9_;
			gboolean _tmp10_;
			_revealer_index = _revealer_index + 1;
			_tmp4_ = _revealer_index;
			_tmp5_ = _revealer_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _revealer_list;
			_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, _revealer_index);
			revealer = (GtkRevealer*) _tmp7_;
			_tmp8_ = revealer;
			_tmp9_ = gtk_revealer_get_reveal_child (_tmp8_);
			_tmp10_ = _tmp9_;
			if (_tmp10_) {
				any_visible = TRUE;
				_g_object_unref0 (revealer);
				break;
			}
			_g_object_unref0 (revealer);
		}
	}
	_tmp11_ = self->priv->dimming_widget;
	gtk_widget_set_visible ((GtkWidget*) _tmp11_, any_visible);
}

static void
widgets_date_time_picker_date_time_picker_show_revealer (WidgetsDateTimePickerDateTimePicker* self,
                                                         GtkRevealer* revealer,
                                                         GVoidFunc callback)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (revealer != NULL);
	gtk_revealer_set_reveal_child (revealer, TRUE);
	if (callback != NULL) {
		callback ();
	}
}

static void
widgets_date_time_picker_date_time_picker_hide_all_revealers (WidgetsDateTimePickerDateTimePicker* self)
{
	g_return_if_fail (self != NULL);
	{
		GeeArrayList* _revealer_list = NULL;
		GeeArrayList* _tmp0_;
		gint _revealer_size = 0;
		GeeArrayList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _revealer_index = 0;
		_tmp0_ = self->priv->active_revealers;
		_revealer_list = _tmp0_;
		_tmp1_ = _revealer_list;
		_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_revealer_size = _tmp3_;
		_revealer_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			GtkRevealer* revealer = NULL;
			GeeArrayList* _tmp6_;
			gpointer _tmp7_;
			GtkRevealer* _tmp8_;
			_revealer_index = _revealer_index + 1;
			_tmp4_ = _revealer_index;
			_tmp5_ = _revealer_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _revealer_list;
			_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, _revealer_index);
			revealer = (GtkRevealer*) _tmp7_;
			_tmp8_ = revealer;
			gtk_revealer_set_reveal_child (_tmp8_, FALSE);
			_g_object_unref0 (revealer);
		}
	}
}

static void
__lambda199_ (WidgetsDateTimePickerDateTimePicker* self)
{
	WidgetsCalendarCalendarScroll* _tmp0_;
	GDateTime* _tmp1_;
	GDateTime* _tmp2_;
	_tmp0_ = self->priv->calendar_scroll_view;
	_tmp1_ = widgets_calendar_calendar_scroll_get_date (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		WidgetsCalendarCalendarScroll* _tmp3_;
		GDateTime* _tmp4_;
		GDateTime* _tmp5_;
		GtkStack* _tmp6_;
		_tmp3_ = self->priv->calendar_scroll_view;
		_tmp4_ = widgets_calendar_calendar_scroll_get_date (_tmp3_);
		_tmp5_ = _tmp4_;
		widgets_date_time_picker_date_time_picker_set_date (self, _tmp5_, FALSE, FALSE);
		widgets_date_time_picker_date_time_picker_set_visible_no_date (self, TRUE);
		_tmp6_ = self->priv->main_stack;
		gtk_stack_set_visible_child_name (_tmp6_, "main");
	}
}

static void
___lambda199__widgets_calendar_calendar_scroll_day_selected (WidgetsCalendarCalendarScroll* _sender,
                                                             gpointer self)
{
	__lambda199_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
__lambda200_ (WidgetsDateTimePickerDateTimePicker* self)
{
	GtkStack* _tmp0_;
	_tmp0_ = self->priv->main_stack;
	gtk_stack_set_visible_child_name (_tmp0_, "main");
}

static void
___lambda200__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda200_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static GtkWidget*
widgets_date_time_picker_date_time_picker_build_calendar_page (WidgetsDateTimePickerDateTimePicker* self)
{
	GtkButton* back_button = NULL;
	gchar* _tmp0_;
	gchar** _tmp1_;
	gchar* _tmp2_;
	GtkButton* _tmp3_ = NULL;
	WidgetsCalendarCalendarScroll* _tmp4_ = NULL;
	AdwToolbarView* toolbar_view = NULL;
	WidgetsCalendarCalendarScroll* _tmp5_;
	GtkWidget* _tmp6_;
	AdwToolbarView* _tmp7_ = NULL;
	GeeHashMap* _tmp8_;
	WidgetsCalendarCalendarScroll* _tmp9_;
	gulong _tmp10_;
	WidgetsCalendarCalendarScroll* _tmp11_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("flat");
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	_tmp2_ = g_strdup (_ ("Back"));
	_tmp3_ = (GtkButton*) gtk_button_new_from_icon_name ("go-previous-symbolic");
	gtk_widget_set_css_classes ((GtkWidget*) _tmp3_, _tmp1_);
	_tmp1_ = (_vala_array_free (_tmp1_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp3_, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp3_, 6);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp3_, 6);
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_START);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp3_, _tmp2_);
	_g_free0 (_tmp2_);
	g_object_ref_sink (_tmp3_);
	back_button = _tmp3_;
	_tmp4_ = widgets_calendar_calendar_scroll_new ();
	gtk_widget_set_margin_top ((GtkWidget*) _tmp4_, 6);
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->calendar_scroll_view);
	self->priv->calendar_scroll_view = _tmp4_;
	_tmp5_ = self->priv->calendar_scroll_view;
	_tmp6_ = _g_object_ref0 ((GtkWidget*) _tmp5_);
	_tmp7_ = (AdwToolbarView*) adw_toolbar_view_new ();
	adw_toolbar_view_set_content (_tmp7_, _tmp6_);
	_g_object_unref0 (_tmp6_);
	g_object_ref_sink (_tmp7_);
	toolbar_view = _tmp7_;
	adw_toolbar_view_add_top_bar (toolbar_view, (GtkWidget*) back_button);
	_tmp8_ = self->priv->signal_map;
	_tmp9_ = self->priv->calendar_scroll_view;
	_tmp10_ = g_signal_connect_object (_tmp9_, "day-selected", (GCallback) ___lambda199__widgets_calendar_calendar_scroll_day_selected, self, 0);
	_tmp11_ = self->priv->calendar_scroll_view;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp8_, (gpointer) ((guintptr) _tmp10_), (GObject*) _tmp11_);
	g_signal_connect_object (back_button, "clicked", (GCallback) ___lambda200__gtk_button_clicked, self, 0);
	result = (GtkWidget*) toolbar_view;
	_g_object_unref0 (back_button);
	return result;
}

static void
__lambda201_ (WidgetsDateTimePickerDateTimePicker* self,
              ObjectsDueDate* value)
{
	GtkStack* _tmp0_;
	g_return_if_fail (value != NULL);
	widgets_date_time_picker_date_time_picker_set_recurrency (self, value);
	_tmp0_ = self->priv->main_stack;
	gtk_stack_set_visible_child_name (_tmp0_, "main");
	g_signal_emit (self, widgets_date_time_picker_date_time_picker_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_DUEDATE_CHANGED_SIGNAL], 0);
}

static void
___lambda201__widgets_date_time_picker_repeat_config_duedate_change (WidgetsDateTimePickerRepeatConfig* _sender,
                                                                     ObjectsDueDate* duedate,
                                                                     gpointer self)
{
	__lambda201_ ((WidgetsDateTimePickerDateTimePicker*) self, duedate);
}

static void
__lambda202_ (WidgetsDateTimePickerDateTimePicker* self)
{
	GtkStack* _tmp0_;
	_tmp0_ = self->priv->main_stack;
	gtk_stack_set_visible_child_name (_tmp0_, "main");
}

static void
___lambda202__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda202_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static GtkWidget*
widgets_date_time_picker_date_time_picker_build_repeat_config_page (WidgetsDateTimePickerDateTimePicker* self,
                                                                    WidgetsDateTimePickerRepeatConfig* repeat_config_widget)
{
	GtkButton* back_button = NULL;
	gchar* _tmp0_;
	gchar** _tmp1_;
	gchar* _tmp2_;
	GtkButton* _tmp3_ = NULL;
	AdwToolbarView* toolbar_view = NULL;
	GtkWidget* _tmp4_;
	AdwToolbarView* _tmp5_ = NULL;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (repeat_config_widget != NULL, NULL);
	_tmp0_ = g_strdup ("flat");
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	_tmp2_ = g_strdup (_ ("Back"));
	_tmp3_ = (GtkButton*) gtk_button_new_from_icon_name ("go-previous-symbolic");
	gtk_widget_set_css_classes ((GtkWidget*) _tmp3_, _tmp1_);
	_tmp1_ = (_vala_array_free (_tmp1_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp3_, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp3_, 6);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp3_, 6);
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_START);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp3_, _tmp2_);
	_g_free0 (_tmp2_);
	g_object_ref_sink (_tmp3_);
	back_button = _tmp3_;
	_tmp4_ = _g_object_ref0 ((GtkWidget*) repeat_config_widget);
	_tmp5_ = (AdwToolbarView*) adw_toolbar_view_new ();
	adw_toolbar_view_set_content (_tmp5_, _tmp4_);
	_g_object_unref0 (_tmp4_);
	g_object_ref_sink (_tmp5_);
	toolbar_view = _tmp5_;
	adw_toolbar_view_add_top_bar (toolbar_view, (GtkWidget*) back_button);
	g_signal_connect_object (repeat_config_widget, "duedate-change", (GCallback) ___lambda201__widgets_date_time_picker_repeat_config_duedate_change, self, 0);
	g_signal_connect_object (back_button, "clicked", (GCallback) ___lambda202__gtk_button_clicked, self, 0);
	result = (GtkWidget*) toolbar_view;
	_g_object_unref0 (back_button);
	return result;
}

void
widgets_date_time_picker_date_time_picker_clean_up (WidgetsDateTimePickerDateTimePicker* self)
{
	GeeHashMap* _tmp15_;
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeSet* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->priv->signal_map;
		_tmp1_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_entry_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			GeeMapEntry* _tmp9_;
			gconstpointer _tmp10_;
			gconstpointer _tmp11_;
			GeeMapEntry* _tmp12_;
			gconstpointer _tmp13_;
			gconstpointer _tmp14_;
			_tmp6_ = _entry_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _entry_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			entry = (GeeMapEntry*) _tmp8_;
			_tmp9_ = entry;
			_tmp10_ = gee_map_entry_get_value (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = entry;
			_tmp13_ = gee_map_entry_get_key (_tmp12_);
			_tmp14_ = _tmp13_;
			g_signal_handler_disconnect ((GObject*) _tmp11_, (gulong) ((guintptr) _tmp14_));
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	_tmp15_ = self->priv->signal_map;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp15_);
}

gboolean
widgets_date_time_picker_date_time_picker_get_has_time (WidgetsDateTimePickerDateTimePicker* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_has_time;
	return result;
}

void
widgets_date_time_picker_date_time_picker_set_has_time (WidgetsDateTimePickerDateTimePicker* self,
                                                        gboolean value)
{
	WidgetsDateTimePickerDateTimePickerOptionButton* _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->_has_time = value;
	_tmp0_ = self->priv->time_option_button;
	widgets_date_time_picker_date_time_picker_option_button_set_has_value (_tmp0_, self->priv->_has_time);
	g_object_notify_by_pspec ((GObject *) self, widgets_date_time_picker_date_time_picker_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_HAS_TIME_PROPERTY]);
}

gboolean
widgets_date_time_picker_date_time_picker_get_has_recurrency (WidgetsDateTimePickerDateTimePicker* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_has_recurrency;
	return result;
}

void
widgets_date_time_picker_date_time_picker_set_has_recurrency (WidgetsDateTimePickerDateTimePicker* self,
                                                              gboolean value)
{
	WidgetsDateTimePickerDateTimePickerOptionButton* _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->_has_recurrency = value;
	_tmp0_ = self->priv->repeat_option_button;
	widgets_date_time_picker_date_time_picker_option_button_set_has_value (_tmp0_, self->priv->_has_recurrency);
	g_object_notify_by_pspec ((GObject *) self, widgets_date_time_picker_date_time_picker_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_HAS_RECURRENCY_PROPERTY]);
}

ObjectsDueDate*
widgets_date_time_picker_date_time_picker_get_duedate (WidgetsDateTimePickerDateTimePicker* self)
{
	ObjectsDueDate* result;
	gboolean _tmp0_ = FALSE;
	WidgetsDateTimePickerTimePicker* _tmp1_;
	ObjectsDueDate* _tmp31_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->time_picker;
	if (_tmp1_ != NULL) {
		gboolean _tmp2_;
		gboolean _tmp3_;
		_tmp2_ = widgets_date_time_picker_date_time_picker_get_has_time (self);
		_tmp3_ = _tmp2_;
		_tmp0_ = _tmp3_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		ObjectsDueDate* _tmp4_;
		GDateTime* _tmp5_;
		GDateTime* _tmp6_;
		_tmp4_ = self->priv->_duedate;
		_tmp5_ = objects_due_date_get_datetime (_tmp4_);
		_tmp6_ = _tmp5_;
		if (_tmp6_ == NULL) {
			ObjectsDueDate* _tmp7_;
			WidgetsDateTimePickerTimePicker* _tmp8_;
			GDateTime* _tmp9_;
			GDateTime* _tmp10_;
			_tmp7_ = self->priv->_duedate;
			_tmp8_ = self->priv->time_picker;
			_tmp9_ = widgets_date_time_picker_time_picker_get_time (_tmp8_);
			_tmp10_ = _tmp9_;
			objects_due_date_set_datetime (_tmp7_, _tmp10_);
		} else {
			ObjectsDueDate* _tmp11_;
			ObjectsDueDate* _tmp12_;
			GDateTime* _tmp13_;
			GDateTime* _tmp14_;
			WidgetsDateTimePickerTimePicker* _tmp15_;
			GDateTime* _tmp16_;
			GDateTime* _tmp17_;
			GDateTime* _tmp18_;
			GDateTime* _tmp19_;
			_tmp11_ = self->priv->_duedate;
			_tmp12_ = self->priv->_duedate;
			_tmp13_ = objects_due_date_get_datetime (_tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = self->priv->time_picker;
			_tmp16_ = widgets_date_time_picker_time_picker_get_time (_tmp15_);
			_tmp17_ = _tmp16_;
			_tmp18_ = widgets_date_time_picker_date_time_picker_add_date_time (self, _tmp14_, _tmp17_);
			_tmp19_ = _tmp18_;
			objects_due_date_set_datetime (_tmp11_, _tmp19_);
			_g_date_time_unref0 (_tmp19_);
		}
	} else {
		gboolean _tmp20_ = FALSE;
		ObjectsDueDate* _tmp21_;
		_tmp21_ = self->priv->_duedate;
		if (_tmp21_ != NULL) {
			ObjectsDueDate* _tmp22_;
			GDateTime* _tmp23_;
			GDateTime* _tmp24_;
			_tmp22_ = self->priv->_duedate;
			_tmp23_ = objects_due_date_get_datetime (_tmp22_);
			_tmp24_ = _tmp23_;
			_tmp20_ = _tmp24_ != NULL;
		} else {
			_tmp20_ = FALSE;
		}
		if (_tmp20_) {
			ObjectsDueDate* _tmp25_;
			ObjectsDueDate* _tmp26_;
			GDateTime* _tmp27_;
			GDateTime* _tmp28_;
			GDateTime* _tmp29_;
			GDateTime* _tmp30_;
			_tmp25_ = self->priv->_duedate;
			_tmp26_ = self->priv->_duedate;
			_tmp27_ = objects_due_date_get_datetime (_tmp26_);
			_tmp28_ = _tmp27_;
			_tmp29_ = utils_datetime_get_date_only (_tmp28_);
			_tmp30_ = _tmp29_;
			objects_due_date_set_datetime (_tmp25_, _tmp30_);
			_g_date_time_unref0 (_tmp30_);
		}
	}
	_tmp31_ = self->priv->_duedate;
	result = _tmp31_;
	return result;
}

void
widgets_date_time_picker_date_time_picker_set_duedate (WidgetsDateTimePickerDateTimePicker* self,
                                                       ObjectsDueDate* value)
{
	ObjectsDueDate* _tmp0_;
	gboolean _tmp1_ = FALSE;
	ObjectsDueDate* _tmp2_;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_ = FALSE;
	gboolean _tmp16_ = FALSE;
	ObjectsDueDate* _tmp17_;
	gboolean _tmp41_ = FALSE;
	ObjectsDueDate* _tmp42_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_duedate);
	self->priv->_duedate = _tmp0_;
	_tmp2_ = self->priv->_duedate;
	if (_tmp2_ != NULL) {
		ObjectsDueDate* _tmp3_;
		GDateTime* _tmp4_;
		GDateTime* _tmp5_;
		_tmp3_ = self->priv->_duedate;
		_tmp4_ = objects_due_date_get_datetime (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp1_ = _tmp5_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		WidgetsCalendarCalendarMonth* _tmp6_;
		ObjectsDueDate* _tmp7_;
		GDateTime* _tmp8_;
		GDateTime* _tmp9_;
		WidgetsCalendarCalendarScroll* _tmp10_;
		ObjectsDueDate* _tmp11_;
		GDateTime* _tmp12_;
		GDateTime* _tmp13_;
		_tmp6_ = self->priv->calendar_view;
		_tmp7_ = self->priv->_duedate;
		_tmp8_ = objects_due_date_get_datetime (_tmp7_);
		_tmp9_ = _tmp8_;
		widgets_calendar_calendar_month_set_date (_tmp6_, _tmp9_);
		_tmp10_ = self->priv->calendar_scroll_view;
		_tmp11_ = self->priv->_duedate;
		_tmp12_ = objects_due_date_get_datetime (_tmp11_);
		_tmp13_ = _tmp12_;
		widgets_calendar_calendar_scroll_set_date (_tmp10_, _tmp13_);
	}
	_tmp17_ = self->priv->_duedate;
	if (_tmp17_ != NULL) {
		WidgetsDateTimePickerTimePicker* _tmp18_;
		_tmp18_ = self->priv->time_picker;
		_tmp16_ = _tmp18_ != NULL;
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		ObjectsDueDate* _tmp19_;
		GDateTime* _tmp20_;
		GDateTime* _tmp21_;
		_tmp19_ = self->priv->_duedate;
		_tmp20_ = objects_due_date_get_datetime (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp15_ = _tmp21_ != NULL;
	} else {
		_tmp15_ = FALSE;
	}
	if (_tmp15_) {
		ObjectsDueDate* _tmp22_;
		GDateTime* _tmp23_;
		GDateTime* _tmp24_;
		_tmp22_ = self->priv->_duedate;
		_tmp23_ = objects_due_date_get_datetime (_tmp22_);
		_tmp24_ = _tmp23_;
		_tmp14_ = utils_datetime_has_time (_tmp24_);
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		WidgetsDateTimePickerTimePicker* _tmp25_;
		ObjectsDueDate* _tmp26_;
		GDateTime* _tmp27_;
		GDateTime* _tmp28_;
		WidgetsDateTimePickerTimePicker* _tmp29_;
		GDateTime* _tmp30_;
		GDateTime* _tmp31_;
		_tmp25_ = self->priv->time_picker;
		_tmp26_ = self->priv->_duedate;
		_tmp27_ = objects_due_date_get_datetime (_tmp26_);
		_tmp28_ = _tmp27_;
		widgets_date_time_picker_time_picker_set_time (_tmp25_, _tmp28_);
		_tmp29_ = self->priv->time_picker;
		_tmp30_ = widgets_date_time_picker_time_picker_get_time (_tmp29_);
		_tmp31_ = _tmp30_;
		if (_tmp31_ != NULL) {
			WidgetsDateTimePickerDateTimePickerOptionButton* _tmp32_;
			WidgetsDateTimePickerTimePicker* _tmp33_;
			GDateTime* _tmp34_;
			GDateTime* _tmp35_;
			gchar* _tmp36_;
			gchar* _tmp37_;
			gchar* _tmp38_;
			gchar* _tmp39_;
			_tmp32_ = self->priv->time_option_button;
			_tmp33_ = self->priv->time_picker;
			_tmp34_ = widgets_date_time_picker_time_picker_get_time (_tmp33_);
			_tmp35_ = _tmp34_;
			_tmp36_ = utils_datetime_get_default_time_format (utils_datetime_is_clock_format_12h (), FALSE);
			_tmp37_ = _tmp36_;
			_tmp38_ = g_date_time_format (_tmp35_, _tmp37_);
			_tmp39_ = _tmp38_;
			widgets_date_time_picker_date_time_picker_option_button_set_label_text (_tmp32_, _tmp39_);
			_g_free0 (_tmp39_);
			_g_free0 (_tmp37_);
		}
		widgets_date_time_picker_date_time_picker_set_has_time (self, TRUE);
	} else {
		WidgetsDateTimePickerDateTimePickerOptionButton* _tmp40_;
		widgets_date_time_picker_date_time_picker_set_has_time (self, FALSE);
		_tmp40_ = self->priv->time_option_button;
		widgets_date_time_picker_date_time_picker_option_button_set_label_text (_tmp40_, _ ("Time"));
	}
	_tmp42_ = self->priv->_duedate;
	if (_tmp42_ != NULL) {
		ObjectsDueDate* _tmp43_;
		gboolean _tmp44_;
		gboolean _tmp45_;
		_tmp43_ = self->priv->_duedate;
		_tmp44_ = objects_due_date_get_is_recurring (_tmp43_);
		_tmp45_ = _tmp44_;
		_tmp41_ = _tmp45_;
	} else {
		_tmp41_ = FALSE;
	}
	if (_tmp41_) {
		gchar* end_label = NULL;
		gchar* _tmp46_;
		ObjectsDueDate* _tmp47_;
		RecurrencyEndType _tmp48_;
		RecurrencyEndType _tmp49_;
		WidgetsDateTimePickerDateTimePickerOptionButton* _tmp75_;
		ObjectsDueDate* _tmp76_;
		RecurrencyType _tmp77_;
		RecurrencyType _tmp78_;
		ObjectsDueDate* _tmp79_;
		gint _tmp80_;
		gint _tmp81_;
		ObjectsDueDate* _tmp82_;
		const gchar* _tmp83_;
		const gchar* _tmp84_;
		const gchar* _tmp85_;
		ObjectsDueDate* _tmp86_;
		gboolean _tmp87_;
		gboolean _tmp88_;
		gchar* _tmp89_;
		gchar* _tmp90_;
		gchar* _tmp91_;
		gchar* _tmp92_;
		_tmp46_ = g_strdup ("");
		end_label = _tmp46_;
		_tmp47_ = self->priv->_duedate;
		_tmp48_ = objects_due_date_get_end_type (_tmp47_);
		_tmp49_ = _tmp48_;
		if (_tmp49_ == RECURRENCY_END_TYPE_ON_DATE) {
			gchar* date_label = NULL;
			ObjectsDueDate* _tmp50_;
			const gchar* _tmp51_;
			const gchar* _tmp52_;
			GDateTime* _tmp53_;
			GDateTime* _tmp54_;
			GDateTime* _tmp55_;
			GDateTime* _tmp56_;
			gchar* _tmp57_;
			gchar* _tmp58_;
			gchar* _tmp59_;
			gchar* _tmp60_;
			const gchar* _tmp61_;
			gchar* _tmp62_;
			_tmp50_ = self->priv->_duedate;
			_tmp51_ = objects_due_date_get_recurrency_end (_tmp50_);
			_tmp52_ = _tmp51_;
			_tmp53_ = utils_datetime_get_date_from_string (_tmp52_);
			_tmp54_ = _tmp53_;
			_tmp55_ = utils_datetime_get_date_only (_tmp54_);
			_tmp56_ = _tmp55_;
			_tmp57_ = utils_datetime_get_default_date_format_from_date (_tmp56_);
			_tmp58_ = _tmp57_;
			_g_date_time_unref0 (_tmp56_);
			_g_date_time_unref0 (_tmp54_);
			date_label = _tmp58_;
			_tmp59_ = g_strconcat (_ ("until"), " ", NULL);
			_tmp60_ = _tmp59_;
			_tmp61_ = date_label;
			_tmp62_ = g_strconcat (_tmp60_, _tmp61_, NULL);
			_g_free0 (end_label);
			end_label = _tmp62_;
			_g_free0 (_tmp60_);
			_g_free0 (date_label);
		} else {
			ObjectsDueDate* _tmp63_;
			RecurrencyEndType _tmp64_;
			RecurrencyEndType _tmp65_;
			_tmp63_ = self->priv->_duedate;
			_tmp64_ = objects_due_date_get_end_type (_tmp63_);
			_tmp65_ = _tmp64_;
			if (_tmp65_ == RECURRENCY_END_TYPE_AFTER) {
				gint count = 0;
				ObjectsDueDate* _tmp66_;
				gint _tmp67_;
				gint _tmp68_;
				const gchar* _tmp69_ = NULL;
				gchar* _tmp70_;
				gchar* _tmp71_;
				gchar* _tmp72_;
				gchar* _tmp73_;
				gchar* _tmp74_;
				_tmp66_ = self->priv->_duedate;
				_tmp67_ = objects_due_date_get_recurrency_count (_tmp66_);
				_tmp68_ = _tmp67_;
				count = _tmp68_;
				if (count > 1) {
					_tmp69_ = _ ("times");
				} else {
					_tmp69_ = _ ("time");
				}
				_tmp70_ = g_strconcat (_ ("for"), " ", NULL);
				_tmp71_ = _tmp70_;
				_tmp72_ = g_strdup_printf ("%d %s", count, _tmp69_);
				_tmp73_ = _tmp72_;
				_tmp74_ = g_strconcat (_tmp71_, _tmp73_, NULL);
				_g_free0 (end_label);
				end_label = _tmp74_;
				_g_free0 (_tmp73_);
				_g_free0 (_tmp71_);
			}
		}
		_tmp75_ = self->priv->repeat_option_button;
		_tmp76_ = self->priv->_duedate;
		_tmp77_ = objects_due_date_get_recurrency_type (_tmp76_);
		_tmp78_ = _tmp77_;
		_tmp79_ = self->priv->_duedate;
		_tmp80_ = objects_due_date_get_recurrency_interval (_tmp79_);
		_tmp81_ = _tmp80_;
		_tmp82_ = self->priv->_duedate;
		_tmp83_ = objects_due_date_get_recurrency_weeks (_tmp82_);
		_tmp84_ = _tmp83_;
		_tmp85_ = end_label;
		_tmp86_ = self->priv->_duedate;
		_tmp87_ = objects_due_date_get_recurrency_last_day_of_month (_tmp86_);
		_tmp88_ = _tmp87_;
		_tmp89_ = utils_datetime_get_recurrency_weeks (_tmp78_, _tmp81_, _tmp84_, _tmp85_, _tmp88_);
		_tmp90_ = _tmp89_;
		_tmp91_ = g_utf8_strdown (_tmp90_, (gssize) -1);
		_tmp92_ = _tmp91_;
		widgets_date_time_picker_date_time_picker_option_button_set_label_text (_tmp75_, _tmp92_);
		_g_free0 (_tmp92_);
		_g_free0 (_tmp90_);
		widgets_date_time_picker_date_time_picker_set_has_recurrency (self, TRUE);
		_g_free0 (end_label);
	} else {
		WidgetsDateTimePickerDateTimePickerOptionButton* _tmp93_;
		_tmp93_ = self->priv->repeat_option_button;
		widgets_date_time_picker_date_time_picker_option_button_set_label_text (_tmp93_, _ ("Repeat"));
		widgets_date_time_picker_date_time_picker_set_has_recurrency (self, FALSE);
	}
	g_object_notify_by_pspec ((GObject *) self, widgets_date_time_picker_date_time_picker_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_DUEDATE_PROPERTY]);
}

void
widgets_date_time_picker_date_time_picker_set_visible_no_date (WidgetsDateTimePickerDateTimePicker* self,
                                                               gboolean value)
{
	WidgetsDateTimePickerDateTimePickerNoDateButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->no_date_button;
	if (_tmp0_ != NULL) {
		WidgetsDateTimePickerDateTimePickerNoDateButton* _tmp1_;
		_tmp1_ = self->priv->no_date_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp1_, value);
	}
	g_object_notify_by_pspec ((GObject *) self, widgets_date_time_picker_date_time_picker_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_VISIBLE_NO_DATE_PROPERTY]);
}

static inline gpointer
widgets_date_time_picker_date_time_picker_suggested_date_get_instance_private (WidgetsDateTimePickerDateTimePickerSuggestedDate* self)
{
	return G_STRUCT_MEMBER_P (self, WidgetsDateTimePickerDateTimePickerSuggestedDate_private_offset);
}

WidgetsDateTimePickerDateTimePickerSuggestedDate*
widgets_date_time_picker_date_time_picker_suggested_date_construct (GType object_type,
                                                                    ObjectsDueDate* due_date)
{
	WidgetsDateTimePickerDateTimePickerSuggestedDate * self = NULL;
	g_return_val_if_fail (due_date != NULL, NULL);
	self = (WidgetsDateTimePickerDateTimePickerSuggestedDate*) g_object_new (object_type, "due-date", due_date, NULL);
	return self;
}

WidgetsDateTimePickerDateTimePickerSuggestedDate*
widgets_date_time_picker_date_time_picker_suggested_date_new (ObjectsDueDate* due_date)
{
	return widgets_date_time_picker_date_time_picker_suggested_date_construct (WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_TYPE_SUGGESTED_DATE, due_date);
}

ObjectsDueDate*
widgets_date_time_picker_date_time_picker_suggested_date_get_due_date (WidgetsDateTimePickerDateTimePickerSuggestedDate* self)
{
	ObjectsDueDate* result;
	ObjectsDueDate* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_due_date;
	result = _tmp0_;
	return result;
}

static void
widgets_date_time_picker_date_time_picker_suggested_date_set_due_date (WidgetsDateTimePickerDateTimePickerSuggestedDate* self,
                                                                       ObjectsDueDate* value)
{
	ObjectsDueDate* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_date_time_picker_date_time_picker_suggested_date_get_due_date (self);
	if (old_value != value) {
		ObjectsDueDate* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_due_date);
		self->priv->_due_date = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_date_time_picker_date_time_picker_suggested_date_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_DUE_DATE_PROPERTY]);
	}
}

void
widgets_date_time_picker_date_time_picker_suggested_date_set_title (WidgetsDateTimePickerDateTimePickerSuggestedDate* self,
                                                                    const gchar* value)
{
	GtkLabel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->date_label;
	gtk_label_set_label (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, widgets_date_time_picker_date_time_picker_suggested_date_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_TITLE_PROPERTY]);
}

static void
_widgets_date_time_picker_date_time_picker_suggested_date___lambda186_ (WidgetsDateTimePickerDateTimePickerSuggestedDate* self)
{
	g_signal_emit (self, widgets_date_time_picker_date_time_picker_suggested_date_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_CLICKED_SIGNAL], 0);
}

static void
__widgets_date_time_picker_date_time_picker_suggested_date___lambda186__gtk_button_clicked (GtkButton* _sender,
                                                                                            gpointer self)
{
	_widgets_date_time_picker_date_time_picker_suggested_date___lambda186_ ((WidgetsDateTimePickerDateTimePickerSuggestedDate*) self);
}

static GObject *
widgets_date_time_picker_date_time_picker_suggested_date_constructor (GType type,
                                                                      guint n_construct_properties,
                                                                      GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	WidgetsDateTimePickerDateTimePickerSuggestedDate * self;
	GtkImage* _tmp0_;
	ObjectsDueDate* _tmp1_;
	GDateTime* _tmp2_;
	GDateTime* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GtkLabel* _tmp6_ = NULL;
	GtkBox* date_box = NULL;
	GtkBox* _tmp7_;
	GtkBox* _tmp8_;
	GtkImage* _tmp9_;
	GtkBox* _tmp10_;
	GtkLabel* _tmp11_;
	GtkBox* _tmp12_;
	GtkWidget* _tmp13_;
	GtkButton* _tmp14_ = NULL;
	GtkButton* _tmp15_;
	GtkButton* _tmp16_;
	ObjectsDueDate* _tmp17_;
	GDateTime* _tmp18_;
	GDateTime* _tmp19_;
	ObjectsDueDate* _tmp30_;
	gboolean _tmp31_;
	gboolean _tmp32_;
	parent_class = G_OBJECT_CLASS (widgets_date_time_picker_date_time_picker_suggested_date_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_TYPE_SUGGESTED_DATE, WidgetsDateTimePickerDateTimePickerSuggestedDate);
	_tmp0_ = (GtkImage*) gtk_image_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->date_icon);
	self->priv->date_icon = _tmp0_;
	_tmp1_ = self->priv->_due_date;
	_tmp2_ = objects_due_date_get_datetime (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = utils_datetime_get_relative_date_from_date (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = (GtkLabel*) gtk_label_new (_tmp5_);
	gtk_label_set_use_markup (_tmp6_, TRUE);
	gtk_label_set_ellipsize (_tmp6_, PANGO_ELLIPSIZE_END);
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->priv->date_label);
	self->priv->date_label = _tmp6_;
	_g_free0 (_tmp5_);
	_tmp7_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp7_);
	date_box = _tmp7_;
	_tmp8_ = date_box;
	_tmp9_ = self->priv->date_icon;
	gtk_box_append (_tmp8_, (GtkWidget*) _tmp9_);
	_tmp10_ = date_box;
	_tmp11_ = self->priv->date_label;
	gtk_box_append (_tmp10_, (GtkWidget*) _tmp11_);
	_tmp12_ = date_box;
	_tmp13_ = _g_object_ref0 ((GtkWidget*) _tmp12_);
	_tmp14_ = (GtkButton*) gtk_button_new ();
	gtk_button_set_child (_tmp14_, _tmp13_);
	_g_object_unref0 (_tmp13_);
	g_object_ref_sink (_tmp14_);
	_g_object_unref0 (self->priv->button);
	self->priv->button = _tmp14_;
	_tmp15_ = self->priv->button;
	g_signal_connect_object (_tmp15_, "clicked", (GCallback) __widgets_date_time_picker_date_time_picker_suggested_date___lambda186__gtk_button_clicked, self, 0);
	_tmp16_ = self->priv->button;
	adw_bin_set_child ((AdwBin*) self, (GtkWidget*) _tmp16_);
	_tmp17_ = self->priv->_due_date;
	_tmp18_ = objects_due_date_get_datetime (_tmp17_);
	_tmp19_ = _tmp18_;
	if (utils_datetime_is_today (_tmp19_)) {
		GtkImage* _tmp20_;
		_tmp20_ = self->priv->date_icon;
		g_object_set (_tmp20_, "icon-name", "star-outline-thick-symbolic", NULL);
	} else {
		ObjectsDueDate* _tmp21_;
		GDateTime* _tmp22_;
		GDateTime* _tmp23_;
		_tmp21_ = self->priv->_due_date;
		_tmp22_ = objects_due_date_get_datetime (_tmp21_);
		_tmp23_ = _tmp22_;
		if (utils_datetime_is_tomorrow (_tmp23_)) {
			GtkImage* _tmp24_;
			_tmp24_ = self->priv->date_icon;
			g_object_set (_tmp24_, "icon-name", "today-calendar-symbolic", NULL);
		} else {
			ObjectsDueDate* _tmp25_;
			GDateTime* _tmp26_;
			GDateTime* _tmp27_;
			_tmp25_ = self->priv->_due_date;
			_tmp26_ = objects_due_date_get_datetime (_tmp25_);
			_tmp27_ = _tmp26_;
			if (utils_datetime_is_overdue (_tmp27_)) {
				GtkImage* _tmp28_;
				_tmp28_ = self->priv->date_icon;
				g_object_set (_tmp28_, "icon-name", "month-symbolic", NULL);
			} else {
				GtkImage* _tmp29_;
				_tmp29_ = self->priv->date_icon;
				g_object_set (_tmp29_, "icon-name", "month-symbolic", NULL);
			}
		}
	}
	_tmp30_ = self->priv->_due_date;
	_tmp31_ = objects_due_date_get_is_recurring (_tmp30_);
	_tmp32_ = _tmp31_;
	if (_tmp32_) {
		gchar* end_label = NULL;
		gchar* _tmp33_;
		ObjectsDueDate* _tmp34_;
		RecurrencyEndType _tmp35_;
		RecurrencyEndType _tmp36_;
		GtkImage* _tmp62_;
		gchar* repeat_text = NULL;
		ObjectsDueDate* _tmp63_;
		RecurrencyType _tmp64_;
		RecurrencyType _tmp65_;
		ObjectsDueDate* _tmp66_;
		gint _tmp67_;
		gint _tmp68_;
		ObjectsDueDate* _tmp69_;
		const gchar* _tmp70_;
		const gchar* _tmp71_;
		const gchar* _tmp72_;
		gchar* _tmp73_;
		gchar* _tmp74_;
		gchar* _tmp75_;
		gchar* _tmp76_;
		GtkLabel* _tmp77_;
		GtkLabel* _tmp78_;
		const gchar* _tmp79_;
		const gchar* _tmp80_;
		const gchar* _tmp81_;
		gchar* _tmp82_;
		gchar* _tmp83_;
		gchar* _tmp84_;
		gchar* _tmp85_;
		GtkLabel* _tmp86_;
		const gchar* _tmp87_;
		_tmp33_ = g_strdup ("");
		end_label = _tmp33_;
		_tmp34_ = self->priv->_due_date;
		_tmp35_ = objects_due_date_get_end_type (_tmp34_);
		_tmp36_ = _tmp35_;
		if (_tmp36_ == RECURRENCY_END_TYPE_ON_DATE) {
			gchar* date_label = NULL;
			ObjectsDueDate* _tmp37_;
			const gchar* _tmp38_;
			const gchar* _tmp39_;
			GDateTime* _tmp40_;
			GDateTime* _tmp41_;
			GDateTime* _tmp42_;
			GDateTime* _tmp43_;
			gchar* _tmp44_;
			gchar* _tmp45_;
			gchar* _tmp46_;
			gchar* _tmp47_;
			const gchar* _tmp48_;
			gchar* _tmp49_;
			_tmp37_ = self->priv->_due_date;
			_tmp38_ = objects_due_date_get_recurrency_end (_tmp37_);
			_tmp39_ = _tmp38_;
			_tmp40_ = utils_datetime_get_date_from_string (_tmp39_);
			_tmp41_ = _tmp40_;
			_tmp42_ = utils_datetime_get_date_only (_tmp41_);
			_tmp43_ = _tmp42_;
			_tmp44_ = utils_datetime_get_default_date_format_from_date (_tmp43_);
			_tmp45_ = _tmp44_;
			_g_date_time_unref0 (_tmp43_);
			_g_date_time_unref0 (_tmp41_);
			date_label = _tmp45_;
			_tmp46_ = g_strconcat (_ ("until"), " ", NULL);
			_tmp47_ = _tmp46_;
			_tmp48_ = date_label;
			_tmp49_ = g_strconcat (_tmp47_, _tmp48_, NULL);
			_g_free0 (end_label);
			end_label = _tmp49_;
			_g_free0 (_tmp47_);
			_g_free0 (date_label);
		} else {
			ObjectsDueDate* _tmp50_;
			RecurrencyEndType _tmp51_;
			RecurrencyEndType _tmp52_;
			_tmp50_ = self->priv->_due_date;
			_tmp51_ = objects_due_date_get_end_type (_tmp50_);
			_tmp52_ = _tmp51_;
			if (_tmp52_ == RECURRENCY_END_TYPE_AFTER) {
				gint count = 0;
				ObjectsDueDate* _tmp53_;
				gint _tmp54_;
				gint _tmp55_;
				const gchar* _tmp56_ = NULL;
				gchar* _tmp57_;
				gchar* _tmp58_;
				gchar* _tmp59_;
				gchar* _tmp60_;
				gchar* _tmp61_;
				_tmp53_ = self->priv->_due_date;
				_tmp54_ = objects_due_date_get_recurrency_count (_tmp53_);
				_tmp55_ = _tmp54_;
				count = _tmp55_;
				if (count > 1) {
					_tmp56_ = _ ("times");
				} else {
					_tmp56_ = _ ("time");
				}
				_tmp57_ = g_strconcat (_ ("for"), " ", NULL);
				_tmp58_ = _tmp57_;
				_tmp59_ = g_strdup_printf ("%d %s", count, _tmp56_);
				_tmp60_ = _tmp59_;
				_tmp61_ = g_strconcat (_tmp58_, _tmp60_, NULL);
				_g_free0 (end_label);
				end_label = _tmp61_;
				_g_free0 (_tmp60_);
				_g_free0 (_tmp58_);
			}
		}
		_tmp62_ = self->priv->date_icon;
		g_object_set (_tmp62_, "icon-name", "playlist-repeat-symbolic", NULL);
		_tmp63_ = self->priv->_due_date;
		_tmp64_ = objects_due_date_get_recurrency_type (_tmp63_);
		_tmp65_ = _tmp64_;
		_tmp66_ = self->priv->_due_date;
		_tmp67_ = objects_due_date_get_recurrency_interval (_tmp66_);
		_tmp68_ = _tmp67_;
		_tmp69_ = self->priv->_due_date;
		_tmp70_ = objects_due_date_get_recurrency_weeks (_tmp69_);
		_tmp71_ = _tmp70_;
		_tmp72_ = end_label;
		_tmp73_ = utils_datetime_get_recurrency_weeks (_tmp65_, _tmp68_, _tmp71_, _tmp72_, FALSE);
		_tmp74_ = _tmp73_;
		_tmp75_ = g_utf8_strdown (_tmp74_, (gssize) -1);
		_tmp76_ = _tmp75_;
		_g_free0 (_tmp74_);
		repeat_text = _tmp76_;
		_tmp77_ = self->priv->date_label;
		_tmp78_ = self->priv->date_label;
		_tmp79_ = gtk_label_get_label (_tmp78_);
		_tmp80_ = _tmp79_;
		_tmp81_ = repeat_text;
		_tmp82_ = g_strdup_printf (", <small>%s</small>", _tmp81_);
		_tmp83_ = _tmp82_;
		_tmp84_ = g_strconcat (_tmp80_, _tmp83_, NULL);
		_tmp85_ = _tmp84_;
		gtk_label_set_label (_tmp78_, _tmp85_);
		_g_free0 (_tmp85_);
		_g_free0 (_tmp83_);
		_tmp86_ = self->priv->date_label;
		_tmp87_ = repeat_text;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp86_, _tmp87_);
		_g_free0 (repeat_text);
		_g_free0 (end_label);
	}
	_g_object_unref0 (date_box);
	return obj;
}

static void
widgets_date_time_picker_date_time_picker_suggested_date_class_init (WidgetsDateTimePickerDateTimePickerSuggestedDateClass * klass,
                                                                     gpointer klass_data)
{
	widgets_date_time_picker_date_time_picker_suggested_date_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WidgetsDateTimePickerDateTimePickerSuggestedDate_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_widgets_date_time_picker_date_time_picker_suggested_date_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_widgets_date_time_picker_date_time_picker_suggested_date_set_property;
	G_OBJECT_CLASS (klass)->constructor = widgets_date_time_picker_date_time_picker_suggested_date_constructor;
	G_OBJECT_CLASS (klass)->finalize = widgets_date_time_picker_date_time_picker_suggested_date_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_DUE_DATE_PROPERTY, widgets_date_time_picker_date_time_picker_suggested_date_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_DUE_DATE_PROPERTY] = g_param_spec_object ("due-date", "due-date", "due-date", OBJECTS_TYPE_DUE_DATE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_TITLE_PROPERTY, widgets_date_time_picker_date_time_picker_suggested_date_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	widgets_date_time_picker_date_time_picker_suggested_date_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_CLICKED_SIGNAL] = g_signal_new ("clicked", WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_TYPE_SUGGESTED_DATE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
widgets_date_time_picker_date_time_picker_suggested_date_instance_init (WidgetsDateTimePickerDateTimePickerSuggestedDate * self,
                                                                        gpointer klass)
{
	self->priv = widgets_date_time_picker_date_time_picker_suggested_date_get_instance_private (self);
}

static void
widgets_date_time_picker_date_time_picker_suggested_date_finalize (GObject * obj)
{
	WidgetsDateTimePickerDateTimePickerSuggestedDate * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_TYPE_SUGGESTED_DATE, WidgetsDateTimePickerDateTimePickerSuggestedDate);
	_g_object_unref0 (self->priv->_due_date);
	_g_object_unref0 (self->priv->date_icon);
	_g_object_unref0 (self->priv->date_label);
	_g_object_unref0 (self->priv->button);
	G_OBJECT_CLASS (widgets_date_time_picker_date_time_picker_suggested_date_parent_class)->finalize (obj);
}

static GType
widgets_date_time_picker_date_time_picker_suggested_date_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsDateTimePickerDateTimePickerSuggestedDateClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_date_time_picker_date_time_picker_suggested_date_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsDateTimePickerDateTimePickerSuggestedDate), 0, (GInstanceInitFunc) widgets_date_time_picker_date_time_picker_suggested_date_instance_init, NULL };
	GType widgets_date_time_picker_date_time_picker_suggested_date_type_id;
	widgets_date_time_picker_date_time_picker_suggested_date_type_id = g_type_register_static (adw_bin_get_type (), "WidgetsDateTimePickerDateTimePickerSuggestedDate", &g_define_type_info, 0);
	WidgetsDateTimePickerDateTimePickerSuggestedDate_private_offset = g_type_add_instance_private (widgets_date_time_picker_date_time_picker_suggested_date_type_id, sizeof (WidgetsDateTimePickerDateTimePickerSuggestedDatePrivate));
	return widgets_date_time_picker_date_time_picker_suggested_date_type_id;
}

GType
widgets_date_time_picker_date_time_picker_suggested_date_get_type (void)
{
	static volatile gsize widgets_date_time_picker_date_time_picker_suggested_date_type_id__once = 0;
	if (g_once_init_enter (&widgets_date_time_picker_date_time_picker_suggested_date_type_id__once)) {
		GType widgets_date_time_picker_date_time_picker_suggested_date_type_id;
		widgets_date_time_picker_date_time_picker_suggested_date_type_id = widgets_date_time_picker_date_time_picker_suggested_date_get_type_once ();
		g_once_init_leave (&widgets_date_time_picker_date_time_picker_suggested_date_type_id__once, widgets_date_time_picker_date_time_picker_suggested_date_type_id);
	}
	return widgets_date_time_picker_date_time_picker_suggested_date_type_id__once;
}

static void
_vala_widgets_date_time_picker_date_time_picker_suggested_date_get_property (GObject * object,
                                                                             guint property_id,
                                                                             GValue * value,
                                                                             GParamSpec * pspec)
{
	WidgetsDateTimePickerDateTimePickerSuggestedDate * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_TYPE_SUGGESTED_DATE, WidgetsDateTimePickerDateTimePickerSuggestedDate);
	switch (property_id) {
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_DUE_DATE_PROPERTY:
		g_value_set_object (value, widgets_date_time_picker_date_time_picker_suggested_date_get_due_date (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_widgets_date_time_picker_date_time_picker_suggested_date_set_property (GObject * object,
                                                                             guint property_id,
                                                                             const GValue * value,
                                                                             GParamSpec * pspec)
{
	WidgetsDateTimePickerDateTimePickerSuggestedDate * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_TYPE_SUGGESTED_DATE, WidgetsDateTimePickerDateTimePickerSuggestedDate);
	switch (property_id) {
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_DUE_DATE_PROPERTY:
		widgets_date_time_picker_date_time_picker_suggested_date_set_due_date (self, g_value_get_object (value));
		break;
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_SUGGESTED_DATE_TITLE_PROPERTY:
		widgets_date_time_picker_date_time_picker_suggested_date_set_title (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

WidgetsDateTimePickerDateTimePickerNoDateButton*
widgets_date_time_picker_date_time_picker_no_date_button_construct (GType object_type)
{
	WidgetsDateTimePickerDateTimePickerNoDateButton * self = NULL;
	self = (WidgetsDateTimePickerDateTimePickerNoDateButton*) g_object_new (object_type, NULL);
	return self;
}

WidgetsDateTimePickerDateTimePickerNoDateButton*
widgets_date_time_picker_date_time_picker_no_date_button_new (void)
{
	return widgets_date_time_picker_date_time_picker_no_date_button_construct (WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_TYPE_NO_DATE_BUTTON);
}

static void
_widgets_date_time_picker_date_time_picker_no_date_button___lambda154_ (WidgetsDateTimePickerDateTimePickerNoDateButton* self)
{
	g_signal_emit (self, widgets_date_time_picker_date_time_picker_no_date_button_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_NO_DATE_BUTTON_CLICKED_SIGNAL], 0);
}

static void
__widgets_date_time_picker_date_time_picker_no_date_button___lambda154__gtk_button_clicked (GtkButton* _sender,
                                                                                            gpointer self)
{
	_widgets_date_time_picker_date_time_picker_no_date_button___lambda154_ ((WidgetsDateTimePickerDateTimePickerNoDateButton*) self);
}

static GObject *
widgets_date_time_picker_date_time_picker_no_date_button_constructor (GType type,
                                                                      guint n_construct_properties,
                                                                      GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	WidgetsDateTimePickerDateTimePickerNoDateButton * self;
	GtkImage* date_icon = NULL;
	GtkImage* _tmp0_;
	GtkLabel* date_label = NULL;
	GtkLabel* _tmp1_ = NULL;
	GtkBox* date_box = NULL;
	GtkBox* _tmp2_;
	GtkBox* _tmp3_;
	GtkImage* _tmp4_;
	GtkBox* _tmp5_;
	GtkLabel* _tmp6_;
	GtkButton* button = NULL;
	GtkBox* _tmp7_;
	GtkWidget* _tmp8_;
	GtkButton* _tmp9_ = NULL;
	GtkButton* _tmp10_;
	GtkButton* _tmp11_;
	parent_class = G_OBJECT_CLASS (widgets_date_time_picker_date_time_picker_no_date_button_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_TYPE_NO_DATE_BUTTON, WidgetsDateTimePickerDateTimePickerNoDateButton);
	_tmp0_ = (GtkImage*) gtk_image_new_from_icon_name ("cross-large-circle-filled-symbolic");
	g_object_ref_sink (_tmp0_);
	date_icon = _tmp0_;
	_tmp1_ = (GtkLabel*) gtk_label_new (_ ("No date"));
	gtk_label_set_ellipsize (_tmp1_, PANGO_ELLIPSIZE_END);
	g_object_ref_sink (_tmp1_);
	date_label = _tmp1_;
	_tmp2_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp2_);
	date_box = _tmp2_;
	_tmp3_ = date_box;
	_tmp4_ = date_icon;
	gtk_box_append (_tmp3_, (GtkWidget*) _tmp4_);
	_tmp5_ = date_box;
	_tmp6_ = date_label;
	gtk_box_append (_tmp5_, (GtkWidget*) _tmp6_);
	_tmp7_ = date_box;
	_tmp8_ = _g_object_ref0 ((GtkWidget*) _tmp7_);
	_tmp9_ = (GtkButton*) gtk_button_new ();
	gtk_button_set_child (_tmp9_, _tmp8_);
	_g_object_unref0 (_tmp8_);
	g_object_ref_sink (_tmp9_);
	button = _tmp9_;
	_tmp10_ = button;
	g_signal_connect_object (_tmp10_, "clicked", (GCallback) __widgets_date_time_picker_date_time_picker_no_date_button___lambda154__gtk_button_clicked, self, 0);
	_tmp11_ = button;
	adw_bin_set_child ((AdwBin*) self, (GtkWidget*) _tmp11_);
	_g_object_unref0 (button);
	_g_object_unref0 (date_box);
	_g_object_unref0 (date_label);
	_g_object_unref0 (date_icon);
	return obj;
}

static void
widgets_date_time_picker_date_time_picker_no_date_button_class_init (WidgetsDateTimePickerDateTimePickerNoDateButtonClass * klass,
                                                                     gpointer klass_data)
{
	widgets_date_time_picker_date_time_picker_no_date_button_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->constructor = widgets_date_time_picker_date_time_picker_no_date_button_constructor;
	widgets_date_time_picker_date_time_picker_no_date_button_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_NO_DATE_BUTTON_CLICKED_SIGNAL] = g_signal_new ("clicked", WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_TYPE_NO_DATE_BUTTON, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
widgets_date_time_picker_date_time_picker_no_date_button_instance_init (WidgetsDateTimePickerDateTimePickerNoDateButton * self,
                                                                        gpointer klass)
{
}

static GType
widgets_date_time_picker_date_time_picker_no_date_button_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsDateTimePickerDateTimePickerNoDateButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_date_time_picker_date_time_picker_no_date_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsDateTimePickerDateTimePickerNoDateButton), 0, (GInstanceInitFunc) widgets_date_time_picker_date_time_picker_no_date_button_instance_init, NULL };
	GType widgets_date_time_picker_date_time_picker_no_date_button_type_id;
	widgets_date_time_picker_date_time_picker_no_date_button_type_id = g_type_register_static (adw_bin_get_type (), "WidgetsDateTimePickerDateTimePickerNoDateButton", &g_define_type_info, 0);
	return widgets_date_time_picker_date_time_picker_no_date_button_type_id;
}

GType
widgets_date_time_picker_date_time_picker_no_date_button_get_type (void)
{
	static volatile gsize widgets_date_time_picker_date_time_picker_no_date_button_type_id__once = 0;
	if (g_once_init_enter (&widgets_date_time_picker_date_time_picker_no_date_button_type_id__once)) {
		GType widgets_date_time_picker_date_time_picker_no_date_button_type_id;
		widgets_date_time_picker_date_time_picker_no_date_button_type_id = widgets_date_time_picker_date_time_picker_no_date_button_get_type_once ();
		g_once_init_leave (&widgets_date_time_picker_date_time_picker_no_date_button_type_id__once, widgets_date_time_picker_date_time_picker_no_date_button_type_id);
	}
	return widgets_date_time_picker_date_time_picker_no_date_button_type_id__once;
}

static inline gpointer
widgets_date_time_picker_date_time_picker_option_button_get_instance_private (WidgetsDateTimePickerDateTimePickerOptionButton* self)
{
	return G_STRUCT_MEMBER_P (self, WidgetsDateTimePickerDateTimePickerOptionButton_private_offset);
}

WidgetsDateTimePickerDateTimePickerOptionButton*
widgets_date_time_picker_date_time_picker_option_button_construct (GType object_type,
                                                                   const gchar* icon_name,
                                                                   const gchar* text)
{
	WidgetsDateTimePickerDateTimePickerOptionButton * self = NULL;
	g_return_val_if_fail (icon_name != NULL, NULL);
	g_return_val_if_fail (text != NULL, NULL);
	self = (WidgetsDateTimePickerDateTimePickerOptionButton*) g_object_new (object_type, "icon-name", icon_name, "text", text, "orientation", GTK_ORIENTATION_HORIZONTAL, "spacing", 0, NULL);
	return self;
}

WidgetsDateTimePickerDateTimePickerOptionButton*
widgets_date_time_picker_date_time_picker_option_button_new (const gchar* icon_name,
                                                             const gchar* text)
{
	return widgets_date_time_picker_date_time_picker_option_button_construct (WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_TYPE_OPTION_BUTTON, icon_name, text);
}

GtkButton*
widgets_date_time_picker_date_time_picker_option_button_get_main_button (WidgetsDateTimePickerDateTimePickerOptionButton* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_main_button;
	result = _tmp0_;
	return result;
}

static void
widgets_date_time_picker_date_time_picker_option_button_set_main_button (WidgetsDateTimePickerDateTimePickerOptionButton* self,
                                                                         GtkButton* value)
{
	GtkButton* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_date_time_picker_date_time_picker_option_button_get_main_button (self);
	if (old_value != value) {
		GtkButton* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_main_button);
		self->priv->_main_button = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_date_time_picker_date_time_picker_option_button_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_MAIN_BUTTON_PROPERTY]);
	}
}

GtkRevealer*
widgets_date_time_picker_date_time_picker_option_button_get_clear_revealer (WidgetsDateTimePickerDateTimePickerOptionButton* self)
{
	GtkRevealer* result;
	GtkRevealer* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_clear_revealer;
	result = _tmp0_;
	return result;
}

static void
widgets_date_time_picker_date_time_picker_option_button_set_clear_revealer (WidgetsDateTimePickerDateTimePickerOptionButton* self,
                                                                            GtkRevealer* value)
{
	GtkRevealer* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_date_time_picker_date_time_picker_option_button_get_clear_revealer (self);
	if (old_value != value) {
		GtkRevealer* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_clear_revealer);
		self->priv->_clear_revealer = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_date_time_picker_date_time_picker_option_button_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_CLEAR_REVEALER_PROPERTY]);
	}
}

const gchar*
widgets_date_time_picker_date_time_picker_option_button_get_icon_name (WidgetsDateTimePickerDateTimePickerOptionButton* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_icon_name;
	result = _tmp0_;
	return result;
}

static void
widgets_date_time_picker_date_time_picker_option_button_set_icon_name (WidgetsDateTimePickerDateTimePickerOptionButton* self,
                                                                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_date_time_picker_date_time_picker_option_button_get_icon_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_icon_name);
		self->priv->_icon_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_date_time_picker_date_time_picker_option_button_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_ICON_NAME_PROPERTY]);
	}
}

const gchar*
widgets_date_time_picker_date_time_picker_option_button_get_text (WidgetsDateTimePickerDateTimePickerOptionButton* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_text;
	result = _tmp0_;
	return result;
}

static void
widgets_date_time_picker_date_time_picker_option_button_set_text (WidgetsDateTimePickerDateTimePickerOptionButton* self,
                                                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_date_time_picker_date_time_picker_option_button_get_text (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_text);
		self->priv->_text = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_date_time_picker_date_time_picker_option_button_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_TEXT_PROPERTY]);
	}
}

gboolean
widgets_date_time_picker_date_time_picker_option_button_get_has_value (WidgetsDateTimePickerDateTimePickerOptionButton* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_has_value;
	return result;
}

void
widgets_date_time_picker_date_time_picker_option_button_set_has_value (WidgetsDateTimePickerDateTimePickerOptionButton* self,
                                                                       gboolean value)
{
	GtkImage* _tmp0_;
	GtkRevealer* _tmp1_;
	g_return_if_fail (self != NULL);
	self->priv->_has_value = value;
	_tmp0_ = self->priv->add_icon;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, !self->priv->_has_value);
	_tmp1_ = self->priv->_clear_revealer;
	gtk_revealer_set_reveal_child (_tmp1_, self->priv->_has_value);
	g_object_notify_by_pspec ((GObject *) self, widgets_date_time_picker_date_time_picker_option_button_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_HAS_VALUE_PROPERTY]);
}

const gchar*
widgets_date_time_picker_date_time_picker_option_button_get_label_text (WidgetsDateTimePickerDateTimePickerOptionButton* self)
{
	const gchar* result;
	GtkLabel* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->label;
	_tmp1_ = gtk_label_get_label (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

void
widgets_date_time_picker_date_time_picker_option_button_set_label_text (WidgetsDateTimePickerDateTimePickerOptionButton* self,
                                                                        const gchar* value)
{
	GtkLabel* _tmp0_;
	GtkLabel* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->label;
	gtk_label_set_label (_tmp0_, value);
	_tmp1_ = self->priv->label;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp1_, value);
	g_object_notify_by_pspec ((GObject *) self, widgets_date_time_picker_date_time_picker_option_button_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_LABEL_TEXT_PROPERTY]);
}

static void
_widgets_date_time_picker_date_time_picker_option_button___lambda155_ (WidgetsDateTimePickerDateTimePickerOptionButton* self)
{
	g_signal_emit (self, widgets_date_time_picker_date_time_picker_option_button_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_CLICKED_SIGNAL], 0);
}

static void
__widgets_date_time_picker_date_time_picker_option_button___lambda155__gtk_button_clicked (GtkButton* _sender,
                                                                                           gpointer self)
{
	_widgets_date_time_picker_date_time_picker_option_button___lambda155_ ((WidgetsDateTimePickerDateTimePickerOptionButton*) self);
}

static void
_widgets_date_time_picker_date_time_picker_option_button___lambda156_ (WidgetsDateTimePickerDateTimePickerOptionButton* self)
{
	g_signal_emit (self, widgets_date_time_picker_date_time_picker_option_button_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_CLEAR_CLICKED_SIGNAL], 0);
}

static void
__widgets_date_time_picker_date_time_picker_option_button___lambda156__gtk_button_clicked (GtkButton* _sender,
                                                                                           gpointer self)
{
	_widgets_date_time_picker_date_time_picker_option_button___lambda156_ ((WidgetsDateTimePickerDateTimePickerOptionButton*) self);
}

static GObject *
widgets_date_time_picker_date_time_picker_option_button_constructor (GType type,
                                                                     guint n_construct_properties,
                                                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	WidgetsDateTimePickerDateTimePickerOptionButton * self;
	GtkImage* icon = NULL;
	const gchar* _tmp0_;
	GtkImage* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar** _tmp4_;
	GtkLabel* _tmp5_ = NULL;
	GtkImage* _tmp6_ = NULL;
	GtkImage* _tmp7_;
	GtkBox* button_box = NULL;
	GtkBox* _tmp8_ = NULL;
	GtkBox* _tmp9_;
	GtkImage* _tmp10_;
	GtkBox* _tmp11_;
	GtkLabel* _tmp12_;
	GtkBox* _tmp13_;
	GtkImage* _tmp14_;
	GtkBox* _tmp15_;
	GtkWidget* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar** _tmp19_;
	GtkButton* _tmp20_ = NULL;
	GtkButton* _tmp21_;
	GtkButton* clear_button = NULL;
	gchar* _tmp22_;
	gchar** _tmp23_;
	GtkButton* _tmp24_ = NULL;
	GtkButton* _tmp25_;
	GtkWidget* _tmp26_;
	GtkRevealer* _tmp27_ = NULL;
	GtkRevealer* _tmp28_;
	GtkButton* _tmp29_;
	GtkRevealer* _tmp30_;
	GtkButton* _tmp31_;
	GtkButton* _tmp32_;
	parent_class = G_OBJECT_CLASS (widgets_date_time_picker_date_time_picker_option_button_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_TYPE_OPTION_BUTTON, WidgetsDateTimePickerDateTimePickerOptionButton);
	_tmp0_ = self->priv->_icon_name;
	_tmp1_ = (GtkImage*) gtk_image_new_from_icon_name (_tmp0_);
	g_object_ref_sink (_tmp1_);
	icon = _tmp1_;
	_tmp2_ = self->priv->_text;
	_tmp3_ = g_strdup ("font-weight-500");
	_tmp4_ = g_new0 (gchar*, 1 + 1);
	_tmp4_[0] = _tmp3_;
	_tmp5_ = (GtkLabel*) gtk_label_new (_tmp2_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp5_, _tmp4_);
	_tmp4_ = (_vala_array_free (_tmp4_, 1, (GDestroyNotify) g_free), NULL);
	gtk_label_set_ellipsize (_tmp5_, PANGO_ELLIPSIZE_END);
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->label);
	self->priv->label = _tmp5_;
	_tmp6_ = (GtkImage*) gtk_image_new_from_icon_name ("plus-large-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp6_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp6_, GTK_ALIGN_END);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp6_, TRUE);
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->priv->add_icon);
	self->priv->add_icon = _tmp6_;
	_tmp7_ = self->priv->add_icon;
	gtk_widget_add_css_class ((GtkWidget*) _tmp7_, "dimmed");
	_tmp8_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp8_, TRUE);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp8_, 9);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp8_, 6);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp8_, 6);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp8_, 9);
	g_object_ref_sink (_tmp8_);
	button_box = _tmp8_;
	_tmp9_ = button_box;
	_tmp10_ = icon;
	gtk_box_append (_tmp9_, (GtkWidget*) _tmp10_);
	_tmp11_ = button_box;
	_tmp12_ = self->priv->label;
	gtk_box_append (_tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = button_box;
	_tmp14_ = self->priv->add_icon;
	gtk_box_append (_tmp13_, (GtkWidget*) _tmp14_);
	_tmp15_ = button_box;
	_tmp16_ = _g_object_ref0 ((GtkWidget*) _tmp15_);
	_tmp17_ = g_strdup ("flat");
	_tmp18_ = g_strdup ("no-padding");
	_tmp19_ = g_new0 (gchar*, 2 + 1);
	_tmp19_[0] = _tmp17_;
	_tmp19_[1] = _tmp18_;
	_tmp20_ = (GtkButton*) gtk_button_new ();
	gtk_button_set_child (_tmp20_, _tmp16_);
	_g_object_unref0 (_tmp16_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp20_, _tmp19_);
	_tmp19_ = (_vala_array_free (_tmp19_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp20_);
	_tmp21_ = _tmp20_;
	widgets_date_time_picker_date_time_picker_option_button_set_main_button (self, _tmp21_);
	_g_object_unref0 (_tmp21_);
	_tmp22_ = g_strdup ("flat");
	_tmp23_ = g_new0 (gchar*, 1 + 1);
	_tmp23_[0] = _tmp22_;
	_tmp24_ = (GtkButton*) gtk_button_new_from_icon_name ("cross-large-circle-filled-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp24_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp24_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp24_, _tmp23_);
	_tmp23_ = (_vala_array_free (_tmp23_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp24_);
	clear_button = _tmp24_;
	_tmp25_ = clear_button;
	_tmp26_ = _g_object_ref0 ((GtkWidget*) _tmp25_);
	_tmp27_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp27_, _tmp26_);
	_g_object_unref0 (_tmp26_);
	gtk_revealer_set_transition_type (_tmp27_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT);
	gtk_revealer_set_reveal_child (_tmp27_, FALSE);
	g_object_ref_sink (_tmp27_);
	_tmp28_ = _tmp27_;
	widgets_date_time_picker_date_time_picker_option_button_set_clear_revealer (self, _tmp28_);
	_g_object_unref0 (_tmp28_);
	_tmp29_ = self->priv->_main_button;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp29_);
	_tmp30_ = self->priv->_clear_revealer;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp30_);
	_tmp31_ = self->priv->_main_button;
	g_signal_connect_object (_tmp31_, "clicked", (GCallback) __widgets_date_time_picker_date_time_picker_option_button___lambda155__gtk_button_clicked, self, 0);
	_tmp32_ = clear_button;
	g_signal_connect_object (_tmp32_, "clicked", (GCallback) __widgets_date_time_picker_date_time_picker_option_button___lambda156__gtk_button_clicked, self, 0);
	_g_object_unref0 (clear_button);
	_g_object_unref0 (button_box);
	_g_object_unref0 (icon);
	return obj;
}

static void
widgets_date_time_picker_date_time_picker_option_button_class_init (WidgetsDateTimePickerDateTimePickerOptionButtonClass * klass,
                                                                    gpointer klass_data)
{
	widgets_date_time_picker_date_time_picker_option_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WidgetsDateTimePickerDateTimePickerOptionButton_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_widgets_date_time_picker_date_time_picker_option_button_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_widgets_date_time_picker_date_time_picker_option_button_set_property;
	G_OBJECT_CLASS (klass)->constructor = widgets_date_time_picker_date_time_picker_option_button_constructor;
	G_OBJECT_CLASS (klass)->finalize = widgets_date_time_picker_date_time_picker_option_button_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_MAIN_BUTTON_PROPERTY, widgets_date_time_picker_date_time_picker_option_button_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_MAIN_BUTTON_PROPERTY] = g_param_spec_object ("main-button", "main-button", "main-button", gtk_button_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_CLEAR_REVEALER_PROPERTY, widgets_date_time_picker_date_time_picker_option_button_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_CLEAR_REVEALER_PROPERTY] = g_param_spec_object ("clear-revealer", "clear-revealer", "clear-revealer", gtk_revealer_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_ICON_NAME_PROPERTY, widgets_date_time_picker_date_time_picker_option_button_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_ICON_NAME_PROPERTY] = g_param_spec_string ("icon-name", "icon-name", "icon-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_TEXT_PROPERTY, widgets_date_time_picker_date_time_picker_option_button_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_TEXT_PROPERTY] = g_param_spec_string ("text", "text", "text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_HAS_VALUE_PROPERTY, widgets_date_time_picker_date_time_picker_option_button_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_HAS_VALUE_PROPERTY] = g_param_spec_boolean ("has-value", "has-value", "has-value", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_LABEL_TEXT_PROPERTY, widgets_date_time_picker_date_time_picker_option_button_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_LABEL_TEXT_PROPERTY] = g_param_spec_string ("label-text", "label-text", "label-text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	widgets_date_time_picker_date_time_picker_option_button_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_CLICKED_SIGNAL] = g_signal_new ("clicked", WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_TYPE_OPTION_BUTTON, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	widgets_date_time_picker_date_time_picker_option_button_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_CLEAR_CLICKED_SIGNAL] = g_signal_new ("clear-clicked", WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_TYPE_OPTION_BUTTON, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
widgets_date_time_picker_date_time_picker_option_button_instance_init (WidgetsDateTimePickerDateTimePickerOptionButton * self,
                                                                       gpointer klass)
{
	self->priv = widgets_date_time_picker_date_time_picker_option_button_get_instance_private (self);
	self->priv->_has_value = FALSE;
}

static void
widgets_date_time_picker_date_time_picker_option_button_finalize (GObject * obj)
{
	WidgetsDateTimePickerDateTimePickerOptionButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_TYPE_OPTION_BUTTON, WidgetsDateTimePickerDateTimePickerOptionButton);
	_g_object_unref0 (self->priv->_main_button);
	_g_object_unref0 (self->priv->_clear_revealer);
	_g_object_unref0 (self->priv->label);
	_g_object_unref0 (self->priv->add_icon);
	_g_free0 (self->priv->_icon_name);
	_g_free0 (self->priv->_text);
	G_OBJECT_CLASS (widgets_date_time_picker_date_time_picker_option_button_parent_class)->finalize (obj);
}

static GType
widgets_date_time_picker_date_time_picker_option_button_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsDateTimePickerDateTimePickerOptionButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_date_time_picker_date_time_picker_option_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsDateTimePickerDateTimePickerOptionButton), 0, (GInstanceInitFunc) widgets_date_time_picker_date_time_picker_option_button_instance_init, NULL };
	GType widgets_date_time_picker_date_time_picker_option_button_type_id;
	widgets_date_time_picker_date_time_picker_option_button_type_id = g_type_register_static (gtk_box_get_type (), "WidgetsDateTimePickerDateTimePickerOptionButton", &g_define_type_info, 0);
	WidgetsDateTimePickerDateTimePickerOptionButton_private_offset = g_type_add_instance_private (widgets_date_time_picker_date_time_picker_option_button_type_id, sizeof (WidgetsDateTimePickerDateTimePickerOptionButtonPrivate));
	return widgets_date_time_picker_date_time_picker_option_button_type_id;
}

GType
widgets_date_time_picker_date_time_picker_option_button_get_type (void)
{
	static volatile gsize widgets_date_time_picker_date_time_picker_option_button_type_id__once = 0;
	if (g_once_init_enter (&widgets_date_time_picker_date_time_picker_option_button_type_id__once)) {
		GType widgets_date_time_picker_date_time_picker_option_button_type_id;
		widgets_date_time_picker_date_time_picker_option_button_type_id = widgets_date_time_picker_date_time_picker_option_button_get_type_once ();
		g_once_init_leave (&widgets_date_time_picker_date_time_picker_option_button_type_id__once, widgets_date_time_picker_date_time_picker_option_button_type_id);
	}
	return widgets_date_time_picker_date_time_picker_option_button_type_id__once;
}

static void
_vala_widgets_date_time_picker_date_time_picker_option_button_get_property (GObject * object,
                                                                            guint property_id,
                                                                            GValue * value,
                                                                            GParamSpec * pspec)
{
	WidgetsDateTimePickerDateTimePickerOptionButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_TYPE_OPTION_BUTTON, WidgetsDateTimePickerDateTimePickerOptionButton);
	switch (property_id) {
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_MAIN_BUTTON_PROPERTY:
		g_value_set_object (value, widgets_date_time_picker_date_time_picker_option_button_get_main_button (self));
		break;
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_CLEAR_REVEALER_PROPERTY:
		g_value_set_object (value, widgets_date_time_picker_date_time_picker_option_button_get_clear_revealer (self));
		break;
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_ICON_NAME_PROPERTY:
		g_value_set_string (value, widgets_date_time_picker_date_time_picker_option_button_get_icon_name (self));
		break;
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_TEXT_PROPERTY:
		g_value_set_string (value, widgets_date_time_picker_date_time_picker_option_button_get_text (self));
		break;
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_HAS_VALUE_PROPERTY:
		g_value_set_boolean (value, widgets_date_time_picker_date_time_picker_option_button_get_has_value (self));
		break;
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_LABEL_TEXT_PROPERTY:
		g_value_set_string (value, widgets_date_time_picker_date_time_picker_option_button_get_label_text (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_widgets_date_time_picker_date_time_picker_option_button_set_property (GObject * object,
                                                                            guint property_id,
                                                                            const GValue * value,
                                                                            GParamSpec * pspec)
{
	WidgetsDateTimePickerDateTimePickerOptionButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_TYPE_OPTION_BUTTON, WidgetsDateTimePickerDateTimePickerOptionButton);
	switch (property_id) {
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_MAIN_BUTTON_PROPERTY:
		widgets_date_time_picker_date_time_picker_option_button_set_main_button (self, g_value_get_object (value));
		break;
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_CLEAR_REVEALER_PROPERTY:
		widgets_date_time_picker_date_time_picker_option_button_set_clear_revealer (self, g_value_get_object (value));
		break;
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_ICON_NAME_PROPERTY:
		widgets_date_time_picker_date_time_picker_option_button_set_icon_name (self, g_value_get_string (value));
		break;
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_TEXT_PROPERTY:
		widgets_date_time_picker_date_time_picker_option_button_set_text (self, g_value_get_string (value));
		break;
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_HAS_VALUE_PROPERTY:
		widgets_date_time_picker_date_time_picker_option_button_set_has_value (self, g_value_get_boolean (value));
		break;
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_OPTION_BUTTON_LABEL_TEXT_PROPERTY:
		widgets_date_time_picker_date_time_picker_option_button_set_label_text (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static Block30Data*
block30_data_ref (Block30Data* _data30_)
{
	g_atomic_int_inc (&_data30_->_ref_count_);
	return _data30_;
}

static void
block30_data_unref (void * _userdata_)
{
	Block30Data* _data30_;
	_data30_ = (Block30Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data30_->_ref_count_)) {
		WidgetsDateTimePickerDateTimePicker* self;
		self = _data30_->self;
		_g_object_unref0 (_data30_->suggested_date_box);
		_g_object_unref0 (_data30_->search_entry);
		_g_object_unref0 (_data30_->last_parsed_duedate);
		_g_object_unref0 (self);
		g_slice_free (Block30Data, _data30_);
	}
}

static gboolean
__lambda204_ (Block30Data* _data30_)
{
	WidgetsDateTimePickerDateTimePicker* self;
	GtkSearchEntry* _tmp0_;
	gboolean result;
	self = _data30_->self;
	_tmp0_ = _data30_->search_entry;
	gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda204__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda204_ (self);
	return result;
}

static void
_widgets_date_time_picker_date_time_picker___lambda203_ (Block30Data* _data30_)
{
	WidgetsDateTimePickerDateTimePicker* self;
	AdwWrapBox* _tmp5_;
	self = _data30_->self;
	while (TRUE) {
		AdwWrapBox* _tmp0_;
		GtkWidget* _tmp1_;
		AdwWrapBox* _tmp2_;
		AdwWrapBox* _tmp3_;
		GtkWidget* _tmp4_;
		_tmp0_ = _data30_->suggested_date_box;
		_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
		if (!(_tmp1_ != NULL)) {
			break;
		}
		_tmp2_ = _data30_->suggested_date_box;
		_tmp3_ = _data30_->suggested_date_box;
		_tmp4_ = gtk_widget_get_first_child ((GtkWidget*) _tmp3_);
		adw_wrap_box_remove (_tmp2_, _tmp4_);
	}
	_tmp5_ = _data30_->suggested_date_box;
	widgets_date_time_picker_date_time_picker_add_default_suggestions (self, _tmp5_);
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ___lambda204__gsource_func, block30_data_ref (_data30_), block30_data_unref);
}

static void
__widgets_date_time_picker_date_time_picker___lambda203__gtk_widget_show (GtkWidget* _sender,
                                                                          gpointer self)
{
	_widgets_date_time_picker_date_time_picker___lambda203_ (self);
}

static gboolean
_widgets_date_time_picker_date_time_picker___lambda205_ (WidgetsDateTimePickerDateTimePicker* self,
                                                         guint keyval,
                                                         guint keycode,
                                                         GdkModifierType state)
{
	gboolean result;
	if (keyval == GDK_KEY_Escape) {
		gtk_popover_popdown ((GtkPopover*) self);
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}

static gboolean
__widgets_date_time_picker_date_time_picker___lambda205__gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                                                               guint keyval,
                                                                                               guint keycode,
                                                                                               GdkModifierType state,
                                                                                               gpointer self)
{
	gboolean result;
	result = _widgets_date_time_picker_date_time_picker___lambda205_ ((WidgetsDateTimePickerDateTimePicker*) self, keyval, keycode, state);
	return result;
}

static void
_widgets_date_time_picker_date_time_picker___lambda206_ (WidgetsDateTimePickerDateTimePicker* self)
{
	GtkRevealer* _tmp0_;
	WidgetsDateTimePickerTimePicker* _tmp1_;
	_tmp0_ = self->priv->time_option_revealer;
	widgets_date_time_picker_date_time_picker_show_revealer (self, _tmp0_, NULL);
	_tmp1_ = self->priv->time_picker;
	widgets_date_time_picker_time_picker_grab_entry_focus (_tmp1_);
}

static void
__widgets_date_time_picker_date_time_picker___lambda206__widgets_date_time_picker_date_time_picker_option_button_clicked (WidgetsDateTimePickerDateTimePickerOptionButton* _sender,
                                                                                                                          gpointer self)
{
	_widgets_date_time_picker_date_time_picker___lambda206_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
_widgets_date_time_picker_date_time_picker___lambda207_ (WidgetsDateTimePickerDateTimePicker* self)
{
	WidgetsDateTimePickerTimePicker* _tmp0_;
	widgets_date_time_picker_date_time_picker_set_has_time (self, FALSE);
	_tmp0_ = self->priv->time_picker;
	widgets_date_time_picker_time_picker_reset (_tmp0_);
	g_signal_emit (self, widgets_date_time_picker_date_time_picker_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_DUEDATE_CHANGED_SIGNAL], 0);
}

static void
__widgets_date_time_picker_date_time_picker___lambda207__widgets_date_time_picker_date_time_picker_option_button_clear_clicked (WidgetsDateTimePickerDateTimePickerOptionButton* _sender,
                                                                                                                                gpointer self)
{
	_widgets_date_time_picker_date_time_picker___lambda207_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
_widgets_date_time_picker_date_time_picker___lambda208_ (WidgetsDateTimePickerDateTimePicker* self)
{
	GtkRevealer* _tmp0_;
	_tmp0_ = self->priv->repeat_option_revealer;
	widgets_date_time_picker_date_time_picker_show_revealer (self, _tmp0_, NULL);
}

static void
__widgets_date_time_picker_date_time_picker___lambda208__widgets_date_time_picker_date_time_picker_option_button_clicked (WidgetsDateTimePickerDateTimePickerOptionButton* _sender,
                                                                                                                          gpointer self)
{
	_widgets_date_time_picker_date_time_picker___lambda208_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
_widgets_date_time_picker_date_time_picker___lambda209_ (WidgetsDateTimePickerDateTimePicker* self)
{
	widgets_date_time_picker_date_time_picker_apply_recurrency (self, RECURRENCY_TYPE_NONE, 0, NULL, FALSE);
}

static void
__widgets_date_time_picker_date_time_picker___lambda209__widgets_date_time_picker_date_time_picker_option_button_clear_clicked (WidgetsDateTimePickerDateTimePickerOptionButton* _sender,
                                                                                                                                gpointer self)
{
	_widgets_date_time_picker_date_time_picker___lambda209_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
_widgets_date_time_picker_date_time_picker___lambda210_ (WidgetsDateTimePickerDateTimePicker* self)
{
	GtkStack* _tmp0_;
	_tmp0_ = self->priv->main_stack;
	gtk_stack_set_visible_child_name (_tmp0_, "main");
}

static void
__widgets_date_time_picker_date_time_picker___lambda210__gtk_popover_closed (GtkPopover* _sender,
                                                                             gpointer self)
{
	_widgets_date_time_picker_date_time_picker___lambda210_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
_widgets_date_time_picker_date_time_picker___lambda211_ (Block30Data* _data30_)
{
	WidgetsDateTimePickerDateTimePicker* self;
	ObjectsDueDate* _tmp0_;
	self = _data30_->self;
	_tmp0_ = _data30_->last_parsed_duedate;
	if (_tmp0_ != NULL) {
		ObjectsDueDate* _tmp1_;
		_tmp1_ = _data30_->last_parsed_duedate;
		widgets_date_time_picker_date_time_picker_set_duedate (self, _tmp1_);
		widgets_date_time_picker_date_time_picker_set_visible_no_date (self, TRUE);
		g_signal_emit (self, widgets_date_time_picker_date_time_picker_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_DUEDATE_CHANGED_SIGNAL], 0);
		gtk_popover_popdown ((GtkPopover*) self);
	}
}

static void
__widgets_date_time_picker_date_time_picker___lambda211__gtk_search_entry_activate (GtkSearchEntry* _sender,
                                                                                    gpointer self)
{
	_widgets_date_time_picker_date_time_picker___lambda211_ (self);
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	glong result;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}

static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (offset >= ((glong) 0)) {
		_tmp0_ = len >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		string_length = string_strnlen ((gchar*) self, offset + len);
	} else {
		gint _tmp1_;
		gint _tmp2_;
		_tmp1_ = strlen (self);
		_tmp2_ = _tmp1_;
		string_length = (glong) _tmp2_;
	}
	if (offset < ((glong) 0)) {
		offset = string_length + offset;
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
	} else {
		g_return_val_if_fail (offset <= string_length, NULL);
	}
	if (len < ((glong) 0)) {
		len = string_length - offset;
	}
	g_return_val_if_fail ((offset + len) <= string_length, NULL);
	_tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
	result = _tmp3_;
	return result;
}

static gboolean
__lambda213_ (Block30Data* _data30_)
{
	WidgetsDateTimePickerDateTimePicker* self;
	gchar* text = NULL;
	GtkSearchEntry* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	const gchar* _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	ChronoParseResult* _result_ = NULL;
	ChronoCore* _tmp13_;
	const gchar* _tmp14_;
	ChronoParseResult* _tmp15_;
	gboolean _tmp16_ = FALSE;
	ChronoParseResult* _tmp17_;
	gboolean result;
	self = _data30_->self;
	self->priv->search_timeout_id = (guint) 0;
	while (TRUE) {
		AdwWrapBox* _tmp0_;
		GtkWidget* _tmp1_;
		AdwWrapBox* _tmp2_;
		AdwWrapBox* _tmp3_;
		GtkWidget* _tmp4_;
		_tmp0_ = _data30_->suggested_date_box;
		_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
		if (!(_tmp1_ != NULL)) {
			break;
		}
		_tmp2_ = _data30_->suggested_date_box;
		_tmp3_ = _data30_->suggested_date_box;
		_tmp4_ = gtk_widget_get_first_child ((GtkWidget*) _tmp3_);
		adw_wrap_box_remove (_tmp2_, _tmp4_);
	}
	_tmp5_ = _data30_->search_entry;
	_tmp6_ = gtk_editable_get_text ((GtkEditable*) _tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = string_strip (_tmp7_);
	text = _tmp8_;
	_tmp9_ = text;
	_tmp10_ = strlen (_tmp9_);
	_tmp11_ = _tmp10_;
	if (_tmp11_ == 0) {
		AdwWrapBox* _tmp12_;
		_g_object_unref0 (_data30_->last_parsed_duedate);
		_data30_->last_parsed_duedate = NULL;
		_tmp12_ = _data30_->suggested_date_box;
		widgets_date_time_picker_date_time_picker_add_default_suggestions (self, _tmp12_);
		result = G_SOURCE_REMOVE;
		_g_free0 (text);
		return result;
	}
	_tmp13_ = self->priv->chrono;
	_tmp14_ = text;
	_tmp15_ = chrono_core_parse (_tmp13_, _tmp14_, FALSE);
	_result_ = _tmp15_;
	_tmp17_ = _result_;
	if (_tmp17_ != NULL) {
		ChronoParseResult* _tmp18_;
		GDateTime* _tmp19_;
		GDateTime* _tmp20_;
		_tmp18_ = _result_;
		_tmp19_ = chrono_parse_result_get_date (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp16_ = _tmp20_ != NULL;
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		ObjectsDueDate* parsed_duedate = NULL;
		ObjectsDueDate* _tmp21_;
		ObjectsDueDate* _tmp22_;
		ChronoParseResult* _tmp23_;
		GDateTime* _tmp24_;
		GDateTime* _tmp25_;
		ChronoParseResult* _tmp26_;
		ChronoRecurrenceRule* _tmp27_;
		ChronoRecurrenceRule* _tmp28_;
		ObjectsDueDate* _tmp84_;
		ObjectsDueDate* _tmp85_;
		WidgetsDateTimePickerDateTimePickerSuggestedDate* suggested_date = NULL;
		ObjectsDueDate* _tmp86_;
		WidgetsDateTimePickerDateTimePickerSuggestedDate* _tmp87_;
		AdwWrapBox* _tmp88_;
		WidgetsDateTimePickerDateTimePickerSuggestedDate* _tmp89_;
		WidgetsDateTimePickerDateTimePickerSuggestedDate* _tmp90_;
		_tmp21_ = objects_due_date_new ();
		parsed_duedate = _tmp21_;
		_tmp22_ = parsed_duedate;
		_tmp23_ = _result_;
		_tmp24_ = chrono_parse_result_get_date (_tmp23_);
		_tmp25_ = _tmp24_;
		objects_due_date_set_datetime (_tmp22_, _tmp25_);
		_tmp26_ = _result_;
		_tmp27_ = chrono_parse_result_get_recurrence (_tmp26_);
		_tmp28_ = _tmp27_;
		if (_tmp28_ != NULL) {
			ObjectsDueDate* _tmp29_;
			ObjectsDueDate* _tmp30_;
			ChronoParseResult* _tmp31_;
			ChronoRecurrenceRule* _tmp32_;
			ChronoRecurrenceRule* _tmp33_;
			gint _tmp34_;
			gint _tmp35_;
			ChronoParseResult* _tmp36_;
			ChronoRecurrenceRule* _tmp37_;
			ChronoRecurrenceRule* _tmp38_;
			ChronoRecurrenceType _tmp39_;
			ChronoRecurrenceType _tmp40_;
			gboolean _tmp45_ = FALSE;
			ChronoParseResult* _tmp46_;
			ChronoRecurrenceRule* _tmp47_;
			ChronoRecurrenceRule* _tmp48_;
			GeeArrayList* _tmp49_;
			GeeArrayList* _tmp50_;
			_tmp29_ = parsed_duedate;
			objects_due_date_set_is_recurring (_tmp29_, TRUE);
			_tmp30_ = parsed_duedate;
			_tmp31_ = _result_;
			_tmp32_ = chrono_parse_result_get_recurrence (_tmp31_);
			_tmp33_ = _tmp32_;
			_tmp34_ = chrono_recurrence_rule_get_interval (_tmp33_);
			_tmp35_ = _tmp34_;
			objects_due_date_set_recurrency_interval (_tmp30_, _tmp35_);
			_tmp36_ = _result_;
			_tmp37_ = chrono_parse_result_get_recurrence (_tmp36_);
			_tmp38_ = _tmp37_;
			_tmp39_ = chrono_recurrence_rule_get_recurrence_type (_tmp38_);
			_tmp40_ = _tmp39_;
			switch (_tmp40_) {
				case CHRONO_RECURRENCE_TYPE_DAILY:
				{
					ObjectsDueDate* _tmp41_;
					_tmp41_ = parsed_duedate;
					objects_due_date_set_recurrency_type (_tmp41_, RECURRENCY_TYPE_EVERY_DAY);
					break;
				}
				case CHRONO_RECURRENCE_TYPE_WEEKLY:
				{
					ObjectsDueDate* _tmp42_;
					_tmp42_ = parsed_duedate;
					objects_due_date_set_recurrency_type (_tmp42_, RECURRENCY_TYPE_EVERY_WEEK);
					break;
				}
				case CHRONO_RECURRENCE_TYPE_MONTHLY:
				{
					ObjectsDueDate* _tmp43_;
					_tmp43_ = parsed_duedate;
					objects_due_date_set_recurrency_type (_tmp43_, RECURRENCY_TYPE_EVERY_MONTH);
					break;
				}
				case CHRONO_RECURRENCE_TYPE_YEARLY:
				{
					ObjectsDueDate* _tmp44_;
					_tmp44_ = parsed_duedate;
					objects_due_date_set_recurrency_type (_tmp44_, RECURRENCY_TYPE_EVERY_YEAR);
					break;
				}
				default:
				break;
			}
			_tmp46_ = _result_;
			_tmp47_ = chrono_parse_result_get_recurrence (_tmp46_);
			_tmp48_ = _tmp47_;
			_tmp49_ = chrono_recurrence_rule_get_days_of_week (_tmp48_);
			_tmp50_ = _tmp49_;
			if (_tmp50_ != NULL) {
				ChronoParseResult* _tmp51_;
				ChronoRecurrenceRule* _tmp52_;
				ChronoRecurrenceRule* _tmp53_;
				GeeArrayList* _tmp54_;
				GeeArrayList* _tmp55_;
				gint _tmp56_;
				gint _tmp57_;
				_tmp51_ = _result_;
				_tmp52_ = chrono_parse_result_get_recurrence (_tmp51_);
				_tmp53_ = _tmp52_;
				_tmp54_ = chrono_recurrence_rule_get_days_of_week (_tmp53_);
				_tmp55_ = _tmp54_;
				_tmp56_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp55_);
				_tmp57_ = _tmp56_;
				_tmp45_ = _tmp57_ > 0;
			} else {
				_tmp45_ = FALSE;
			}
			if (_tmp45_) {
				gchar* weeks = NULL;
				gchar* _tmp58_;
				ObjectsDueDate* _tmp77_;
				const gchar* _tmp78_;
				const gchar* _tmp79_;
				gint _tmp80_;
				gint _tmp81_;
				gchar* _tmp82_;
				gchar* _tmp83_;
				_tmp58_ = g_strdup ("");
				weeks = _tmp58_;
				{
					GeeArrayList* _day_list = NULL;
					ChronoParseResult* _tmp59_;
					ChronoRecurrenceRule* _tmp60_;
					ChronoRecurrenceRule* _tmp61_;
					GeeArrayList* _tmp62_;
					GeeArrayList* _tmp63_;
					gint _day_size = 0;
					GeeArrayList* _tmp64_;
					gint _tmp65_;
					gint _tmp66_;
					gint _day_index = 0;
					_tmp59_ = _result_;
					_tmp60_ = chrono_parse_result_get_recurrence (_tmp59_);
					_tmp61_ = _tmp60_;
					_tmp62_ = chrono_recurrence_rule_get_days_of_week (_tmp61_);
					_tmp63_ = _tmp62_;
					_day_list = _tmp63_;
					_tmp64_ = _day_list;
					_tmp65_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp64_);
					_tmp66_ = _tmp65_;
					_day_size = _tmp66_;
					_day_index = -1;
					while (TRUE) {
						gint _tmp67_;
						gint _tmp68_;
						gint day = 0;
						GeeArrayList* _tmp69_;
						gpointer _tmp70_;
						const gchar* _tmp71_;
						gchar* _tmp72_;
						gchar* _tmp73_;
						gchar* _tmp74_;
						gchar* _tmp75_;
						gchar* _tmp76_;
						_day_index = _day_index + 1;
						_tmp67_ = _day_index;
						_tmp68_ = _day_size;
						if (!(_tmp67_ < _tmp68_)) {
							break;
						}
						_tmp69_ = _day_list;
						_tmp70_ = gee_abstract_list_get ((GeeAbstractList*) _tmp69_, _day_index);
						day = (gint) ((gintptr) _tmp70_);
						_tmp71_ = weeks;
						_tmp72_ = g_strdup_printf ("%i", day);
						_tmp73_ = _tmp72_;
						_tmp74_ = g_strconcat (_tmp73_, ",", NULL);
						_tmp75_ = _tmp74_;
						_tmp76_ = g_strconcat (_tmp71_, _tmp75_, NULL);
						_g_free0 (weeks);
						weeks = _tmp76_;
						_g_free0 (_tmp75_);
						_g_free0 (_tmp73_);
					}
				}
				_tmp77_ = parsed_duedate;
				_tmp78_ = weeks;
				_tmp79_ = weeks;
				_tmp80_ = strlen (_tmp79_);
				_tmp81_ = _tmp80_;
				_tmp82_ = string_substring (_tmp78_, (glong) 0, (glong) (_tmp81_ - 1));
				_tmp83_ = _tmp82_;
				objects_due_date_set_recurrency_weeks (_tmp77_, _tmp83_);
				_g_free0 (_tmp83_);
				_g_free0 (weeks);
			}
		}
		_tmp84_ = parsed_duedate;
		_tmp85_ = _g_object_ref0 (_tmp84_);
		_g_object_unref0 (_data30_->last_parsed_duedate);
		_data30_->last_parsed_duedate = _tmp85_;
		_tmp86_ = parsed_duedate;
		_tmp87_ = widgets_date_time_picker_date_time_picker_suggested_date_new (_tmp86_);
		g_object_ref_sink (_tmp87_);
		suggested_date = _tmp87_;
		_tmp88_ = _data30_->suggested_date_box;
		_tmp89_ = suggested_date;
		adw_wrap_box_append (_tmp88_, (GtkWidget*) _tmp89_);
		_tmp90_ = suggested_date;
		widgets_date_time_picker_date_time_picker_connect_suggested_date (self, _tmp90_);
		_g_object_unref0 (suggested_date);
		_g_object_unref0 (parsed_duedate);
	} else {
		_g_object_unref0 (_data30_->last_parsed_duedate);
		_data30_->last_parsed_duedate = NULL;
	}
	result = G_SOURCE_REMOVE;
	_g_object_unref0 (_result_);
	_g_free0 (text);
	return result;
}

static gboolean
___lambda213__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda213_ (self);
	return result;
}

static void
_widgets_date_time_picker_date_time_picker___lambda212_ (Block30Data* _data30_)
{
	WidgetsDateTimePickerDateTimePicker* self;
	self = _data30_->self;
	if (self->priv->search_timeout_id != ((guint) 0)) {
		g_source_remove (self->priv->search_timeout_id);
	}
	self->priv->search_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 300, ___lambda213__gsource_func, block30_data_ref (_data30_), block30_data_unref);
}

static void
__widgets_date_time_picker_date_time_picker___lambda212__gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                                                          gpointer self)
{
	_widgets_date_time_picker_date_time_picker___lambda212_ (self);
}

static void
_widgets_date_time_picker_date_time_picker___lambda214_ (WidgetsDateTimePickerDateTimePicker* self)
{
	WidgetsCalendarCalendarMonth* _tmp0_;
	GDateTime* _tmp1_;
	GDateTime* _tmp2_;
	_tmp0_ = self->priv->calendar_view;
	_tmp1_ = widgets_calendar_calendar_month_get_date (_tmp0_);
	_tmp2_ = _tmp1_;
	widgets_date_time_picker_date_time_picker_set_date (self, _tmp2_, TRUE, FALSE);
	widgets_date_time_picker_date_time_picker_set_visible_no_date (self, TRUE);
}

static void
__widgets_date_time_picker_date_time_picker___lambda214__widgets_calendar_calendar_month_day_selected (WidgetsCalendarCalendarMonth* _sender,
                                                                                                       gpointer self)
{
	_widgets_date_time_picker_date_time_picker___lambda214_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static gboolean
__lambda216_ (WidgetsDateTimePickerDateTimePicker* self)
{
	WidgetsCalendarCalendarScroll* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->calendar_scroll_view;
	widgets_calendar_calendar_scroll_scroll_to_selected_date (_tmp0_);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda216__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda216_ ((WidgetsDateTimePickerDateTimePicker*) self);
	return result;
}

static void
_widgets_date_time_picker_date_time_picker___lambda215_ (WidgetsDateTimePickerDateTimePicker* self)
{
	GtkStack* _tmp0_;
	GtkStack* _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	_tmp0_ = self->priv->main_stack;
	gtk_stack_set_visible_child_name (_tmp0_, "calendar");
	_tmp1_ = self->priv->main_stack;
	_tmp2_ = gtk_stack_get_transition_duration (_tmp1_);
	_tmp3_ = _tmp2_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp3_ + 50, ___lambda216__gsource_func, g_object_ref (self), g_object_unref);
}

static void
__widgets_date_time_picker_date_time_picker___lambda215__widgets_calendar_calendar_month_choose_date_clicked (WidgetsCalendarCalendarMonth* _sender,
                                                                                                              gpointer self)
{
	_widgets_date_time_picker_date_time_picker___lambda215_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
_widgets_date_time_picker_date_time_picker___lambda217_ (WidgetsDateTimePickerDateTimePicker* self)
{
	GtkRevealer* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GtkRevealer* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	GtkStack* _tmp8_;
	_tmp0_ = self->priv->time_option_revealer;
	_tmp1_ = gtk_revealer_get_reveal_child (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkRevealer* _tmp3_;
		_tmp3_ = self->priv->time_option_revealer;
		gtk_revealer_set_reveal_child (_tmp3_, FALSE);
	}
	_tmp4_ = self->priv->repeat_option_revealer;
	_tmp5_ = gtk_revealer_get_reveal_child (_tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_) {
		GtkRevealer* _tmp7_;
		_tmp7_ = self->priv->repeat_option_revealer;
		gtk_revealer_set_reveal_child (_tmp7_, FALSE);
	}
	_tmp8_ = self->priv->main_stack;
	gtk_stack_set_visible_child_name (_tmp8_, "main");
}

static void
__widgets_date_time_picker_date_time_picker___lambda217__gtk_widget_hide (GtkWidget* _sender,
                                                                          gpointer self)
{
	_widgets_date_time_picker_date_time_picker___lambda217_ ((WidgetsDateTimePickerDateTimePicker*) self);
}

static void
_widgets_date_time_picker_date_time_picker___lambda218_ (WidgetsDateTimePickerDateTimePicker* self,
                                                         gint n_press,
                                                         gdouble x,
                                                         gdouble y)
{
	widgets_date_time_picker_date_time_picker_hide_all_revealers (self);
}

static void
__widgets_date_time_picker_date_time_picker___lambda218__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                                    gint n_press,
                                                                                    gdouble x,
                                                                                    gdouble y,
                                                                                    gpointer self)
{
	_widgets_date_time_picker_date_time_picker___lambda218_ ((WidgetsDateTimePickerDateTimePicker*) self, n_press, x, y);
}

static GObject *
widgets_date_time_picker_date_time_picker_constructor (GType type,
                                                       guint n_construct_properties,
                                                       GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	WidgetsDateTimePickerDateTimePicker * self;
	Block30Data* _data30_;
	ChronoCore* _tmp0_;
	GeeArrayList* _tmp1_;
	gchar* _tmp2_;
	GtkSearchEntry* _tmp3_ = NULL;
	AdwWrapBox* _tmp4_ = NULL;
	GtkEventControllerKey* search_key_controller = NULL;
	GtkEventControllerKey* _tmp5_;
	GtkSearchEntry* _tmp6_;
	GtkEventControllerKey* _tmp7_;
	GtkEventController* _tmp8_;
	GtkEventControllerKey* _tmp9_;
	WidgetsCalendarCalendarMonth* _tmp10_;
	WidgetsDateTimePickerDateTimePickerOptionButton* _tmp11_;
	WidgetsDateTimePickerDateTimePickerOptionButton* _tmp12_;
	GtkBox* content_box = NULL;
	GtkBox* _tmp13_ = NULL;
	GtkBox* _tmp14_;
	AdwWrapBox* _tmp15_;
	GtkBox* _tmp16_;
	WidgetsContextMenuMenuSeparator* _tmp17_;
	WidgetsContextMenuMenuSeparator* _tmp18_;
	GtkBox* _tmp19_;
	WidgetsCalendarCalendarMonth* _tmp20_;
	GtkBox* _tmp21_;
	WidgetsContextMenuMenuSeparator* _tmp22_;
	WidgetsContextMenuMenuSeparator* _tmp23_;
	GtkBox* _tmp24_;
	WidgetsDateTimePickerDateTimePickerOptionButton* _tmp25_;
	GtkBox* _tmp26_;
	WidgetsDateTimePickerDateTimePickerOptionButton* _tmp27_;
	GtkScrolledWindow* popover_scrolled = NULL;
	GtkBox* _tmp28_;
	GtkWidget* _tmp29_;
	GtkScrolledWindow* _tmp30_ = NULL;
	GtkBox* search_box = NULL;
	GtkBox* _tmp31_ = NULL;
	GtkBox* _tmp32_;
	GtkSearchEntry* _tmp33_;
	AdwToolbarView* toolbar_view = NULL;
	GtkScrolledWindow* _tmp34_;
	GtkWidget* _tmp35_;
	AdwToolbarView* _tmp36_ = NULL;
	AdwToolbarView* _tmp37_;
	GtkBox* _tmp38_;
	AdwBin* _tmp39_ = NULL;
	AdwBin* _tmp40_;
	AdwToolbarView* _tmp41_;
	GtkWidget* _tmp42_;
	GtkOverlay* _tmp43_ = NULL;
	GtkOverlay* _tmp44_;
	AdwBin* _tmp45_;
	GtkStack* _tmp46_ = NULL;
	GtkStack* _tmp47_;
	GtkOverlay* _tmp48_;
	GtkStack* _tmp49_;
	GtkWidget* _tmp50_;
	GtkWidget* _tmp51_;
	WidgetsDateTimePickerRepeatConfig* _tmp52_;
	GtkStack* _tmp53_;
	WidgetsDateTimePickerRepeatConfig* _tmp54_;
	GtkWidget* _tmp55_;
	GtkWidget* _tmp56_;
	GtkStack* _tmp57_;
	WidgetsDateTimePickerDateTimePickerOptionButton* _tmp58_;
	WidgetsDateTimePickerDateTimePickerOptionButton* _tmp59_;
	WidgetsDateTimePickerDateTimePickerOptionButton* _tmp60_;
	WidgetsDateTimePickerDateTimePickerOptionButton* _tmp61_;
	GtkSearchEntry* _tmp62_;
	GtkSearchEntry* _tmp63_;
	GeeHashMap* _tmp64_;
	WidgetsCalendarCalendarMonth* _tmp65_;
	gulong _tmp66_;
	WidgetsCalendarCalendarMonth* _tmp67_;
	WidgetsCalendarCalendarMonth* _tmp68_;
	GtkGestureClick* gesture = NULL;
	GtkGestureClick* _tmp69_;
	AdwBin* _tmp70_;
	GtkGestureClick* _tmp71_;
	GtkEventController* _tmp72_;
	GtkGestureClick* _tmp73_;
	parent_class = G_OBJECT_CLASS (widgets_date_time_picker_date_time_picker_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_DATE_TIME_PICKER_TYPE_DATE_TIME_PICKER, WidgetsDateTimePickerDateTimePicker);
	_data30_ = g_slice_new0 (Block30Data);
	_data30_->_ref_count_ = 1;
	_data30_->self = g_object_ref (self);
	_tmp0_ = chrono_core_new ("en");
	_g_object_unref0 (self->priv->chrono);
	self->priv->chrono = _tmp0_;
	_tmp1_ = gee_array_list_new (gtk_revealer_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->active_revealers);
	self->priv->active_revealers = _tmp1_;
	_data30_->last_parsed_duedate = NULL;
	_tmp2_ = g_strdup (_ ("Type a date…"));
	_tmp3_ = (GtkSearchEntry*) gtk_search_entry_new ();
	g_object_set (_tmp3_, "placeholder-text", _tmp2_, NULL);
	_g_free0 (_tmp2_);
	g_object_ref_sink (_tmp3_);
	_data30_->search_entry = _tmp3_;
	_tmp4_ = (AdwWrapBox*) adw_wrap_box_new ();
	adw_wrap_box_set_child_spacing (_tmp4_, 6);
	adw_wrap_box_set_line_spacing (_tmp4_, 6);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp4_, 6);
	g_object_ref_sink (_tmp4_);
	_data30_->suggested_date_box = _tmp4_;
	g_signal_connect_data ((GtkWidget*) self, "show", (GCallback) __widgets_date_time_picker_date_time_picker___lambda203__gtk_widget_show, block30_data_ref (_data30_), (GClosureNotify) block30_data_unref, 0);
	_tmp5_ = (GtkEventControllerKey*) gtk_event_controller_key_new ();
	search_key_controller = _tmp5_;
	_tmp6_ = _data30_->search_entry;
	_tmp7_ = search_key_controller;
	_tmp8_ = _g_object_ref0 ((GtkEventController*) _tmp7_);
	gtk_widget_add_controller ((GtkWidget*) _tmp6_, _tmp8_);
	_tmp9_ = search_key_controller;
	g_signal_connect_object (_tmp9_, "key-pressed", (GCallback) __widgets_date_time_picker_date_time_picker___lambda205__gtk_event_controller_key_key_pressed, self, 0);
	_tmp10_ = widgets_calendar_calendar_month_new ();
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->calendar_view);
	self->priv->calendar_view = _tmp10_;
	_tmp11_ = widgets_date_time_picker_date_time_picker_option_button_new ("clock-symbolic", _ ("Time"));
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->time_option_button);
	self->priv->time_option_button = _tmp11_;
	_tmp12_ = widgets_date_time_picker_date_time_picker_option_button_new ("playlist-repeat-symbolic", _ ("Repeat"));
	g_object_ref_sink (_tmp12_);
	_g_object_unref0 (self->priv->repeat_option_button);
	self->priv->repeat_option_button = _tmp12_;
	_tmp13_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp13_, 9);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp13_, 9);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp13_, 9);
	g_object_ref_sink (_tmp13_);
	content_box = _tmp13_;
	_tmp14_ = content_box;
	_tmp15_ = _data30_->suggested_date_box;
	gtk_box_append (_tmp14_, (GtkWidget*) _tmp15_);
	_tmp16_ = content_box;
	_tmp17_ = widgets_context_menu_menu_separator_new ();
	g_object_ref_sink (_tmp17_);
	_tmp18_ = _tmp17_;
	gtk_box_append (_tmp16_, (GtkWidget*) _tmp18_);
	_g_object_unref0 (_tmp18_);
	_tmp19_ = content_box;
	_tmp20_ = self->priv->calendar_view;
	gtk_box_append (_tmp19_, (GtkWidget*) _tmp20_);
	_tmp21_ = content_box;
	_tmp22_ = widgets_context_menu_menu_separator_new ();
	g_object_ref_sink (_tmp22_);
	_tmp23_ = _tmp22_;
	gtk_box_append (_tmp21_, (GtkWidget*) _tmp23_);
	_g_object_unref0 (_tmp23_);
	_tmp24_ = content_box;
	_tmp25_ = self->priv->time_option_button;
	gtk_box_append (_tmp24_, (GtkWidget*) _tmp25_);
	_tmp26_ = content_box;
	_tmp27_ = self->priv->repeat_option_button;
	gtk_box_append (_tmp26_, (GtkWidget*) _tmp27_);
	_tmp28_ = content_box;
	_tmp29_ = _g_object_ref0 ((GtkWidget*) _tmp28_);
	_tmp30_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	gtk_scrolled_window_set_child (_tmp30_, _tmp29_);
	_g_object_unref0 (_tmp29_);
	g_object_set (_tmp30_, "vscrollbar-policy", GTK_POLICY_AUTOMATIC, NULL);
	g_object_set (_tmp30_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	gtk_scrolled_window_set_propagate_natural_height (_tmp30_, TRUE);
	gtk_scrolled_window_set_max_content_height (_tmp30_, 425);
	g_object_ref_sink (_tmp30_);
	popover_scrolled = _tmp30_;
	_tmp31_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp31_, 9);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp31_, 9);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp31_, 9);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp31_, 9);
	g_object_ref_sink (_tmp31_);
	search_box = _tmp31_;
	_tmp32_ = search_box;
	_tmp33_ = _data30_->search_entry;
	gtk_box_append (_tmp32_, (GtkWidget*) _tmp33_);
	_tmp34_ = popover_scrolled;
	_tmp35_ = _g_object_ref0 ((GtkWidget*) _tmp34_);
	_tmp36_ = (AdwToolbarView*) adw_toolbar_view_new ();
	adw_toolbar_view_set_content (_tmp36_, _tmp35_);
	_g_object_unref0 (_tmp35_);
	g_object_ref_sink (_tmp36_);
	toolbar_view = _tmp36_;
	_tmp37_ = toolbar_view;
	_tmp38_ = search_box;
	adw_toolbar_view_add_top_bar (_tmp37_, (GtkWidget*) _tmp38_);
	_tmp39_ = (AdwBin*) adw_bin_new ();
	gtk_widget_set_visible ((GtkWidget*) _tmp39_, FALSE);
	g_object_ref_sink (_tmp39_);
	_g_object_unref0 (self->priv->dimming_widget);
	self->priv->dimming_widget = _tmp39_;
	_tmp40_ = self->priv->dimming_widget;
	gtk_widget_add_css_class ((GtkWidget*) _tmp40_, "dimming-bg");
	_tmp41_ = toolbar_view;
	_tmp42_ = _g_object_ref0 ((GtkWidget*) _tmp41_);
	_tmp43_ = (GtkOverlay*) gtk_overlay_new ();
	gtk_overlay_set_child (_tmp43_, _tmp42_);
	_g_object_unref0 (_tmp42_);
	g_object_ref_sink (_tmp43_);
	_g_object_unref0 (self->priv->main_overlay);
	self->priv->main_overlay = _tmp43_;
	_tmp44_ = self->priv->main_overlay;
	_tmp45_ = self->priv->dimming_widget;
	gtk_overlay_add_overlay (_tmp44_, (GtkWidget*) _tmp45_);
	widgets_date_time_picker_date_time_picker_build_time_picker_revealer (self);
	widgets_date_time_picker_date_time_picker_build_repeat_picker_revealer (self);
	_tmp46_ = (GtkStack*) gtk_stack_new ();
	gtk_stack_set_transition_type (_tmp46_, GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT);
	g_object_ref_sink (_tmp46_);
	_g_object_unref0 (self->priv->main_stack);
	self->priv->main_stack = _tmp46_;
	_tmp47_ = self->priv->main_stack;
	_tmp48_ = self->priv->main_overlay;
	gtk_stack_add_named (_tmp47_, (GtkWidget*) _tmp48_, "main");
	_tmp49_ = self->priv->main_stack;
	_tmp50_ = widgets_date_time_picker_date_time_picker_build_calendar_page (self);
	_tmp51_ = _tmp50_;
	gtk_stack_add_named (_tmp49_, _tmp51_, "calendar");
	_g_object_unref0 (_tmp51_);
	_tmp52_ = widgets_date_time_picker_repeat_config_new ();
	g_object_ref_sink (_tmp52_);
	_g_object_unref0 (self->priv->repeat_config_widget);
	self->priv->repeat_config_widget = _tmp52_;
	_tmp53_ = self->priv->main_stack;
	_tmp54_ = self->priv->repeat_config_widget;
	_tmp55_ = widgets_date_time_picker_date_time_picker_build_repeat_config_page (self, _tmp54_);
	_tmp56_ = _tmp55_;
	gtk_stack_add_named (_tmp53_, _tmp56_, "repeat-config");
	_g_object_unref0 (_tmp56_);
	_tmp57_ = self->priv->main_stack;
	gtk_popover_set_child ((GtkPopover*) self, (GtkWidget*) _tmp57_);
	gtk_widget_add_css_class ((GtkWidget*) self, "popover-contents");
	_tmp58_ = self->priv->time_option_button;
	g_signal_connect_object (_tmp58_, "clicked", (GCallback) __widgets_date_time_picker_date_time_picker___lambda206__widgets_date_time_picker_date_time_picker_option_button_clicked, self, 0);
	_tmp59_ = self->priv->time_option_button;
	g_signal_connect_object (_tmp59_, "clear-clicked", (GCallback) __widgets_date_time_picker_date_time_picker___lambda207__widgets_date_time_picker_date_time_picker_option_button_clear_clicked, self, 0);
	_tmp60_ = self->priv->repeat_option_button;
	g_signal_connect_object (_tmp60_, "clicked", (GCallback) __widgets_date_time_picker_date_time_picker___lambda208__widgets_date_time_picker_date_time_picker_option_button_clicked, self, 0);
	_tmp61_ = self->priv->repeat_option_button;
	g_signal_connect_object (_tmp61_, "clear-clicked", (GCallback) __widgets_date_time_picker_date_time_picker___lambda209__widgets_date_time_picker_date_time_picker_option_button_clear_clicked, self, 0);
	g_signal_connect_object ((GtkPopover*) self, "closed", (GCallback) __widgets_date_time_picker_date_time_picker___lambda210__gtk_popover_closed, self, 0);
	_tmp62_ = _data30_->search_entry;
	g_signal_connect_data (_tmp62_, "activate", (GCallback) __widgets_date_time_picker_date_time_picker___lambda211__gtk_search_entry_activate, block30_data_ref (_data30_), (GClosureNotify) block30_data_unref, 0);
	_tmp63_ = _data30_->search_entry;
	g_signal_connect_data (_tmp63_, "search-changed", (GCallback) __widgets_date_time_picker_date_time_picker___lambda212__gtk_search_entry_search_changed, block30_data_ref (_data30_), (GClosureNotify) block30_data_unref, 0);
	_tmp64_ = self->priv->signal_map;
	_tmp65_ = self->priv->calendar_view;
	_tmp66_ = g_signal_connect_object (_tmp65_, "day-selected", (GCallback) __widgets_date_time_picker_date_time_picker___lambda214__widgets_calendar_calendar_month_day_selected, self, 0);
	_tmp67_ = self->priv->calendar_view;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp64_, (gpointer) ((guintptr) _tmp66_), (GObject*) _tmp67_);
	_tmp68_ = self->priv->calendar_view;
	g_signal_connect_object (_tmp68_, "choose-date-clicked", (GCallback) __widgets_date_time_picker_date_time_picker___lambda215__widgets_calendar_calendar_month_choose_date_clicked, self, 0);
	g_signal_connect_object ((GtkWidget*) self, "hide", (GCallback) __widgets_date_time_picker_date_time_picker___lambda217__gtk_widget_hide, self, 0);
	_tmp69_ = (GtkGestureClick*) gtk_gesture_click_new ();
	gesture = _tmp69_;
	_tmp70_ = self->priv->dimming_widget;
	_tmp71_ = gesture;
	_tmp72_ = _g_object_ref0 ((GtkEventController*) _tmp71_);
	gtk_widget_add_controller ((GtkWidget*) _tmp70_, _tmp72_);
	_tmp73_ = gesture;
	g_signal_connect_object (_tmp73_, "pressed", (GCallback) __widgets_date_time_picker_date_time_picker___lambda218__gtk_gesture_click_pressed, self, 0);
	_g_object_unref0 (gesture);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (search_box);
	_g_object_unref0 (popover_scrolled);
	_g_object_unref0 (content_box);
	_g_object_unref0 (search_key_controller);
	block30_data_unref (_data30_);
	_data30_ = NULL;
	return obj;
}

static void
widgets_date_time_picker_date_time_picker_class_init (WidgetsDateTimePickerDateTimePickerClass * klass,
                                                      gpointer klass_data)
{
	widgets_date_time_picker_date_time_picker_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WidgetsDateTimePickerDateTimePicker_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_widgets_date_time_picker_date_time_picker_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_widgets_date_time_picker_date_time_picker_set_property;
	G_OBJECT_CLASS (klass)->constructor = widgets_date_time_picker_date_time_picker_constructor;
	G_OBJECT_CLASS (klass)->finalize = widgets_date_time_picker_date_time_picker_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_HAS_TIME_PROPERTY, widgets_date_time_picker_date_time_picker_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_HAS_TIME_PROPERTY] = g_param_spec_boolean ("has-time", "has-time", "has-time", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_HAS_RECURRENCY_PROPERTY, widgets_date_time_picker_date_time_picker_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_HAS_RECURRENCY_PROPERTY] = g_param_spec_boolean ("has-recurrency", "has-recurrency", "has-recurrency", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_DUEDATE_PROPERTY, widgets_date_time_picker_date_time_picker_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_DUEDATE_PROPERTY] = g_param_spec_object ("duedate", "duedate", "duedate", OBJECTS_TYPE_DUE_DATE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_VISIBLE_NO_DATE_PROPERTY, widgets_date_time_picker_date_time_picker_properties[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_VISIBLE_NO_DATE_PROPERTY] = g_param_spec_boolean ("visible-no-date", "visible-no-date", "visible-no-date", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	widgets_date_time_picker_date_time_picker_signals[WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_DUEDATE_CHANGED_SIGNAL] = g_signal_new ("duedate-changed", WIDGETS_DATE_TIME_PICKER_TYPE_DATE_TIME_PICKER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
widgets_date_time_picker_date_time_picker_instance_init (WidgetsDateTimePickerDateTimePicker * self,
                                                         gpointer klass)
{
	ObjectsDueDate* _tmp0_;
	GeeHashMap* _tmp1_;
	self->priv = widgets_date_time_picker_date_time_picker_get_instance_private (self);
	self->priv->_has_time = FALSE;
	self->priv->_has_recurrency = FALSE;
	_tmp0_ = objects_due_date_new ();
	self->priv->_duedate = _tmp0_;
	_tmp1_ = gee_hash_map_new (G_TYPE_ULONG, NULL, NULL, G_TYPE_OBJECT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->signal_map = _tmp1_;
	self->priv->search_timeout_id = (guint) 0;
}

static void
widgets_date_time_picker_date_time_picker_finalize (GObject * obj)
{
	WidgetsDateTimePickerDateTimePicker * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_DATE_TIME_PICKER_TYPE_DATE_TIME_PICKER, WidgetsDateTimePickerDateTimePicker);
	g_debug ("DateTimePicker.vala:151: Destroying - Widgets.DateTimePicker.DateTimeP" \
"icker\n");
	_g_object_unref0 (self->priv->time_picker);
	_g_object_unref0 (self->priv->calendar_view);
	_g_object_unref0 (self->priv->calendar_scroll_view);
	_g_object_unref0 (self->priv->no_date_button);
	_g_object_unref0 (self->priv->time_option_button);
	_g_object_unref0 (self->priv->repeat_option_button);
	_g_object_unref0 (self->priv->time_option_revealer);
	_g_object_unref0 (self->priv->dimming_widget);
	_g_object_unref0 (self->priv->main_overlay);
	_g_object_unref0 (self->priv->active_revealers);
	_g_object_unref0 (self->priv->repeat_option_revealer);
	_g_object_unref0 (self->priv->main_stack);
	_g_object_unref0 (self->priv->repeat_config_widget);
	_g_object_unref0 (self->priv->_duedate);
	_g_object_unref0 (self->priv->signal_map);
	_g_object_unref0 (self->priv->chrono);
	G_OBJECT_CLASS (widgets_date_time_picker_date_time_picker_parent_class)->finalize (obj);
}

static GType
widgets_date_time_picker_date_time_picker_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsDateTimePickerDateTimePickerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_date_time_picker_date_time_picker_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsDateTimePickerDateTimePicker), 0, (GInstanceInitFunc) widgets_date_time_picker_date_time_picker_instance_init, NULL };
	GType widgets_date_time_picker_date_time_picker_type_id;
	widgets_date_time_picker_date_time_picker_type_id = g_type_register_static (gtk_popover_get_type (), "WidgetsDateTimePickerDateTimePicker", &g_define_type_info, 0);
	WidgetsDateTimePickerDateTimePicker_private_offset = g_type_add_instance_private (widgets_date_time_picker_date_time_picker_type_id, sizeof (WidgetsDateTimePickerDateTimePickerPrivate));
	return widgets_date_time_picker_date_time_picker_type_id;
}

GType
widgets_date_time_picker_date_time_picker_get_type (void)
{
	static volatile gsize widgets_date_time_picker_date_time_picker_type_id__once = 0;
	if (g_once_init_enter (&widgets_date_time_picker_date_time_picker_type_id__once)) {
		GType widgets_date_time_picker_date_time_picker_type_id;
		widgets_date_time_picker_date_time_picker_type_id = widgets_date_time_picker_date_time_picker_get_type_once ();
		g_once_init_leave (&widgets_date_time_picker_date_time_picker_type_id__once, widgets_date_time_picker_date_time_picker_type_id);
	}
	return widgets_date_time_picker_date_time_picker_type_id__once;
}

static void
_vala_widgets_date_time_picker_date_time_picker_get_property (GObject * object,
                                                              guint property_id,
                                                              GValue * value,
                                                              GParamSpec * pspec)
{
	WidgetsDateTimePickerDateTimePicker * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_DATE_TIME_PICKER_TYPE_DATE_TIME_PICKER, WidgetsDateTimePickerDateTimePicker);
	switch (property_id) {
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_HAS_TIME_PROPERTY:
		g_value_set_boolean (value, widgets_date_time_picker_date_time_picker_get_has_time (self));
		break;
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_HAS_RECURRENCY_PROPERTY:
		g_value_set_boolean (value, widgets_date_time_picker_date_time_picker_get_has_recurrency (self));
		break;
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_DUEDATE_PROPERTY:
		g_value_set_object (value, widgets_date_time_picker_date_time_picker_get_duedate (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_widgets_date_time_picker_date_time_picker_set_property (GObject * object,
                                                              guint property_id,
                                                              const GValue * value,
                                                              GParamSpec * pspec)
{
	WidgetsDateTimePickerDateTimePicker * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_DATE_TIME_PICKER_TYPE_DATE_TIME_PICKER, WidgetsDateTimePickerDateTimePicker);
	switch (property_id) {
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_HAS_TIME_PROPERTY:
		widgets_date_time_picker_date_time_picker_set_has_time (self, g_value_get_boolean (value));
		break;
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_HAS_RECURRENCY_PROPERTY:
		widgets_date_time_picker_date_time_picker_set_has_recurrency (self, g_value_get_boolean (value));
		break;
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_DUEDATE_PROPERTY:
		widgets_date_time_picker_date_time_picker_set_duedate (self, g_value_get_object (value));
		break;
		case WIDGETS_DATE_TIME_PICKER_DATE_TIME_PICKER_VISIBLE_NO_DATE_PROPERTY:
		widgets_date_time_picker_date_time_picker_set_visible_no_date (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

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;
}

