/* Label.c generated by valac 0.56.19, the Vala compiler
 * generated from Label.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 <adwaita.h>
#include <glib-object.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gtk/gtk.h>
#include "planify.h"
#include <pango/pango.h>
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>

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

#define VIEWS_TYPE_LABEL (views_label_get_type ())
#define VIEWS_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIEWS_TYPE_LABEL, ViewsLabel))
#define VIEWS_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIEWS_TYPE_LABEL, ViewsLabelClass))
#define VIEWS_IS_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIEWS_TYPE_LABEL))
#define VIEWS_IS_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIEWS_TYPE_LABEL))
#define VIEWS_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIEWS_TYPE_LABEL, ViewsLabelClass))

typedef struct _ViewsLabel ViewsLabel;
typedef struct _ViewsLabelClass ViewsLabelClass;
typedef struct _ViewsLabelPrivate ViewsLabelPrivate;

#define LAYOUTS_TYPE_ITEM_BASE (layouts_item_base_get_type ())
#define LAYOUTS_ITEM_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_ITEM_BASE, LayoutsItemBase))
#define LAYOUTS_ITEM_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_ITEM_BASE, LayoutsItemBaseClass))
#define LAYOUTS_IS_ITEM_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_ITEM_BASE))
#define LAYOUTS_IS_ITEM_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_ITEM_BASE))
#define LAYOUTS_ITEM_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_ITEM_BASE, LayoutsItemBaseClass))

typedef struct _LayoutsItemBase LayoutsItemBase;
typedef struct _LayoutsItemBaseClass LayoutsItemBaseClass;

#define LAYOUTS_TYPE_ITEM_ROW (layouts_item_row_get_type ())
#define LAYOUTS_ITEM_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow))
#define LAYOUTS_ITEM_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRowClass))
#define LAYOUTS_IS_ITEM_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_ITEM_ROW))
#define LAYOUTS_IS_ITEM_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_ITEM_ROW))
#define LAYOUTS_ITEM_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRowClass))

typedef struct _LayoutsItemRow LayoutsItemRow;
typedef struct _LayoutsItemRowClass LayoutsItemRowClass;

#define LAYOUTS_TYPE_HEADER_BAR (layouts_header_bar_get_type ())
#define LAYOUTS_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_HEADER_BAR, LayoutsHeaderBar))
#define LAYOUTS_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_HEADER_BAR, LayoutsHeaderBarClass))
#define LAYOUTS_IS_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_HEADER_BAR))
#define LAYOUTS_IS_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_HEADER_BAR))
#define LAYOUTS_HEADER_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_HEADER_BAR, LayoutsHeaderBarClass))

typedef struct _LayoutsHeaderBar LayoutsHeaderBar;
typedef struct _LayoutsHeaderBarClass LayoutsHeaderBarClass;
enum  {
	VIEWS_LABEL_0_PROPERTY,
	VIEWS_LABEL_LABEL_PROPERTY,
	VIEWS_LABEL_NUM_PROPERTIES
};
static GParamSpec* views_label_properties[VIEWS_LABEL_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 DIALOGS_TYPE_QUICK_ADD (dialogs_quick_add_get_type ())
#define DIALOGS_QUICK_ADD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_TYPE_QUICK_ADD, DialogsQuickAdd))
#define DIALOGS_QUICK_ADD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_TYPE_QUICK_ADD, DialogsQuickAddClass))
#define DIALOGS_IS_QUICK_ADD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_TYPE_QUICK_ADD))
#define DIALOGS_IS_QUICK_ADD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_TYPE_QUICK_ADD))
#define DIALOGS_QUICK_ADD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_TYPE_QUICK_ADD, DialogsQuickAddClass))

typedef struct _DialogsQuickAdd DialogsQuickAdd;
typedef struct _DialogsQuickAddClass DialogsQuickAddClass;

#define TYPE_PLANIFY (planify_get_type ())
#define PLANIFY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PLANIFY, Planify))
#define PLANIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PLANIFY, PlanifyClass))
#define IS_PLANIFY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PLANIFY))
#define IS_PLANIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PLANIFY))
#define PLANIFY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PLANIFY, PlanifyClass))

typedef struct _Planify Planify;
typedef struct _PlanifyClass PlanifyClass;
typedef struct _PlanifyPrivate PlanifyPrivate;

#define TYPE_MAIN_WINDOW (main_window_get_type ())
#define MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAIN_WINDOW, MainWindow))
#define MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAIN_WINDOW, MainWindowClass))
#define IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAIN_WINDOW))
#define IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAIN_WINDOW))
#define MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAIN_WINDOW, MainWindowClass))

typedef struct _MainWindow MainWindow;
typedef struct _MainWindowClass MainWindowClass;
typedef struct _Block71Data Block71Data;

#define WIDGETS_TYPE_MAGIC_BUTTON (widgets_magic_button_get_type ())
#define WIDGETS_MAGIC_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_MAGIC_BUTTON, WidgetsMagicButton))
#define WIDGETS_MAGIC_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_MAGIC_BUTTON, WidgetsMagicButtonClass))
#define WIDGETS_IS_MAGIC_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_MAGIC_BUTTON))
#define WIDGETS_IS_MAGIC_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_MAGIC_BUTTON))
#define WIDGETS_MAGIC_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_MAGIC_BUTTON, WidgetsMagicButtonClass))

typedef struct _WidgetsMagicButton WidgetsMagicButton;
typedef struct _WidgetsMagicButtonClass WidgetsMagicButtonClass;

struct _ViewsLabel {
	AdwBin parent_instance;
	ViewsLabelPrivate * priv;
	GeeHashMap* items;
};

struct _ViewsLabelClass {
	AdwBinClass parent_class;
};

struct _ViewsLabelPrivate {
	LayoutsHeaderBar* headerbar;
	GtkImage* title_icon;
	GtkLabel* title_label;
	GtkListBox* listbox;
	GtkStack* listbox_stack;
	GeeHashMap* signal_map;
	ObjectsLabel* _label;
};

struct _Planify {
	AdwApplication parent_instance;
	PlanifyPrivate * priv;
	MainWindow* main_window;
};

struct _PlanifyClass {
	AdwApplicationClass parent_class;
};

struct _Block71Data {
	int _ref_count_;
	ViewsLabel* self;
	GtkBox* title_box;
	GtkScrolledWindow* scrolled_window;
};

static gint ViewsLabel_private_offset;
static gpointer views_label_parent_class = NULL;
VALA_EXTERN Planify* planify__instance;

VALA_EXTERN GType views_label_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ViewsLabel, g_object_unref)
VALA_EXTERN GType layouts_item_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsItemBase, g_object_unref)
VALA_EXTERN GType layouts_item_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsItemRow, g_object_unref)
VALA_EXTERN GType layouts_header_bar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsHeaderBar, g_object_unref)
static void views_label_validate_placeholder (ViewsLabel* self);
static gboolean views_label_get_has_items (ViewsLabel* self);
static void views_label_valid_add_item (ViewsLabel* self,
                                 ObjectsItem* item,
                                 gboolean insert);
VALA_EXTERN ObjectsLabel* views_label_get_label (ViewsLabel* self);
static void views_label_add_item (ViewsLabel* self,
                           ObjectsItem* item);
static void views_label_valid_delete_item (ViewsLabel* self,
                                    ObjectsItem* item);
VALA_EXTERN void layouts_item_base_hide_destroy (LayoutsItemBase* self);
static void views_label_valid_update_item (ViewsLabel* self,
                                    ObjectsItem* item);
static void views_label_add_items (ViewsLabel* self);
VALA_EXTERN LayoutsItemRow* layouts_item_row_new (ObjectsItem* item,
                                      gboolean is_project_view);
VALA_EXTERN LayoutsItemRow* layouts_item_row_construct (GType object_type,
                                            ObjectsItem* item,
                                            gboolean is_project_view);
VALA_EXTERN void layouts_item_row_disable_drag_and_drop (LayoutsItemRow* self);
VALA_EXTERN void views_label_update_request (ViewsLabel* self);
VALA_EXTERN void layouts_header_bar_set_title (LayoutsHeaderBar* self,
                                   const gchar* value);
VALA_EXTERN void views_label_prepare_new_item (ViewsLabel* self,
                                   const gchar* content);
VALA_EXTERN GType dialogs_quick_add_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsQuickAdd, g_object_unref)
VALA_EXTERN DialogsQuickAdd* dialogs_quick_add_new (void);
VALA_EXTERN DialogsQuickAdd* dialogs_quick_add_construct (GType object_type);
VALA_EXTERN void dialogs_quick_add_update_content (DialogsQuickAdd* self,
                                       const gchar* content);
VALA_EXTERN void dialogs_quick_add_set_labels (DialogsQuickAdd* self,
                                   GeeHashMap* new_labels);
VALA_EXTERN GType planify_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Planify, g_object_unref)
VALA_EXTERN GType main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MainWindow, g_object_unref)
VALA_EXTERN void views_label_clean_up (ViewsLabel* self);
VALA_EXTERN void layouts_item_base_clean_up (LayoutsItemBase* self);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
VALA_EXTERN ViewsLabel* views_label_new (void);
VALA_EXTERN ViewsLabel* views_label_construct (GType object_type);
VALA_EXTERN void views_label_set_label (ViewsLabel* self,
                            ObjectsLabel* value);
static GObject * views_label_constructor (GType type,
                                   guint n_construct_properties,
                                   GObjectConstructParam * construct_properties);
static Block71Data* block71_data_ref (Block71Data* _data71_);
static void block71_data_unref (void * _userdata_);
VALA_EXTERN LayoutsHeaderBar* layouts_header_bar_new (void);
VALA_EXTERN LayoutsHeaderBar* layouts_header_bar_construct (GType object_type);
VALA_EXTERN void layouts_header_bar_set_back_revealer (LayoutsHeaderBar* self,
                                           gboolean value);
VALA_EXTERN GType widgets_magic_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsMagicButton, g_object_unref)
VALA_EXTERN WidgetsMagicButton* widgets_magic_button_new (void);
VALA_EXTERN WidgetsMagicButton* widgets_magic_button_construct (GType object_type);
static gboolean _views_label___lambda870_ (ViewsLabel* self);
static gboolean __views_label___lambda870__gsource_func (gpointer self);
static void _views_label_valid_add_item_services_store_item_added (ServicesStore* _sender,
                                                            ObjectsItem* item,
                                                            gboolean insert,
                                                            gpointer self);
static void _views_label_valid_delete_item_services_store_item_deleted (ServicesStore* _sender,
                                                                 ObjectsItem* item,
                                                                 gpointer self);
static void _views_label_valid_update_item_services_store_item_updated (ServicesStore* _sender,
                                                                 ObjectsItem* item,
                                                                 const gchar* update_id,
                                                                 gpointer self);
static void _views_label_valid_delete_item_services_store_item_archived (ServicesStore* _sender,
                                                                  ObjectsItem* item,
                                                                  gpointer self);
static void _views_label___lambda871_ (ViewsLabel* self,
                                ObjectsItem* item);
static void __views_label___lambda871__services_store_item_unarchived (ServicesStore* _sender,
                                                                ObjectsItem* item,
                                                                gpointer self);
static void _views_label___lambda872_ (ViewsLabel* self);
static void __views_label___lambda872__layouts_header_bar_back_activated (LayoutsHeaderBar* _sender,
                                                                   gpointer self);
static void _views_label___lambda873_ (Block71Data* _data71_);
VALA_EXTERN void layouts_header_bar_revealer_title_box (LayoutsHeaderBar* self,
                                            gboolean reveal);
static void __views_label___lambda873__gtk_adjustment_value_changed (GtkAdjustment* _sender,
                                                              gpointer self);
static void _views_label___lambda874_ (ViewsLabel* self);
static void __views_label___lambda874__widgets_magic_button_clicked (WidgetsMagicButton* _sender,
                                                              gpointer self);
static void _views_label___lambda875_ (Block71Data* _data71_,
                                gboolean active,
                                const gchar* focused_item_id);
static void __views_label___lambda875__services_event_bus_dim_content (ServicesEventBus* _sender,
                                                                gboolean active,
                                                                const gchar* focused_item_id,
                                                                gpointer self);
static void views_label_finalize (GObject * obj);
static GType views_label_get_type_once (void);
static void _vala_views_label_get_property (GObject * object,
                                     guint property_id,
                                     GValue * value,
                                     GParamSpec * pspec);
static void _vala_views_label_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
views_label_get_instance_private (ViewsLabel* self)
{
	return G_STRUCT_MEMBER_P (self, ViewsLabel_private_offset);
}

static void
views_label_validate_placeholder (ViewsLabel* self)
{
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GtkStack* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp1_ = views_label_get_has_items (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		_tmp0_ = "listbox";
	} else {
		_tmp0_ = "placeholder";
	}
	_tmp3_ = self->priv->listbox_stack;
	gtk_stack_set_visible_child_name (_tmp3_, _tmp0_);
}

static void
views_label_valid_add_item (ViewsLabel* self,
                            ObjectsItem* item,
                            gboolean insert)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GeeHashMap* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp2_ = self->items;
	_tmp3_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp4_ = _tmp3_;
	if (!gee_abstract_map_has_key ((GeeAbstractMap*) _tmp2_, _tmp4_)) {
		ObjectsLabel* _tmp5_;
		ObjectsLabel* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp5_ = views_label_get_label (self);
		_tmp6_ = _tmp5_;
		_tmp7_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp1_ = objects_item_has_label (item, _tmp8_);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = insert;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		views_label_add_item (self, item);
	}
	views_label_validate_placeholder (self);
}

static void
views_label_valid_delete_item (ViewsLabel* self,
                               ObjectsItem* item)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = self->items;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp2_ = _tmp1_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, _tmp2_)) {
		GeeHashMap* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gpointer _tmp6_;
		LayoutsItemRow* _tmp7_;
		GeeHashMap* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		_tmp3_ = self->items;
		_tmp4_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp3_, _tmp5_);
		_tmp7_ = (LayoutsItemRow*) _tmp6_;
		layouts_item_base_hide_destroy ((LayoutsItemBase*) _tmp7_);
		_g_object_unref0 (_tmp7_);
		_tmp8_ = self->items;
		_tmp9_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp10_ = _tmp9_;
		gee_abstract_map_unset ((GeeAbstractMap*) _tmp8_, _tmp10_, NULL);
	}
	views_label_validate_placeholder (self);
}

static void
views_label_valid_update_item (ViewsLabel* self,
                               ObjectsItem* item)
{
	gboolean _tmp0_ = FALSE;
	GeeHashMap* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp1_ = self->items;
	_tmp2_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp3_ = _tmp2_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, _tmp3_)) {
		ObjectsLabel* _tmp4_;
		ObjectsLabel* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp4_ = views_label_get_label (self);
		_tmp5_ = _tmp4_;
		_tmp6_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp0_ = !objects_item_has_label (item, _tmp7_);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GeeHashMap* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		gpointer _tmp11_;
		LayoutsItemRow* _tmp12_;
		GeeHashMap* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		ServicesEventBus* _tmp16_;
		ServicesEventBus* _tmp17_;
		_tmp8_ = self->items;
		_tmp9_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp10_ = _tmp9_;
		_tmp11_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp8_, _tmp10_);
		_tmp12_ = (LayoutsItemRow*) _tmp11_;
		layouts_item_base_hide_destroy ((LayoutsItemBase*) _tmp12_);
		_g_object_unref0 (_tmp12_);
		_tmp13_ = self->items;
		_tmp14_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
		_tmp15_ = _tmp14_;
		gee_abstract_map_unset ((GeeAbstractMap*) _tmp13_, _tmp15_, NULL);
		_tmp16_ = services_event_bus_get_default ();
		_tmp17_ = _tmp16_;
		services_event_bus_unfocus_item (_tmp17_);
		_g_object_unref0 (_tmp17_);
	}
	views_label_valid_add_item (self, item, TRUE);
}

static void
views_label_add_items (ViewsLabel* self)
{
	GeeHashMap* _tmp11_;
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _row_it = NULL;
		GeeHashMap* _tmp0_;
		GeeCollection* _tmp1_;
		GeeCollection* _tmp2_;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->items;
		_tmp1_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_row_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			LayoutsItemRow* row = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			GtkListBox* _tmp9_;
			LayoutsItemRow* _tmp10_;
			_tmp6_ = _row_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _row_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			row = (LayoutsItemRow*) _tmp8_;
			_tmp9_ = self->priv->listbox;
			_tmp10_ = row;
			gtk_list_box_remove (_tmp9_, (GtkWidget*) _tmp10_);
			_g_object_unref0 (row);
		}
		_g_object_unref0 (_row_it);
	}
	_tmp11_ = self->items;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp11_);
	{
		GeeArrayList* _item_list = NULL;
		ServicesStore* _tmp12_;
		ObjectsLabel* _tmp13_;
		ObjectsLabel* _tmp14_;
		GeeArrayList* _tmp15_;
		gint _item_size = 0;
		GeeArrayList* _tmp16_;
		gint _tmp17_;
		gint _tmp18_;
		gint _item_index = 0;
		_tmp12_ = services_store_instance ();
		_tmp13_ = views_label_get_label (self);
		_tmp14_ = _tmp13_;
		_tmp15_ = services_store_get_items_by_label (_tmp12_, _tmp14_, FALSE);
		_item_list = _tmp15_;
		_tmp16_ = _item_list;
		_tmp17_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp16_);
		_tmp18_ = _tmp17_;
		_item_size = _tmp18_;
		_item_index = -1;
		while (TRUE) {
			gint _tmp19_;
			gint _tmp20_;
			ObjectsItem* item = NULL;
			GeeArrayList* _tmp21_;
			gpointer _tmp22_;
			ObjectsItem* _tmp23_;
			_item_index = _item_index + 1;
			_tmp19_ = _item_index;
			_tmp20_ = _item_size;
			if (!(_tmp19_ < _tmp20_)) {
				break;
			}
			_tmp21_ = _item_list;
			_tmp22_ = gee_abstract_list_get ((GeeAbstractList*) _tmp21_, _item_index);
			item = (ObjectsItem*) _tmp22_;
			_tmp23_ = item;
			views_label_add_item (self, _tmp23_);
			_g_object_unref0 (item);
		}
		_g_object_unref0 (_item_list);
	}
	views_label_validate_placeholder (self);
}

static void
views_label_add_item (ViewsLabel* self,
                      ObjectsItem* item)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	LayoutsItemRow* _tmp3_;
	LayoutsItemRow* _tmp4_;
	GeeHashMap* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gpointer _tmp8_;
	LayoutsItemRow* _tmp9_;
	GtkListBox* _tmp10_;
	GeeHashMap* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	gpointer _tmp14_;
	LayoutsItemRow* _tmp15_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = self->items;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp2_ = _tmp1_;
	_tmp3_ = layouts_item_row_new (item, FALSE);
	g_object_ref_sink (_tmp3_);
	_tmp4_ = _tmp3_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, _tmp2_, _tmp4_);
	_g_object_unref0 (_tmp4_);
	_tmp5_ = self->items;
	_tmp6_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp7_ = _tmp6_;
	_tmp8_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp5_, _tmp7_);
	_tmp9_ = (LayoutsItemRow*) _tmp8_;
	layouts_item_row_disable_drag_and_drop (_tmp9_);
	_g_object_unref0 (_tmp9_);
	_tmp10_ = self->priv->listbox;
	_tmp11_ = self->items;
	_tmp12_ = objects_base_object_get_id ((ObjectsBaseObject*) item);
	_tmp13_ = _tmp12_;
	_tmp14_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, _tmp13_);
	_tmp15_ = (LayoutsItemRow*) _tmp14_;
	gtk_list_box_append (_tmp10_, (GtkWidget*) _tmp15_);
	_g_object_unref0 (_tmp15_);
}

void
views_label_update_request (ViewsLabel* self)
{
	GtkLabel* _tmp0_;
	ObjectsLabel* _tmp1_;
	ObjectsLabel* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	LayoutsHeaderBar* _tmp5_;
	ObjectsLabel* _tmp6_;
	ObjectsLabel* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	Util* _tmp10_;
	Util* _tmp11_;
	Util* _tmp12_;
	Util* _tmp13_;
	ObjectsLabel* _tmp14_;
	ObjectsLabel* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	GtkImage* _tmp20_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->title_label;
	_tmp1_ = views_label_get_label (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp2_);
	_tmp4_ = _tmp3_;
	gtk_label_set_label (_tmp0_, _tmp4_);
	_tmp5_ = self->priv->headerbar;
	_tmp6_ = views_label_get_label (self);
	_tmp7_ = _tmp6_;
	_tmp8_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp7_);
	_tmp9_ = _tmp8_;
	layouts_header_bar_set_title (_tmp5_, _tmp9_);
	_tmp10_ = util_get_default ();
	_tmp11_ = _tmp10_;
	_tmp12_ = util_get_default ();
	_tmp13_ = _tmp12_;
	_tmp14_ = views_label_get_label (self);
	_tmp15_ = _tmp14_;
	_tmp16_ = objects_base_object_get_color ((ObjectsBaseObject*) _tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = util_get_color (_tmp13_, _tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = self->priv->title_icon;
	util_set_widget_color (_tmp11_, _tmp19_, (GtkWidget*) _tmp20_);
	_g_free0 (_tmp19_);
	_g_object_unref0 (_tmp13_);
	_g_object_unref0 (_tmp11_);
}

void
views_label_prepare_new_item (ViewsLabel* self,
                              const gchar* content)
{
	DialogsQuickAdd* dialog = NULL;
	DialogsQuickAdd* _tmp0_;
	GeeHashMap* labels_map = NULL;
	GeeHashMap* _tmp1_;
	ObjectsLabel* _tmp2_;
	ObjectsLabel* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	ObjectsLabel* _tmp6_;
	ObjectsLabel* _tmp7_;
	Planify* _tmp8_;
	MainWindow* _tmp9_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (content != NULL);
	_tmp0_ = dialogs_quick_add_new ();
	g_object_ref_sink (_tmp0_);
	dialog = _tmp0_;
	dialogs_quick_add_update_content (dialog, content);
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, OBJECTS_TYPE_LABEL, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	labels_map = _tmp1_;
	_tmp2_ = views_label_get_label (self);
	_tmp3_ = _tmp2_;
	_tmp4_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = views_label_get_label (self);
	_tmp7_ = _tmp6_;
	gee_abstract_map_set ((GeeAbstractMap*) labels_map, _tmp5_, _tmp7_);
	dialogs_quick_add_set_labels (dialog, labels_map);
	_tmp8_ = planify__instance;
	_tmp9_ = _tmp8_->main_window;
	adw_dialog_present ((AdwDialog*) dialog, (GtkWidget*) _tmp9_);
	_g_object_unref0 (labels_map);
	_g_object_unref0 (dialog);
}

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

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

void
views_label_clean_up (ViewsLabel* self)
{
	Util* _tmp0_;
	Util* _tmp1_;
	GtkListBox* _tmp2_;
	GList* _tmp3_;
	GList* _tmp4_;
	GeeHashMap* _tmp22_;
	g_return_if_fail (self != NULL);
	_tmp0_ = util_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->listbox;
	_tmp3_ = util_get_children (_tmp1_, _tmp2_);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp1_);
	{
		GList* row_collection = NULL;
		GList* row_it = NULL;
		row_collection = _tmp4_;
		for (row_it = row_collection; row_it != NULL; row_it = row_it->next) {
			GtkListBoxRow* _tmp5_;
			GtkListBoxRow* row = NULL;
			_tmp5_ = _g_object_ref0 ((GtkListBoxRow*) row_it->data);
			row = _tmp5_;
			{
				GtkListBoxRow* _tmp6_;
				_tmp6_ = row;
				layouts_item_base_clean_up ((LayoutsItemBase*) G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow));
				_g_object_unref0 (row);
			}
		}
		(row_collection == NULL) ? NULL : (row_collection = (_g_list_free__g_object_unref0_ (row_collection), NULL));
	}
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp7_;
		GeeSet* _tmp8_;
		GeeSet* _tmp9_;
		GeeSet* _tmp10_;
		GeeIterator* _tmp11_;
		GeeIterator* _tmp12_;
		_tmp7_ = self->priv->signal_map;
		_tmp8_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = _tmp9_;
		_tmp11_ = gee_iterable_iterator ((GeeIterable*) _tmp10_);
		_tmp12_ = _tmp11_;
		_g_object_unref0 (_tmp10_);
		_entry_it = _tmp12_;
		while (TRUE) {
			GeeIterator* _tmp13_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp14_;
			gpointer _tmp15_;
			GeeMapEntry* _tmp16_;
			gconstpointer _tmp17_;
			gconstpointer _tmp18_;
			GeeMapEntry* _tmp19_;
			gconstpointer _tmp20_;
			gconstpointer _tmp21_;
			_tmp13_ = _entry_it;
			if (!gee_iterator_next (_tmp13_)) {
				break;
			}
			_tmp14_ = _entry_it;
			_tmp15_ = gee_iterator_get (_tmp14_);
			entry = (GeeMapEntry*) _tmp15_;
			_tmp16_ = entry;
			_tmp17_ = gee_map_entry_get_value (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = entry;
			_tmp20_ = gee_map_entry_get_key (_tmp19_);
			_tmp21_ = _tmp20_;
			g_signal_handler_disconnect ((GObject*) _tmp18_, (gulong) ((guintptr) _tmp21_));
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	_tmp22_ = self->priv->signal_map;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp22_);
}

ViewsLabel*
views_label_construct (GType object_type)
{
	ViewsLabel * self = NULL;
	self = (ViewsLabel*) g_object_new (object_type, NULL);
	return self;
}

ViewsLabel*
views_label_new (void)
{
	return views_label_construct (VIEWS_TYPE_LABEL);
}

static gboolean
views_label_get_has_items (ViewsLabel* self)
{
	gboolean result;
	GeeHashMap* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->items;
	_tmp1_ = gee_abstract_map_get_size ((GeeAbstractMap*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_ > 0;
	return result;
}

ObjectsLabel*
views_label_get_label (ViewsLabel* self)
{
	ObjectsLabel* result;
	ObjectsLabel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_label;
	result = _tmp0_;
	return result;
}

void
views_label_set_label (ViewsLabel* self,
                       ObjectsLabel* value)
{
	ObjectsLabel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_label);
	self->priv->_label = _tmp0_;
	views_label_update_request (self);
	views_label_add_items (self);
	g_object_notify_by_pspec ((GObject *) self, views_label_properties[VIEWS_LABEL_LABEL_PROPERTY]);
}

static Block71Data*
block71_data_ref (Block71Data* _data71_)
{
	g_atomic_int_inc (&_data71_->_ref_count_);
	return _data71_;
}

static void
block71_data_unref (void * _userdata_)
{
	Block71Data* _data71_;
	_data71_ = (Block71Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data71_->_ref_count_)) {
		ViewsLabel* self;
		self = _data71_->self;
		_g_object_unref0 (_data71_->scrolled_window);
		_g_object_unref0 (_data71_->title_box);
		_g_object_unref0 (self);
		g_slice_free (Block71Data, _data71_);
	}
}

static gboolean
_views_label___lambda870_ (ViewsLabel* self)
{
	gboolean result;
	views_label_validate_placeholder (self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
__views_label___lambda870__gsource_func (gpointer self)
{
	gboolean result;
	result = _views_label___lambda870_ ((ViewsLabel*) self);
	return result;
}

static void
_views_label_valid_add_item_services_store_item_added (ServicesStore* _sender,
                                                       ObjectsItem* item,
                                                       gboolean insert,
                                                       gpointer self)
{
	views_label_valid_add_item ((ViewsLabel*) self, item, insert);
}

static void
_views_label_valid_delete_item_services_store_item_deleted (ServicesStore* _sender,
                                                            ObjectsItem* item,
                                                            gpointer self)
{
	views_label_valid_delete_item ((ViewsLabel*) self, item);
}

static void
_views_label_valid_update_item_services_store_item_updated (ServicesStore* _sender,
                                                            ObjectsItem* item,
                                                            const gchar* update_id,
                                                            gpointer self)
{
	views_label_valid_update_item ((ViewsLabel*) self, item);
}

static void
_views_label_valid_delete_item_services_store_item_archived (ServicesStore* _sender,
                                                             ObjectsItem* item,
                                                             gpointer self)
{
	views_label_valid_delete_item ((ViewsLabel*) self, item);
}

static void
_views_label___lambda871_ (ViewsLabel* self,
                           ObjectsItem* item)
{
	g_return_if_fail (item != NULL);
	views_label_valid_add_item (self, item, TRUE);
}

static void
__views_label___lambda871__services_store_item_unarchived (ServicesStore* _sender,
                                                           ObjectsItem* item,
                                                           gpointer self)
{
	_views_label___lambda871_ ((ViewsLabel*) self, item);
}

static void
_views_label___lambda872_ (ViewsLabel* self)
{
	ServicesEventBus* _tmp0_;
	ServicesEventBus* _tmp1_;
	ObjectsFiltersLabels* _tmp2_;
	ObjectsFiltersLabels* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	_tmp0_ = services_event_bus_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = objects_filters_labels_get_default ();
	_tmp3_ = _tmp2_;
	_tmp4_ = objects_base_object_get_view_id ((ObjectsBaseObject*) _tmp3_);
	_tmp5_ = _tmp4_;
	g_signal_emit_by_name (_tmp1_, "pane-selected", PANE_TYPE_FILTER, _tmp5_);
	_g_object_unref0 (_tmp3_);
	_g_object_unref0 (_tmp1_);
}

static void
__views_label___lambda872__layouts_header_bar_back_activated (LayoutsHeaderBar* _sender,
                                                              gpointer self)
{
	_views_label___lambda872_ ((ViewsLabel*) self);
}

static void
_views_label___lambda873_ (Block71Data* _data71_)
{
	ViewsLabel* self;
	LayoutsHeaderBar* _tmp0_;
	GtkScrolledWindow* _tmp1_;
	GtkAdjustment* _tmp2_;
	GtkAdjustment* _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	self = _data71_->self;
	_tmp0_ = self->priv->headerbar;
	_tmp1_ = _data71_->scrolled_window;
	_tmp2_ = gtk_scrolled_window_get_vadjustment (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = gtk_adjustment_get_value (_tmp3_);
	_tmp5_ = _tmp4_;
	layouts_header_bar_revealer_title_box (_tmp0_, _tmp5_ >= ((gdouble) CONSTANTS_HEADERBAR_TITLE_SCROLL_THRESHOLD));
}

static void
__views_label___lambda873__gtk_adjustment_value_changed (GtkAdjustment* _sender,
                                                         gpointer self)
{
	_views_label___lambda873_ (self);
}

static void
_views_label___lambda874_ (ViewsLabel* self)
{
	views_label_prepare_new_item (self, "");
}

static void
__views_label___lambda874__widgets_magic_button_clicked (WidgetsMagicButton* _sender,
                                                         gpointer self)
{
	_views_label___lambda874_ ((ViewsLabel*) self);
}

static void
_views_label___lambda875_ (Block71Data* _data71_,
                           gboolean active,
                           const gchar* focused_item_id)
{
	ViewsLabel* self;
	GtkBox* _tmp0_;
	self = _data71_->self;
	g_return_if_fail (focused_item_id != NULL);
	_tmp0_ = _data71_->title_box;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, !active);
}

static void
__views_label___lambda875__services_event_bus_dim_content (ServicesEventBus* _sender,
                                                           gboolean active,
                                                           const gchar* focused_item_id,
                                                           gpointer self)
{
	_views_label___lambda875_ (self, active, focused_item_id);
}

static GObject *
views_label_constructor (GType type,
                         guint n_construct_properties,
                         GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ViewsLabel * self;
	Block71Data* _data71_;
	GeeHashMap* _tmp0_;
	LayoutsHeaderBar* _tmp1_;
	LayoutsHeaderBar* _tmp2_;
	ObjectsFiltersLabels* _tmp3_;
	ObjectsFiltersLabels* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar** _tmp8_;
	GtkImage* _tmp9_ = NULL;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar** _tmp12_;
	GtkLabel* _tmp13_ = NULL;
	GtkBox* _tmp14_ = NULL;
	GtkBox* _tmp15_;
	GtkImage* _tmp16_;
	GtkBox* _tmp17_;
	GtkLabel* _tmp18_;
	gchar* _tmp19_;
	gchar** _tmp20_;
	GtkListBox* _tmp21_ = NULL;
	AdwBin* listbox_content = NULL;
	GtkListBox* _tmp22_;
	GtkWidget* _tmp23_;
	AdwBin* _tmp24_ = NULL;
	AdwStatusPage* listbox_placeholder = NULL;
	AdwStatusPage* _tmp25_;
	AdwStatusPage* _tmp26_;
	AdwStatusPage* _tmp27_;
	AdwStatusPage* _tmp28_;
	GtkStack* _tmp29_ = NULL;
	GtkStack* _tmp30_;
	AdwBin* _tmp31_;
	GtkStack* _tmp32_;
	AdwStatusPage* _tmp33_;
	GtkBox* content_box = NULL;
	GtkBox* _tmp34_ = NULL;
	GtkBox* _tmp35_;
	GtkBox* _tmp36_;
	GtkBox* _tmp37_;
	GtkStack* _tmp38_;
	AdwClamp* content_clamp = NULL;
	GtkBox* _tmp39_;
	GtkWidget* _tmp40_;
	AdwClamp* _tmp41_ = NULL;
	AdwClamp* _tmp42_;
	GtkWidget* _tmp43_;
	GtkScrolledWindow* _tmp44_ = NULL;
	WidgetsMagicButton* magic_button = NULL;
	WidgetsMagicButton* _tmp45_;
	GtkOverlay* content_overlay = NULL;
	GtkScrolledWindow* _tmp46_;
	GtkWidget* _tmp47_;
	GtkOverlay* _tmp48_ = NULL;
	GtkOverlay* _tmp49_;
	WidgetsMagicButton* _tmp50_;
	AdwToolbarView* toolbar_view = NULL;
	AdwToolbarView* _tmp51_;
	AdwToolbarView* _tmp52_;
	LayoutsHeaderBar* _tmp53_;
	AdwToolbarView* _tmp54_;
	GtkOverlay* _tmp55_;
	AdwToolbarView* _tmp56_;
	GtkStack* _tmp57_;
	guint _tmp58_;
	guint _tmp59_;
	GeeHashMap* _tmp60_;
	ServicesStore* _tmp61_;
	gulong _tmp62_;
	ServicesStore* _tmp63_;
	GeeHashMap* _tmp64_;
	ServicesStore* _tmp65_;
	gulong _tmp66_;
	ServicesStore* _tmp67_;
	GeeHashMap* _tmp68_;
	ServicesStore* _tmp69_;
	gulong _tmp70_;
	ServicesStore* _tmp71_;
	GeeHashMap* _tmp72_;
	ServicesStore* _tmp73_;
	gulong _tmp74_;
	ServicesStore* _tmp75_;
	GeeHashMap* _tmp76_;
	ServicesStore* _tmp77_;
	gulong _tmp78_;
	ServicesStore* _tmp79_;
	GeeHashMap* _tmp80_;
	LayoutsHeaderBar* _tmp81_;
	gulong _tmp82_;
	LayoutsHeaderBar* _tmp83_;
	GeeHashMap* _tmp84_;
	GtkScrolledWindow* _tmp85_;
	GtkAdjustment* _tmp86_;
	GtkAdjustment* _tmp87_;
	gulong _tmp88_;
	GtkScrolledWindow* _tmp89_;
	GtkAdjustment* _tmp90_;
	GtkAdjustment* _tmp91_;
	GeeHashMap* _tmp92_;
	WidgetsMagicButton* _tmp93_;
	gulong _tmp94_;
	WidgetsMagicButton* _tmp95_;
	GeeHashMap* _tmp96_;
	ServicesEventBus* _tmp97_;
	ServicesEventBus* _tmp98_;
	gulong _tmp99_;
	ServicesEventBus* _tmp100_;
	ServicesEventBus* _tmp101_;
	parent_class = G_OBJECT_CLASS (views_label_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VIEWS_TYPE_LABEL, ViewsLabel);
	_data71_ = g_slice_new0 (Block71Data);
	_data71_->_ref_count_ = 1;
	_data71_->self = g_object_ref (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, LAYOUTS_TYPE_ITEM_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->items);
	self->items = _tmp0_;
	_tmp1_ = layouts_header_bar_new ();
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->headerbar);
	self->priv->headerbar = _tmp1_;
	_tmp2_ = self->priv->headerbar;
	layouts_header_bar_set_back_revealer (_tmp2_, TRUE);
	_tmp3_ = objects_filters_labels_get_default ();
	_tmp4_ = _tmp3_;
	_tmp5_ = objects_base_object_get_icon_name ((ObjectsBaseObject*) _tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strdup ("view-icon");
	_tmp8_ = g_new0 (gchar*, 1 + 1);
	_tmp8_[0] = _tmp7_;
	_tmp9_ = (GtkImage*) gtk_image_new_from_icon_name (_tmp6_);
	gtk_image_set_pixel_size (_tmp9_, 16);
	gtk_widget_set_valign ((GtkWidget*) _tmp9_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp9_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp9_, _tmp8_);
	_tmp8_ = (_vala_array_free (_tmp8_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (self->priv->title_icon);
	self->priv->title_icon = _tmp9_;
	_g_object_unref0 (_tmp4_);
	_tmp10_ = g_strdup ("font-bold");
	_tmp11_ = g_strdup ("title-2");
	_tmp12_ = g_new0 (gchar*, 2 + 1);
	_tmp12_[0] = _tmp10_;
	_tmp12_[1] = _tmp11_;
	_tmp13_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp13_, _tmp12_);
	_tmp12_ = (_vala_array_free (_tmp12_, 2, (GDestroyNotify) g_free), NULL);
	gtk_label_set_ellipsize (_tmp13_, PANGO_ELLIPSIZE_END);
	gtk_widget_set_halign ((GtkWidget*) _tmp13_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp13_);
	_g_object_unref0 (self->priv->title_label);
	self->priv->title_label = _tmp13_;
	_tmp14_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp14_, 30);
	g_object_ref_sink (_tmp14_);
	_data71_->title_box = _tmp14_;
	_tmp15_ = _data71_->title_box;
	_tmp16_ = self->priv->title_icon;
	gtk_box_append (_tmp15_, (GtkWidget*) _tmp16_);
	_tmp17_ = _data71_->title_box;
	_tmp18_ = self->priv->title_label;
	gtk_box_append (_tmp17_, (GtkWidget*) _tmp18_);
	_tmp19_ = g_strdup ("listbox-background");
	_tmp20_ = g_new0 (gchar*, 1 + 1);
	_tmp20_[0] = _tmp19_;
	_tmp21_ = (GtkListBox*) gtk_list_box_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp21_, GTK_ALIGN_START);
	gtk_list_box_set_activate_on_single_click (_tmp21_, TRUE);
	gtk_list_box_set_selection_mode (_tmp21_, GTK_SELECTION_SINGLE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp21_, TRUE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp21_, _tmp20_);
	_tmp20_ = (_vala_array_free (_tmp20_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp21_);
	_g_object_unref0 (self->priv->listbox);
	self->priv->listbox = _tmp21_;
	_tmp22_ = self->priv->listbox;
	_tmp23_ = _g_object_ref0 ((GtkWidget*) _tmp22_);
	_tmp24_ = (AdwBin*) adw_bin_new ();
	gtk_widget_set_margin_top ((GtkWidget*) _tmp24_, 20);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp24_, 24);
	adw_bin_set_child (_tmp24_, _tmp23_);
	_g_object_unref0 (_tmp23_);
	g_object_ref_sink (_tmp24_);
	listbox_content = _tmp24_;
	_tmp25_ = (AdwStatusPage*) adw_status_page_new ();
	g_object_ref_sink (_tmp25_);
	listbox_placeholder = _tmp25_;
	_tmp26_ = listbox_placeholder;
	adw_status_page_set_icon_name (_tmp26_, "check-round-outline-symbolic");
	_tmp27_ = listbox_placeholder;
	adw_status_page_set_title (_tmp27_, _ ("Add Some Tasks"));
	_tmp28_ = listbox_placeholder;
	adw_status_page_set_description (_tmp28_, _ ("Press 'a' to create a new task"));
	_tmp29_ = (GtkStack*) gtk_stack_new ();
	gtk_widget_set_vexpand ((GtkWidget*) _tmp29_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp29_, TRUE);
	gtk_stack_set_transition_type (_tmp29_, GTK_STACK_TRANSITION_TYPE_CROSSFADE);
	g_object_ref_sink (_tmp29_);
	_g_object_unref0 (self->priv->listbox_stack);
	self->priv->listbox_stack = _tmp29_;
	_tmp30_ = self->priv->listbox_stack;
	_tmp31_ = listbox_content;
	gtk_stack_add_named (_tmp30_, (GtkWidget*) _tmp31_, "listbox");
	_tmp32_ = self->priv->listbox_stack;
	_tmp33_ = listbox_placeholder;
	gtk_stack_add_named (_tmp32_, (GtkWidget*) _tmp33_, "placeholder");
	_tmp34_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp34_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp34_, TRUE);
	g_object_ref_sink (_tmp34_);
	content_box = _tmp34_;
	_tmp35_ = content_box;
	_tmp36_ = _data71_->title_box;
	gtk_box_append (_tmp35_, (GtkWidget*) _tmp36_);
	_tmp37_ = content_box;
	_tmp38_ = self->priv->listbox_stack;
	gtk_box_append (_tmp37_, (GtkWidget*) _tmp38_);
	_tmp39_ = content_box;
	_tmp40_ = _g_object_ref0 ((GtkWidget*) _tmp39_);
	_tmp41_ = (AdwClamp*) adw_clamp_new ();
	adw_clamp_set_maximum_size (_tmp41_, 864);
	adw_clamp_set_tightening_threshold (_tmp41_, 600);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp41_, 64);
	adw_clamp_set_child (_tmp41_, _tmp40_);
	_g_object_unref0 (_tmp40_);
	g_object_ref_sink (_tmp41_);
	content_clamp = _tmp41_;
	_tmp42_ = content_clamp;
	_tmp43_ = _g_object_ref0 ((GtkWidget*) _tmp42_);
	_tmp44_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	g_object_set (_tmp44_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp44_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp44_, TRUE);
	gtk_scrolled_window_set_child (_tmp44_, _tmp43_);
	_g_object_unref0 (_tmp43_);
	g_object_ref_sink (_tmp44_);
	_data71_->scrolled_window = _tmp44_;
	_tmp45_ = widgets_magic_button_new ();
	g_object_ref_sink (_tmp45_);
	magic_button = _tmp45_;
	_tmp46_ = _data71_->scrolled_window;
	_tmp47_ = _g_object_ref0 ((GtkWidget*) _tmp46_);
	_tmp48_ = (GtkOverlay*) gtk_overlay_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp48_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp48_, TRUE);
	gtk_overlay_set_child (_tmp48_, _tmp47_);
	_g_object_unref0 (_tmp47_);
	g_object_ref_sink (_tmp48_);
	content_overlay = _tmp48_;
	_tmp49_ = content_overlay;
	_tmp50_ = magic_button;
	gtk_overlay_add_overlay (_tmp49_, (GtkWidget*) _tmp50_);
	_tmp51_ = (AdwToolbarView*) adw_toolbar_view_new ();
	g_object_ref_sink (_tmp51_);
	toolbar_view = _tmp51_;
	_tmp52_ = toolbar_view;
	_tmp53_ = self->priv->headerbar;
	adw_toolbar_view_add_top_bar (_tmp52_, (GtkWidget*) _tmp53_);
	_tmp54_ = toolbar_view;
	_tmp55_ = content_overlay;
	adw_toolbar_view_set_content (_tmp54_, (GtkWidget*) _tmp55_);
	_tmp56_ = toolbar_view;
	adw_bin_set_child ((AdwBin*) self, (GtkWidget*) _tmp56_);
	_tmp57_ = self->priv->listbox_stack;
	_tmp58_ = gtk_stack_get_transition_duration (_tmp57_);
	_tmp59_ = _tmp58_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp59_, __views_label___lambda870__gsource_func, g_object_ref (self), g_object_unref);
	_tmp60_ = self->priv->signal_map;
	_tmp61_ = services_store_instance ();
	_tmp62_ = g_signal_connect_object (_tmp61_, "item-added", (GCallback) _views_label_valid_add_item_services_store_item_added, self, 0);
	_tmp63_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp60_, (gpointer) ((guintptr) _tmp62_), (GObject*) _tmp63_);
	_tmp64_ = self->priv->signal_map;
	_tmp65_ = services_store_instance ();
	_tmp66_ = g_signal_connect_object (_tmp65_, "item-deleted", (GCallback) _views_label_valid_delete_item_services_store_item_deleted, self, 0);
	_tmp67_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp64_, (gpointer) ((guintptr) _tmp66_), (GObject*) _tmp67_);
	_tmp68_ = self->priv->signal_map;
	_tmp69_ = services_store_instance ();
	_tmp70_ = g_signal_connect_object (_tmp69_, "item-updated", (GCallback) _views_label_valid_update_item_services_store_item_updated, self, 0);
	_tmp71_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp68_, (gpointer) ((guintptr) _tmp70_), (GObject*) _tmp71_);
	_tmp72_ = self->priv->signal_map;
	_tmp73_ = services_store_instance ();
	_tmp74_ = g_signal_connect_object (_tmp73_, "item-archived", (GCallback) _views_label_valid_delete_item_services_store_item_archived, self, 0);
	_tmp75_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp72_, (gpointer) ((guintptr) _tmp74_), (GObject*) _tmp75_);
	_tmp76_ = self->priv->signal_map;
	_tmp77_ = services_store_instance ();
	_tmp78_ = g_signal_connect_object (_tmp77_, "item-unarchived", (GCallback) __views_label___lambda871__services_store_item_unarchived, self, 0);
	_tmp79_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp76_, (gpointer) ((guintptr) _tmp78_), (GObject*) _tmp79_);
	_tmp80_ = self->priv->signal_map;
	_tmp81_ = self->priv->headerbar;
	_tmp82_ = g_signal_connect_object (_tmp81_, "back-activated", (GCallback) __views_label___lambda872__layouts_header_bar_back_activated, self, 0);
	_tmp83_ = self->priv->headerbar;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp80_, (gpointer) ((guintptr) _tmp82_), (GObject*) _tmp83_);
	_tmp84_ = self->priv->signal_map;
	_tmp85_ = _data71_->scrolled_window;
	_tmp86_ = gtk_scrolled_window_get_vadjustment (_tmp85_);
	_tmp87_ = _tmp86_;
	_tmp88_ = g_signal_connect_data (_tmp87_, "value-changed", (GCallback) __views_label___lambda873__gtk_adjustment_value_changed, block71_data_ref (_data71_), (GClosureNotify) block71_data_unref, 0);
	_tmp89_ = _data71_->scrolled_window;
	_tmp90_ = gtk_scrolled_window_get_vadjustment (_tmp89_);
	_tmp91_ = _tmp90_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp84_, (gpointer) ((guintptr) _tmp88_), (GObject*) _tmp91_);
	_tmp92_ = self->priv->signal_map;
	_tmp93_ = magic_button;
	_tmp94_ = g_signal_connect_object (_tmp93_, "clicked", (GCallback) __views_label___lambda874__widgets_magic_button_clicked, self, 0);
	_tmp95_ = magic_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp92_, (gpointer) ((guintptr) _tmp94_), (GObject*) _tmp95_);
	_tmp96_ = self->priv->signal_map;
	_tmp97_ = services_event_bus_get_default ();
	_tmp98_ = _tmp97_;
	_tmp99_ = g_signal_connect_data (_tmp98_, "dim-content", (GCallback) __views_label___lambda875__services_event_bus_dim_content, block71_data_ref (_data71_), (GClosureNotify) block71_data_unref, 0);
	_tmp100_ = services_event_bus_get_default ();
	_tmp101_ = _tmp100_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp96_, (gpointer) ((guintptr) _tmp99_), (GObject*) _tmp101_);
	_g_object_unref0 (_tmp101_);
	_g_object_unref0 (_tmp98_);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (content_overlay);
	_g_object_unref0 (magic_button);
	_g_object_unref0 (content_clamp);
	_g_object_unref0 (content_box);
	_g_object_unref0 (listbox_placeholder);
	_g_object_unref0 (listbox_content);
	block71_data_unref (_data71_);
	_data71_ = NULL;
	return obj;
}

static void
views_label_class_init (ViewsLabelClass * klass,
                        gpointer klass_data)
{
	views_label_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ViewsLabel_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_views_label_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_views_label_set_property;
	G_OBJECT_CLASS (klass)->constructor = views_label_constructor;
	G_OBJECT_CLASS (klass)->finalize = views_label_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), VIEWS_LABEL_LABEL_PROPERTY, views_label_properties[VIEWS_LABEL_LABEL_PROPERTY] = g_param_spec_object ("label", "label", "label", OBJECTS_TYPE_LABEL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
views_label_instance_init (ViewsLabel * self,
                           gpointer klass)
{
	GeeHashMap* _tmp0_;
	self->priv = views_label_get_instance_private (self);
	_tmp0_ = 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 = _tmp0_;
}

static void
views_label_finalize (GObject * obj)
{
	ViewsLabel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VIEWS_TYPE_LABEL, ViewsLabel);
	g_debug ("Label.vala:52: Destroying - Views.Label\n");
	_g_object_unref0 (self->priv->headerbar);
	_g_object_unref0 (self->priv->title_icon);
	_g_object_unref0 (self->priv->title_label);
	_g_object_unref0 (self->priv->listbox);
	_g_object_unref0 (self->priv->listbox_stack);
	_g_object_unref0 (self->items);
	_g_object_unref0 (self->priv->signal_map);
	_g_object_unref0 (self->priv->_label);
	G_OBJECT_CLASS (views_label_parent_class)->finalize (obj);
}

static GType
views_label_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ViewsLabelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) views_label_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ViewsLabel), 0, (GInstanceInitFunc) views_label_instance_init, NULL };
	GType views_label_type_id;
	views_label_type_id = g_type_register_static (adw_bin_get_type (), "ViewsLabel", &g_define_type_info, 0);
	ViewsLabel_private_offset = g_type_add_instance_private (views_label_type_id, sizeof (ViewsLabelPrivate));
	return views_label_type_id;
}

GType
views_label_get_type (void)
{
	static volatile gsize views_label_type_id__once = 0;
	if (g_once_init_enter (&views_label_type_id__once)) {
		GType views_label_type_id;
		views_label_type_id = views_label_get_type_once ();
		g_once_init_leave (&views_label_type_id__once, views_label_type_id);
	}
	return views_label_type_id__once;
}

static void
_vala_views_label_get_property (GObject * object,
                                guint property_id,
                                GValue * value,
                                GParamSpec * pspec)
{
	ViewsLabel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VIEWS_TYPE_LABEL, ViewsLabel);
	switch (property_id) {
		case VIEWS_LABEL_LABEL_PROPERTY:
		g_value_set_object (value, views_label_get_label (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_views_label_set_property (GObject * object,
                                guint property_id,
                                const GValue * value,
                                GParamSpec * pspec)
{
	ViewsLabel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VIEWS_TYPE_LABEL, ViewsLabel);
	switch (property_id) {
		case VIEWS_LABEL_LABEL_PROPERTY:
		views_label_set_label (self, g_value_get_object (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);
}

