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

/* BreakConfigurationChooser.vala
 *
 * Copyright 2020 Dylan McCall <dylan@dylanmccall.ca>
 *
 * 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, see <http://www.gnu.org/licenses/>.
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#include <adwaita.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include "settings.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

#define BREAK_TIMER_SETTINGS_WIDGETS_TYPE_BREAK_CONFIGURATION_CHOOSER (break_timer_settings_widgets_break_configuration_chooser_get_type ())
#define BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BREAK_TIMER_SETTINGS_WIDGETS_TYPE_BREAK_CONFIGURATION_CHOOSER, BreakTimerSettingsWidgetsBreakConfigurationChooser))
#define BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BREAK_TIMER_SETTINGS_WIDGETS_TYPE_BREAK_CONFIGURATION_CHOOSER, BreakTimerSettingsWidgetsBreakConfigurationChooserClass))
#define BREAK_TIMER_SETTINGS_WIDGETS_IS_BREAK_CONFIGURATION_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BREAK_TIMER_SETTINGS_WIDGETS_TYPE_BREAK_CONFIGURATION_CHOOSER))
#define BREAK_TIMER_SETTINGS_WIDGETS_IS_BREAK_CONFIGURATION_CHOOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BREAK_TIMER_SETTINGS_WIDGETS_TYPE_BREAK_CONFIGURATION_CHOOSER))
#define BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BREAK_TIMER_SETTINGS_WIDGETS_TYPE_BREAK_CONFIGURATION_CHOOSER, BreakTimerSettingsWidgetsBreakConfigurationChooserClass))

typedef struct _BreakTimerSettingsWidgetsBreakConfigurationChooser BreakTimerSettingsWidgetsBreakConfigurationChooser;
typedef struct _BreakTimerSettingsWidgetsBreakConfigurationChooserClass BreakTimerSettingsWidgetsBreakConfigurationChooserClass;
typedef struct _BreakTimerSettingsWidgetsBreakConfigurationChooserPrivate BreakTimerSettingsWidgetsBreakConfigurationChooserPrivate;
enum  {
	BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_0_PROPERTY,
	BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_SELECTED_BREAK_IDS_PROPERTY,
	BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_NUM_PROPERTIES
};
static GParamSpec* break_timer_settings_widgets_break_configuration_chooser_properties[BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_TYPE_CONFIGURATION (break_timer_settings_widgets_break_configuration_chooser_configuration_get_type ())
#define BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_TYPE_CONFIGURATION, BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration))
#define BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_TYPE_CONFIGURATION, BreakTimerSettingsWidgetsBreakConfigurationChooserConfigurationClass))
#define BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_IS_CONFIGURATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_TYPE_CONFIGURATION))
#define BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_IS_CONFIGURATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_TYPE_CONFIGURATION))
#define BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_TYPE_CONFIGURATION, BreakTimerSettingsWidgetsBreakConfigurationChooserConfigurationClass))

typedef struct _BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration;
typedef struct _BreakTimerSettingsWidgetsBreakConfigurationChooserConfigurationClass BreakTimerSettingsWidgetsBreakConfigurationChooserConfigurationClass;
#define _gtk_expression_unref0(var) ((var == NULL) ? NULL : (var = (gtk_expression_unref (var), NULL)))
typedef struct _BreakTimerSettingsWidgetsBreakConfigurationChooserConfigurationPrivate BreakTimerSettingsWidgetsBreakConfigurationChooserConfigurationPrivate;
enum  {
	BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_0_PROPERTY,
	BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_BREAK_IDS_PROPERTY,
	BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_LABEL_PROPERTY,
	BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_NUM_PROPERTIES
};
static GParamSpec* break_timer_settings_widgets_break_configuration_chooser_configuration_properties[BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

struct _BreakTimerSettingsWidgetsBreakConfigurationChooser {
	AdwComboRow parent_instance;
	BreakTimerSettingsWidgetsBreakConfigurationChooserPrivate * priv;
};

struct _BreakTimerSettingsWidgetsBreakConfigurationChooserClass {
	AdwComboRowClass parent_class;
};

struct _BreakTimerSettingsWidgetsBreakConfigurationChooserPrivate {
	GListStore* list_store;
	gchar** _selected_break_ids;
	gint _selected_break_ids_length1;
	gint __selected_break_ids_size_;
};

struct _BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration {
	GObject parent_instance;
	BreakTimerSettingsWidgetsBreakConfigurationChooserConfigurationPrivate * priv;
};

struct _BreakTimerSettingsWidgetsBreakConfigurationChooserConfigurationClass {
	GObjectClass parent_class;
};

struct _BreakTimerSettingsWidgetsBreakConfigurationChooserConfigurationPrivate {
	gchar** _break_ids;
	gint _break_ids_length1;
	gint __break_ids_size_;
	gchar* _label;
};

static gint BreakTimerSettingsWidgetsBreakConfigurationChooser_private_offset;
static gpointer break_timer_settings_widgets_break_configuration_chooser_parent_class = NULL;
static gint BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration_private_offset;
static gpointer break_timer_settings_widgets_break_configuration_chooser_configuration_parent_class = NULL;

VALA_EXTERN GType break_timer_settings_widgets_break_configuration_chooser_get_type (void) G_GNUC_CONST ;
VALA_EXTERN BreakTimerSettingsWidgetsBreakConfigurationChooser* break_timer_settings_widgets_break_configuration_chooser_new (void);
VALA_EXTERN BreakTimerSettingsWidgetsBreakConfigurationChooser* break_timer_settings_widgets_break_configuration_chooser_construct (GType object_type);
VALA_EXTERN GType break_timer_settings_widgets_break_configuration_chooser_configuration_get_type (void) G_GNUC_CONST ;
static void break_timer_settings_widgets_break_configuration_chooser_on_selected_item_changed (BreakTimerSettingsWidgetsBreakConfigurationChooser* self);
static void _break_timer_settings_widgets_break_configuration_chooser_on_selected_item_changed_g_object_notify (GObject* _sender,
                                                                                                         GParamSpec* pspec,
                                                                                                         gpointer self);
static void break_timer_settings_widgets_break_configuration_chooser_on_selected_break_ids_changed (BreakTimerSettingsWidgetsBreakConfigurationChooser* self);
static void _break_timer_settings_widgets_break_configuration_chooser_on_selected_break_ids_changed_g_object_notify (GObject* _sender,
                                                                                                              GParamSpec* pspec,
                                                                                                              gpointer self);
VALA_EXTERN void break_timer_settings_widgets_break_configuration_chooser_add_configuration (BreakTimerSettingsWidgetsBreakConfigurationChooser* self,
                                                                                 gchar** break_ids,
                                                                                 gint break_ids_length1,
                                                                                 const gchar* label);
VALA_EXTERN BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* break_timer_settings_widgets_break_configuration_chooser_configuration_new (gchar** break_ids,
                                                                                                                                             gint break_ids_length1,
                                                                                                                                             const gchar* label);
VALA_EXTERN BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* break_timer_settings_widgets_break_configuration_chooser_configuration_construct (GType object_type,
                                                                                                                                                   gchar** break_ids,
                                                                                                                                                   gint break_ids_length1,
                                                                                                                                                   const gchar* label);
VALA_EXTERN gchar** break_timer_settings_widgets_break_configuration_chooser_configuration_get_break_ids (BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* self,
                                                                                              gint* result_length1);
VALA_EXTERN void break_timer_settings_widgets_break_configuration_chooser_set_selected_break_ids (BreakTimerSettingsWidgetsBreakConfigurationChooser* self,
                                                                                      gchar** value,
                                                                                      gint value_length1);
static gboolean break_timer_settings_widgets_break_configuration_chooser_find_position_for_selected_breaks (BreakTimerSettingsWidgetsBreakConfigurationChooser* self,
                                                                                                     gchar** selected_breaks,
                                                                                                     gint selected_breaks_length1,
                                                                                                     guint* out_position);
VALA_EXTERN gchar** break_timer_settings_widgets_break_configuration_chooser_get_selected_break_ids (BreakTimerSettingsWidgetsBreakConfigurationChooser* self,
                                                                                         gint* result_length1);
VALA_EXTERN gboolean break_timer_settings_widgets_break_configuration_chooser_configuration_matches_breaks (BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* self,
                                                                                                gchar** test_break_ids,
                                                                                                gint test_break_ids_length1);
static gchar** _vala_array_dup2 (gchar** self,
                          gssize length);
static void break_timer_settings_widgets_break_configuration_chooser_configuration_set_break_ids (BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* self,
                                                                                           gchar** value,
                                                                                           gint value_length1);
static void break_timer_settings_widgets_break_configuration_chooser_configuration_set_label (BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* self,
                                                                                       const gchar* value);
static gboolean _vala_string_array_contains (gchar* * stack,
                                      gssize stack_length,
                                      const gchar* needle);
static gchar** _vala_array_dup3 (gchar** self,
                          gssize length);
VALA_EXTERN const gchar* break_timer_settings_widgets_break_configuration_chooser_configuration_get_label (BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* self);
static void break_timer_settings_widgets_break_configuration_chooser_configuration_finalize (GObject * obj);
static GType break_timer_settings_widgets_break_configuration_chooser_configuration_get_type_once (void);
static void _vala_break_timer_settings_widgets_break_configuration_chooser_configuration_get_property (GObject * object,
                                                                                                guint property_id,
                                                                                                GValue * value,
                                                                                                GParamSpec * pspec);
static void _vala_break_timer_settings_widgets_break_configuration_chooser_configuration_set_property (GObject * object,
                                                                                                guint property_id,
                                                                                                const GValue * value,
                                                                                                GParamSpec * pspec);
static void break_timer_settings_widgets_break_configuration_chooser_finalize (GObject * obj);
static GType break_timer_settings_widgets_break_configuration_chooser_get_type_once (void);
static void _vala_break_timer_settings_widgets_break_configuration_chooser_get_property (GObject * object,
                                                                                  guint property_id,
                                                                                  GValue * value,
                                                                                  GParamSpec * pspec);
static void _vala_break_timer_settings_widgets_break_configuration_chooser_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
break_timer_settings_widgets_break_configuration_chooser_get_instance_private (BreakTimerSettingsWidgetsBreakConfigurationChooser* self)
{
	return G_STRUCT_MEMBER_P (self, BreakTimerSettingsWidgetsBreakConfigurationChooser_private_offset);
}

static void
_break_timer_settings_widgets_break_configuration_chooser_on_selected_item_changed_g_object_notify (GObject* _sender,
                                                                                                    GParamSpec* pspec,
                                                                                                    gpointer self)
{
	break_timer_settings_widgets_break_configuration_chooser_on_selected_item_changed ((BreakTimerSettingsWidgetsBreakConfigurationChooser*) self);
}

static void
_break_timer_settings_widgets_break_configuration_chooser_on_selected_break_ids_changed_g_object_notify (GObject* _sender,
                                                                                                         GParamSpec* pspec,
                                                                                                         gpointer self)
{
	break_timer_settings_widgets_break_configuration_chooser_on_selected_break_ids_changed ((BreakTimerSettingsWidgetsBreakConfigurationChooser*) self);
}

BreakTimerSettingsWidgetsBreakConfigurationChooser*
break_timer_settings_widgets_break_configuration_chooser_construct (GType object_type)
{
	BreakTimerSettingsWidgetsBreakConfigurationChooser * self = NULL;
	GListStore* _tmp0_;
	GListStore* _tmp1_;
	GtkPropertyExpression* _tmp2_;
	GtkPropertyExpression* _tmp3_;
	self = (BreakTimerSettingsWidgetsBreakConfigurationChooser*) g_object_new (object_type, "use-subtitle", TRUE, NULL);
	adw_preferences_row_set_title ((AdwPreferencesRow*) self, _ ("Choose your break schedule"));
	_tmp0_ = g_list_store_new (BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_TYPE_CONFIGURATION);
	_g_object_unref0 (self->priv->list_store);
	self->priv->list_store = _tmp0_;
	_tmp1_ = self->priv->list_store;
	adw_combo_row_set_model ((AdwComboRow*) self, (GListModel*) _tmp1_);
	_tmp2_ = (GtkPropertyExpression*) gtk_property_expression_new (BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_TYPE_CONFIGURATION, NULL, "label");
	_tmp3_ = _tmp2_;
	adw_combo_row_set_expression ((AdwComboRow*) self, (GtkExpression*) _tmp3_);
	_gtk_expression_unref0 (_tmp3_);
	g_signal_connect_object ((GObject*) self, "notify::selected-item", (GCallback) _break_timer_settings_widgets_break_configuration_chooser_on_selected_item_changed_g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) self, "notify::selected-break-ids", (GCallback) _break_timer_settings_widgets_break_configuration_chooser_on_selected_break_ids_changed_g_object_notify, self, 0);
	return self;
}

BreakTimerSettingsWidgetsBreakConfigurationChooser*
break_timer_settings_widgets_break_configuration_chooser_new (void)
{
	return break_timer_settings_widgets_break_configuration_chooser_construct (BREAK_TIMER_SETTINGS_WIDGETS_TYPE_BREAK_CONFIGURATION_CHOOSER);
}

void
break_timer_settings_widgets_break_configuration_chooser_add_configuration (BreakTimerSettingsWidgetsBreakConfigurationChooser* self,
                                                                            gchar** break_ids,
                                                                            gint break_ids_length1,
                                                                            const gchar* label)
{
	BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* configuration = NULL;
	BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* _tmp0_;
	GListStore* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (label != NULL);
	_tmp0_ = break_timer_settings_widgets_break_configuration_chooser_configuration_new (break_ids, break_ids_length1, label);
	configuration = _tmp0_;
	_tmp1_ = self->priv->list_store;
	g_list_store_append (_tmp1_, (GObject*) configuration);
	_g_object_unref0 (configuration);
}

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

static void
break_timer_settings_widgets_break_configuration_chooser_on_selected_item_changed (BreakTimerSettingsWidgetsBreakConfigurationChooser* self)
{
	BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* configuration = NULL;
	GObject* _tmp0_;
	BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* _tmp1_;
	BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = adw_combo_row_get_selected_item ((AdwComboRow*) self);
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_TYPE_CONFIGURATION, BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration));
	configuration = _tmp1_;
	_tmp2_ = configuration;
	if (_tmp2_ != NULL) {
		BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* _tmp3_;
		gchar** _tmp4_;
		gint _tmp4__length1;
		gint _tmp5_ = 0;
		gchar** _tmp6_;
		gint _tmp6__length1;
		_tmp3_ = configuration;
		_tmp4_ = break_timer_settings_widgets_break_configuration_chooser_configuration_get_break_ids (_tmp3_, &_tmp5_);
		_tmp4__length1 = _tmp5_;
		_tmp6_ = _tmp4_;
		_tmp6__length1 = _tmp4__length1;
		break_timer_settings_widgets_break_configuration_chooser_set_selected_break_ids (self, _tmp6_, _tmp6__length1);
	}
	_g_object_unref0 (configuration);
}

static void
break_timer_settings_widgets_break_configuration_chooser_on_selected_break_ids_changed (BreakTimerSettingsWidgetsBreakConfigurationChooser* self)
{
	guint find_position = 0U;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gint _tmp1_ = 0;
	gchar** _tmp2_;
	gint _tmp2__length1;
	guint _tmp3_ = 0U;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = break_timer_settings_widgets_break_configuration_chooser_get_selected_break_ids (self, &_tmp1_);
	_tmp0__length1 = _tmp1_;
	_tmp2_ = _tmp0_;
	_tmp2__length1 = _tmp0__length1;
	_tmp4_ = break_timer_settings_widgets_break_configuration_chooser_find_position_for_selected_breaks (self, _tmp2_, (gint) _tmp2__length1, &_tmp3_);
	find_position = _tmp3_;
	if (_tmp4_) {
		adw_combo_row_set_selected ((AdwComboRow*) self, find_position);
	}
}

static gboolean
break_timer_settings_widgets_break_configuration_chooser_find_position_for_selected_breaks (BreakTimerSettingsWidgetsBreakConfigurationChooser* self,
                                                                                            gchar** selected_breaks,
                                                                                            gint selected_breaks_length1,
                                                                                            guint* out_position)
{
	guint _vala_out_position = 0U;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	{
		guint i = 0U;
		i = (guint) 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				GListStore* _tmp2_;
				guint _tmp3_;
				guint _tmp4_;
				BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* configuration = NULL;
				GListStore* _tmp5_;
				GObject* _tmp6_;
				BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* _tmp7_;
				if (!_tmp0_) {
					guint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = self->priv->list_store;
				g_object_get (_tmp2_, "n-items", &_tmp3_, NULL);
				_tmp4_ = _tmp3_;
				if (!(i < _tmp4_)) {
					break;
				}
				_tmp5_ = self->priv->list_store;
				_tmp6_ = g_list_model_get_object ((GListModel*) _tmp5_, i);
				configuration = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_TYPE_CONFIGURATION, BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration);
				_tmp7_ = configuration;
				if (_tmp7_ == NULL) {
					_g_object_unref0 (configuration);
					continue;
				} else {
					BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* _tmp8_;
					_tmp8_ = configuration;
					if (break_timer_settings_widgets_break_configuration_chooser_configuration_matches_breaks (_tmp8_, selected_breaks, (gint) selected_breaks_length1)) {
						_vala_out_position = i;
						result = TRUE;
						_g_object_unref0 (configuration);
						if (out_position) {
							*out_position = _vala_out_position;
						}
						return result;
					}
				}
				_g_object_unref0 (configuration);
			}
		}
	}
	_vala_out_position = GTK_INVALID_LIST_POSITION;
	result = FALSE;
	if (out_position) {
		*out_position = _vala_out_position;
	}
	return result;
}

gchar**
break_timer_settings_widgets_break_configuration_chooser_get_selected_break_ids (BreakTimerSettingsWidgetsBreakConfigurationChooser* self,
                                                                                 gint* result_length1)
{
	gchar** result;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp1_;
	gint _tmp1__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_selected_break_ids;
	_tmp0__length1 = self->priv->_selected_break_ids_length1;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

static gchar**
_vala_array_dup2 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

void
break_timer_settings_widgets_break_configuration_chooser_set_selected_break_ids (BreakTimerSettingsWidgetsBreakConfigurationChooser* self,
                                                                                 gchar** value,
                                                                                 gint value_length1)
{
	gchar** old_value;
	gint old_value_length;
	g_return_if_fail (self != NULL);
	old_value = break_timer_settings_widgets_break_configuration_chooser_get_selected_break_ids (self, &old_value_length);
	if (old_value != value) {
		gchar** _tmp0_;
		gint _tmp0__length1;
		_tmp0_ = (value != NULL) ? _vala_array_dup2 (value, value_length1) : value;
		_tmp0__length1 = value_length1;
		self->priv->_selected_break_ids = (_vala_array_free (self->priv->_selected_break_ids, self->priv->_selected_break_ids_length1, (GDestroyNotify) g_free), NULL);
		self->priv->_selected_break_ids = _tmp0_;
		self->priv->_selected_break_ids_length1 = _tmp0__length1;
		self->priv->__selected_break_ids_size_ = self->priv->_selected_break_ids_length1;
		g_object_notify_by_pspec ((GObject *) self, break_timer_settings_widgets_break_configuration_chooser_properties[BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_SELECTED_BREAK_IDS_PROPERTY]);
	}
}

static inline gpointer
break_timer_settings_widgets_break_configuration_chooser_configuration_get_instance_private (BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* self)
{
	return G_STRUCT_MEMBER_P (self, BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration_private_offset);
}

BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration*
break_timer_settings_widgets_break_configuration_chooser_configuration_construct (GType object_type,
                                                                                  gchar** break_ids,
                                                                                  gint break_ids_length1,
                                                                                  const gchar* label)
{
	BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration * self = NULL;
	g_return_val_if_fail (label != NULL, NULL);
	self = (BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration*) g_object_new (object_type, NULL);
	break_timer_settings_widgets_break_configuration_chooser_configuration_set_break_ids (self, break_ids, break_ids_length1);
	break_timer_settings_widgets_break_configuration_chooser_configuration_set_label (self, label);
	return self;
}

BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration*
break_timer_settings_widgets_break_configuration_chooser_configuration_new (gchar** break_ids,
                                                                            gint break_ids_length1,
                                                                            const gchar* label)
{
	return break_timer_settings_widgets_break_configuration_chooser_configuration_construct (BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_TYPE_CONFIGURATION, break_ids, break_ids_length1, label);
}

static gboolean
_vala_string_array_contains (gchar* * stack,
                             gssize stack_length,
                             const gchar* needle)
{
	gssize i;
	for (i = 0; i < stack_length; i++) {
		if (g_strcmp0 (stack[i], needle) == 0) {
			return TRUE;
		}
	}
	return FALSE;
}

gboolean
break_timer_settings_widgets_break_configuration_chooser_configuration_matches_breaks (BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* self,
                                                                                       gchar** test_break_ids,
                                                                                       gint test_break_ids_length1)
{
	gchar** _tmp0_;
	gint _tmp0__length1;
	gint _tmp1_ = 0;
	gchar** _tmp2_;
	gint _tmp2__length1;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = break_timer_settings_widgets_break_configuration_chooser_configuration_get_break_ids (self, &_tmp1_);
	_tmp0__length1 = _tmp1_;
	_tmp2_ = _tmp0_;
	_tmp2__length1 = _tmp0__length1;
	if (test_break_ids_length1 == _tmp2__length1) {
		{
			gchar** test_break_id_collection = NULL;
			gint test_break_id_collection_length1 = 0;
			gint _test_break_id_collection_size_ = 0;
			gint test_break_id_it = 0;
			test_break_id_collection = test_break_ids;
			test_break_id_collection_length1 = test_break_ids_length1;
			for (test_break_id_it = 0; test_break_id_it < test_break_id_collection_length1; test_break_id_it = test_break_id_it + 1) {
				gchar* _tmp3_;
				gchar* test_break_id = NULL;
				_tmp3_ = g_strdup (test_break_id_collection[test_break_id_it]);
				test_break_id = _tmp3_;
				{
					const gchar* _tmp4_;
					gchar** _tmp5_;
					gint _tmp5__length1;
					gint _tmp6_ = 0;
					gchar** _tmp7_;
					gint _tmp7__length1;
					_tmp4_ = test_break_id;
					_tmp5_ = break_timer_settings_widgets_break_configuration_chooser_configuration_get_break_ids (self, &_tmp6_);
					_tmp5__length1 = _tmp6_;
					_tmp7_ = _tmp5_;
					_tmp7__length1 = _tmp5__length1;
					if (!_vala_string_array_contains (_tmp7_, _tmp7__length1, _tmp4_)) {
						result = FALSE;
						_g_free0 (test_break_id);
						return result;
					}
					_g_free0 (test_break_id);
				}
			}
		}
		result = TRUE;
		return result;
	} else {
		result = FALSE;
		return result;
	}
}

gchar**
break_timer_settings_widgets_break_configuration_chooser_configuration_get_break_ids (BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* self,
                                                                                      gint* result_length1)
{
	gchar** result;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp1_;
	gint _tmp1__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_break_ids;
	_tmp0__length1 = self->priv->_break_ids_length1;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

static gchar**
_vala_array_dup3 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static void
break_timer_settings_widgets_break_configuration_chooser_configuration_set_break_ids (BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* self,
                                                                                      gchar** value,
                                                                                      gint value_length1)
{
	gchar** old_value;
	gint old_value_length;
	g_return_if_fail (self != NULL);
	old_value = break_timer_settings_widgets_break_configuration_chooser_configuration_get_break_ids (self, &old_value_length);
	if (old_value != value) {
		gchar** _tmp0_;
		gint _tmp0__length1;
		_tmp0_ = (value != NULL) ? _vala_array_dup3 (value, value_length1) : value;
		_tmp0__length1 = value_length1;
		self->priv->_break_ids = (_vala_array_free (self->priv->_break_ids, self->priv->_break_ids_length1, (GDestroyNotify) g_free), NULL);
		self->priv->_break_ids = _tmp0_;
		self->priv->_break_ids_length1 = _tmp0__length1;
		self->priv->__break_ids_size_ = self->priv->_break_ids_length1;
		g_object_notify_by_pspec ((GObject *) self, break_timer_settings_widgets_break_configuration_chooser_configuration_properties[BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_BREAK_IDS_PROPERTY]);
	}
}

const gchar*
break_timer_settings_widgets_break_configuration_chooser_configuration_get_label (BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_label;
	result = _tmp0_;
	return result;
}

static void
break_timer_settings_widgets_break_configuration_chooser_configuration_set_label (BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration* self,
                                                                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = break_timer_settings_widgets_break_configuration_chooser_configuration_get_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_label);
		self->priv->_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, break_timer_settings_widgets_break_configuration_chooser_configuration_properties[BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_LABEL_PROPERTY]);
	}
}

static void
break_timer_settings_widgets_break_configuration_chooser_configuration_class_init (BreakTimerSettingsWidgetsBreakConfigurationChooserConfigurationClass * klass,
                                                                                   gpointer klass_data)
{
	break_timer_settings_widgets_break_configuration_chooser_configuration_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_break_timer_settings_widgets_break_configuration_chooser_configuration_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_break_timer_settings_widgets_break_configuration_chooser_configuration_set_property;
	G_OBJECT_CLASS (klass)->finalize = break_timer_settings_widgets_break_configuration_chooser_configuration_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_BREAK_IDS_PROPERTY, break_timer_settings_widgets_break_configuration_chooser_configuration_properties[BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_BREAK_IDS_PROPERTY] = g_param_spec_boxed ("break-ids", "break-ids", "break-ids", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_LABEL_PROPERTY, break_timer_settings_widgets_break_configuration_chooser_configuration_properties[BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_LABEL_PROPERTY] = g_param_spec_string ("label", "label", "label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
break_timer_settings_widgets_break_configuration_chooser_configuration_instance_init (BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration * self,
                                                                                      gpointer klass)
{
	self->priv = break_timer_settings_widgets_break_configuration_chooser_configuration_get_instance_private (self);
}

static void
break_timer_settings_widgets_break_configuration_chooser_configuration_finalize (GObject * obj)
{
	BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_TYPE_CONFIGURATION, BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration);
	self->priv->_break_ids = (_vala_array_free (self->priv->_break_ids, self->priv->_break_ids_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (self->priv->_label);
	G_OBJECT_CLASS (break_timer_settings_widgets_break_configuration_chooser_configuration_parent_class)->finalize (obj);
}

static GType
break_timer_settings_widgets_break_configuration_chooser_configuration_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BreakTimerSettingsWidgetsBreakConfigurationChooserConfigurationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) break_timer_settings_widgets_break_configuration_chooser_configuration_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration), 0, (GInstanceInitFunc) break_timer_settings_widgets_break_configuration_chooser_configuration_instance_init, NULL };
	GType break_timer_settings_widgets_break_configuration_chooser_configuration_type_id;
	break_timer_settings_widgets_break_configuration_chooser_configuration_type_id = g_type_register_static (G_TYPE_OBJECT, "BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration", &g_define_type_info, 0);
	BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration_private_offset = g_type_add_instance_private (break_timer_settings_widgets_break_configuration_chooser_configuration_type_id, sizeof (BreakTimerSettingsWidgetsBreakConfigurationChooserConfigurationPrivate));
	return break_timer_settings_widgets_break_configuration_chooser_configuration_type_id;
}

GType
break_timer_settings_widgets_break_configuration_chooser_configuration_get_type (void)
{
	static volatile gsize break_timer_settings_widgets_break_configuration_chooser_configuration_type_id__once = 0;
	if (g_once_init_enter (&break_timer_settings_widgets_break_configuration_chooser_configuration_type_id__once)) {
		GType break_timer_settings_widgets_break_configuration_chooser_configuration_type_id;
		break_timer_settings_widgets_break_configuration_chooser_configuration_type_id = break_timer_settings_widgets_break_configuration_chooser_configuration_get_type_once ();
		g_once_init_leave (&break_timer_settings_widgets_break_configuration_chooser_configuration_type_id__once, break_timer_settings_widgets_break_configuration_chooser_configuration_type_id);
	}
	return break_timer_settings_widgets_break_configuration_chooser_configuration_type_id__once;
}

static void
_vala_break_timer_settings_widgets_break_configuration_chooser_configuration_get_property (GObject * object,
                                                                                           guint property_id,
                                                                                           GValue * value,
                                                                                           GParamSpec * pspec)
{
	BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_TYPE_CONFIGURATION, BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration);
	switch (property_id) {
		case BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_BREAK_IDS_PROPERTY:
		{
			int length;
			g_value_set_boxed (value, break_timer_settings_widgets_break_configuration_chooser_configuration_get_break_ids (self, &length));
		}
		break;
		case BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_LABEL_PROPERTY:
		g_value_set_string (value, break_timer_settings_widgets_break_configuration_chooser_configuration_get_label (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_break_timer_settings_widgets_break_configuration_chooser_configuration_set_property (GObject * object,
                                                                                           guint property_id,
                                                                                           const GValue * value,
                                                                                           GParamSpec * pspec)
{
	BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_TYPE_CONFIGURATION, BreakTimerSettingsWidgetsBreakConfigurationChooserConfiguration);
	switch (property_id) {
		case BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_BREAK_IDS_PROPERTY:
		{
			gpointer boxed;
			boxed = g_value_get_boxed (value);
			break_timer_settings_widgets_break_configuration_chooser_configuration_set_break_ids (self, boxed, (boxed == NULL) ? 0 : g_strv_length (boxed));
		}
		break;
		case BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_CONFIGURATION_LABEL_PROPERTY:
		break_timer_settings_widgets_break_configuration_chooser_configuration_set_label (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
break_timer_settings_widgets_break_configuration_chooser_class_init (BreakTimerSettingsWidgetsBreakConfigurationChooserClass * klass,
                                                                     gpointer klass_data)
{
	break_timer_settings_widgets_break_configuration_chooser_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BreakTimerSettingsWidgetsBreakConfigurationChooser_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_break_timer_settings_widgets_break_configuration_chooser_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_break_timer_settings_widgets_break_configuration_chooser_set_property;
	G_OBJECT_CLASS (klass)->finalize = break_timer_settings_widgets_break_configuration_chooser_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_SELECTED_BREAK_IDS_PROPERTY, break_timer_settings_widgets_break_configuration_chooser_properties[BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_SELECTED_BREAK_IDS_PROPERTY] = g_param_spec_boxed ("selected-break-ids", "selected-break-ids", "selected-break-ids", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
break_timer_settings_widgets_break_configuration_chooser_instance_init (BreakTimerSettingsWidgetsBreakConfigurationChooser * self,
                                                                        gpointer klass)
{
	self->priv = break_timer_settings_widgets_break_configuration_chooser_get_instance_private (self);
}

static void
break_timer_settings_widgets_break_configuration_chooser_finalize (GObject * obj)
{
	BreakTimerSettingsWidgetsBreakConfigurationChooser * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BREAK_TIMER_SETTINGS_WIDGETS_TYPE_BREAK_CONFIGURATION_CHOOSER, BreakTimerSettingsWidgetsBreakConfigurationChooser);
	_g_object_unref0 (self->priv->list_store);
	self->priv->_selected_break_ids = (_vala_array_free (self->priv->_selected_break_ids, self->priv->_selected_break_ids_length1, (GDestroyNotify) g_free), NULL);
	G_OBJECT_CLASS (break_timer_settings_widgets_break_configuration_chooser_parent_class)->finalize (obj);
}

static GType
break_timer_settings_widgets_break_configuration_chooser_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BreakTimerSettingsWidgetsBreakConfigurationChooserClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) break_timer_settings_widgets_break_configuration_chooser_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BreakTimerSettingsWidgetsBreakConfigurationChooser), 0, (GInstanceInitFunc) break_timer_settings_widgets_break_configuration_chooser_instance_init, NULL };
	GType break_timer_settings_widgets_break_configuration_chooser_type_id;
	break_timer_settings_widgets_break_configuration_chooser_type_id = g_type_register_static (adw_combo_row_get_type (), "BreakTimerSettingsWidgetsBreakConfigurationChooser", &g_define_type_info, 0);
	BreakTimerSettingsWidgetsBreakConfigurationChooser_private_offset = g_type_add_instance_private (break_timer_settings_widgets_break_configuration_chooser_type_id, sizeof (BreakTimerSettingsWidgetsBreakConfigurationChooserPrivate));
	return break_timer_settings_widgets_break_configuration_chooser_type_id;
}

GType
break_timer_settings_widgets_break_configuration_chooser_get_type (void)
{
	static volatile gsize break_timer_settings_widgets_break_configuration_chooser_type_id__once = 0;
	if (g_once_init_enter (&break_timer_settings_widgets_break_configuration_chooser_type_id__once)) {
		GType break_timer_settings_widgets_break_configuration_chooser_type_id;
		break_timer_settings_widgets_break_configuration_chooser_type_id = break_timer_settings_widgets_break_configuration_chooser_get_type_once ();
		g_once_init_leave (&break_timer_settings_widgets_break_configuration_chooser_type_id__once, break_timer_settings_widgets_break_configuration_chooser_type_id);
	}
	return break_timer_settings_widgets_break_configuration_chooser_type_id__once;
}

static void
_vala_break_timer_settings_widgets_break_configuration_chooser_get_property (GObject * object,
                                                                             guint property_id,
                                                                             GValue * value,
                                                                             GParamSpec * pspec)
{
	BreakTimerSettingsWidgetsBreakConfigurationChooser * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BREAK_TIMER_SETTINGS_WIDGETS_TYPE_BREAK_CONFIGURATION_CHOOSER, BreakTimerSettingsWidgetsBreakConfigurationChooser);
	switch (property_id) {
		case BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_SELECTED_BREAK_IDS_PROPERTY:
		{
			int length;
			g_value_set_boxed (value, break_timer_settings_widgets_break_configuration_chooser_get_selected_break_ids (self, &length));
		}
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_break_timer_settings_widgets_break_configuration_chooser_set_property (GObject * object,
                                                                             guint property_id,
                                                                             const GValue * value,
                                                                             GParamSpec * pspec)
{
	BreakTimerSettingsWidgetsBreakConfigurationChooser * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BREAK_TIMER_SETTINGS_WIDGETS_TYPE_BREAK_CONFIGURATION_CHOOSER, BreakTimerSettingsWidgetsBreakConfigurationChooser);
	switch (property_id) {
		case BREAK_TIMER_SETTINGS_WIDGETS_BREAK_CONFIGURATION_CHOOSER_SELECTED_BREAK_IDS_PROPERTY:
		{
			gpointer boxed;
			boxed = g_value_get_boxed (value);
			break_timer_settings_widgets_break_configuration_chooser_set_selected_break_ids (self, boxed, (boxed == NULL) ? 0 : g_strv_length (boxed));
		}
		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);
}

