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

#include <adwaita.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
#include <pango/pango.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 TUBA_WIDGETS_ADMIN_TYPE_DOMAIN_BLOCK (tuba_widgets_admin_domain_block_get_type ())
#define TUBA_WIDGETS_ADMIN_DOMAIN_BLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_ADMIN_TYPE_DOMAIN_BLOCK, TubaWidgetsAdminDomainBlock))
#define TUBA_WIDGETS_ADMIN_DOMAIN_BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_ADMIN_TYPE_DOMAIN_BLOCK, TubaWidgetsAdminDomainBlockClass))
#define TUBA_WIDGETS_ADMIN_IS_DOMAIN_BLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_ADMIN_TYPE_DOMAIN_BLOCK))
#define TUBA_WIDGETS_ADMIN_IS_DOMAIN_BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_ADMIN_TYPE_DOMAIN_BLOCK))
#define TUBA_WIDGETS_ADMIN_DOMAIN_BLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_ADMIN_TYPE_DOMAIN_BLOCK, TubaWidgetsAdminDomainBlockClass))

typedef struct _TubaWidgetsAdminDomainBlock TubaWidgetsAdminDomainBlock;
typedef struct _TubaWidgetsAdminDomainBlockClass TubaWidgetsAdminDomainBlockClass;
typedef struct _TubaWidgetsAdminDomainBlockPrivate TubaWidgetsAdminDomainBlockPrivate;
enum  {
	TUBA_WIDGETS_ADMIN_DOMAIN_BLOCK_0_PROPERTY,
	TUBA_WIDGETS_ADMIN_DOMAIN_BLOCK_NUM_PROPERTIES
};
static GParamSpec* tuba_widgets_admin_domain_block_properties[TUBA_WIDGETS_ADMIN_DOMAIN_BLOCK_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

#define TUBA_TYPE_ENTITY (tuba_entity_get_type ())
#define TUBA_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ENTITY, TubaEntity))
#define TUBA_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ENTITY, TubaEntityClass))
#define TUBA_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ENTITY))
#define TUBA_IS_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ENTITY))
#define TUBA_ENTITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ENTITY, TubaEntityClass))

typedef struct _TubaEntity TubaEntity;
typedef struct _TubaEntityClass TubaEntityClass;

#define TUBA_API_ADMIN_TYPE_DOMAIN_BLOCK (tuba_api_admin_domain_block_get_type ())
#define TUBA_API_ADMIN_DOMAIN_BLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_ADMIN_TYPE_DOMAIN_BLOCK, TubaAPIAdminDomainBlock))
#define TUBA_API_ADMIN_DOMAIN_BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_ADMIN_TYPE_DOMAIN_BLOCK, TubaAPIAdminDomainBlockClass))
#define TUBA_API_ADMIN_IS_DOMAIN_BLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_ADMIN_TYPE_DOMAIN_BLOCK))
#define TUBA_API_ADMIN_IS_DOMAIN_BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_ADMIN_TYPE_DOMAIN_BLOCK))
#define TUBA_API_ADMIN_DOMAIN_BLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_ADMIN_TYPE_DOMAIN_BLOCK, TubaAPIAdminDomainBlockClass))

typedef struct _TubaAPIAdminDomainBlock TubaAPIAdminDomainBlock;
typedef struct _TubaAPIAdminDomainBlockClass TubaAPIAdminDomainBlockClass;
typedef enum  {
	TUBA_API_ADMIN_DOMAIN_BLOCK_SEVERITY_NOOP,
	TUBA_API_ADMIN_DOMAIN_BLOCK_SEVERITY_SILENCE,
	TUBA_API_ADMIN_DOMAIN_BLOCK_SEVERITY_SUSPEND
} TubaAPIAdminDomainBlockSeverity;

#define TUBA_API_ADMIN_DOMAIN_BLOCK_TYPE_SEVERITY (tuba_api_admin_domain_block_severity_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	TUBA_WIDGETS_ADMIN_DOMAIN_BLOCK_REMOVED_SIGNAL,
	TUBA_WIDGETS_ADMIN_DOMAIN_BLOCK_NUM_SIGNALS
};
static guint tuba_widgets_admin_domain_block_signals[TUBA_WIDGETS_ADMIN_DOMAIN_BLOCK_NUM_SIGNALS] = {0};

struct _TubaWidgetsAdminDomainBlock {
	AdwExpanderRow parent_instance;
	TubaWidgetsAdminDomainBlockPrivate * priv;
};

struct _TubaWidgetsAdminDomainBlockClass {
	AdwExpanderRowClass parent_class;
};

struct _TubaWidgetsAdminDomainBlockPrivate {
	gchar* federation_block_id;
};

static gint TubaWidgetsAdminDomainBlock_private_offset;
static gpointer tuba_widgets_admin_domain_block_parent_class = NULL;

VALA_EXTERN GType tuba_widgets_admin_domain_block_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsAdminDomainBlock, g_object_unref)
VALA_EXTERN GType tuba_entity_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaEntity, g_object_unref)
VALA_EXTERN GType tuba_api_admin_domain_block_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAdminDomainBlock, g_object_unref)
VALA_EXTERN TubaWidgetsAdminDomainBlock* tuba_widgets_admin_domain_block_new (TubaAPIAdminDomainBlock* federation_block);
VALA_EXTERN TubaWidgetsAdminDomainBlock* tuba_widgets_admin_domain_block_construct (GType object_type,
                                                                        TubaAPIAdminDomainBlock* federation_block);
VALA_EXTERN const gchar* tuba_api_admin_domain_block_get_id (TubaAPIAdminDomainBlock* self);
VALA_EXTERN const gchar* tuba_api_admin_domain_block_get_domain (TubaAPIAdminDomainBlock* self);
VALA_EXTERN GType tuba_api_admin_domain_block_severity_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaAPIAdminDomainBlockSeverity tuba_api_admin_domain_block_severity_from_string (const gchar* severity);
VALA_EXTERN const gchar* tuba_api_admin_domain_block_get_severity (TubaAPIAdminDomainBlock* self);
VALA_EXTERN gchar* tuba_api_admin_domain_block_severity_to_string (TubaAPIAdminDomainBlockSeverity self);
VALA_EXTERN const gchar* tuba_api_admin_domain_block_get_private_comment (TubaAPIAdminDomainBlock* self);
static void tuba_widgets_admin_domain_block_add_expander_row_label (TubaWidgetsAdminDomainBlock* self,
                                                             const gchar* label);
VALA_EXTERN const gchar* tuba_api_admin_domain_block_get_public_comment (TubaAPIAdminDomainBlock* self);
VALA_EXTERN gboolean tuba_api_admin_domain_block_get_reject_media (TubaAPIAdminDomainBlock* self);
static void _vala_array_add155 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
VALA_EXTERN gboolean tuba_api_admin_domain_block_get_reject_reports (TubaAPIAdminDomainBlock* self);
static void _vala_array_add156 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
VALA_EXTERN gboolean tuba_api_admin_domain_block_get_obfuscate (TubaAPIAdminDomainBlock* self);
static void _vala_array_add157 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
VALA_EXTERN void tuba_widgets_admin_domain_block_on_remove (TubaWidgetsAdminDomainBlock* self);
static void _tuba_widgets_admin_domain_block_on_remove_gtk_button_clicked (GtkButton* _sender,
                                                                    gpointer self);
static void tuba_widgets_admin_domain_block_finalize (GObject * obj);
static GType tuba_widgets_admin_domain_block_get_type_once (void);
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
tuba_widgets_admin_domain_block_get_instance_private (TubaWidgetsAdminDomainBlock* self)
{
	return G_STRUCT_MEMBER_P (self, TubaWidgetsAdminDomainBlock_private_offset);
}

static void
_vala_array_add155 (gchar** * array,
                    gint* length,
                    gint* size,
                    gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add156 (gchar** * array,
                    gint* length,
                    gint* size,
                    gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add157 (gchar** * array,
                    gint* length,
                    gint* size,
                    gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static gchar*
_vala_g_strjoinv (const gchar* separator,
                  gchar** str_array,
                  gint str_array_length1)
{
	gboolean _tmp0_ = FALSE;
	gchar* result;
	if (separator == NULL) {
		separator = "";
	}
	if (str_array != NULL) {
		gboolean _tmp1_ = FALSE;
		if (str_array_length1 > 0) {
			_tmp1_ = TRUE;
		} else {
			gboolean _tmp2_ = FALSE;
			if (str_array_length1 == -1) {
				const gchar* _tmp3_;
				_tmp3_ = str_array[0];
				_tmp2_ = _tmp3_ != NULL;
			} else {
				_tmp2_ = FALSE;
			}
			_tmp1_ = _tmp2_;
		}
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint i = 0;
		gsize len = 0UL;
		gint _tmp16_;
		gint _tmp17_;
		const gchar* res = NULL;
		void* _tmp18_;
		const gchar* _tmp19_ = NULL;
		const gchar* _tmp20_;
		void* ptr = NULL;
		const gchar* _tmp22_;
		void* _tmp23_;
		const gchar* _tmp33_;
		len = (gsize) 1;
		{
			gboolean _tmp4_ = FALSE;
			i = 0;
			_tmp4_ = TRUE;
			while (TRUE) {
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				gint _tmp10_ = 0;
				const gchar* _tmp11_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				if (str_array_length1 != -1) {
					_tmp7_ = i < str_array_length1;
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					_tmp6_ = TRUE;
				} else {
					gboolean _tmp8_ = FALSE;
					if (str_array_length1 == -1) {
						const gchar* _tmp9_;
						_tmp9_ = str_array[i];
						_tmp8_ = _tmp9_ != NULL;
					} else {
						_tmp8_ = FALSE;
					}
					_tmp6_ = _tmp8_;
				}
				if (!_tmp6_) {
					break;
				}
				_tmp11_ = str_array[i];
				if (_tmp11_ != NULL) {
					const gchar* _tmp12_;
					gint _tmp13_;
					gint _tmp14_;
					_tmp12_ = str_array[i];
					_tmp13_ = strlen ((const gchar*) _tmp12_);
					_tmp14_ = _tmp13_;
					_tmp10_ = _tmp14_;
				} else {
					_tmp10_ = 0;
				}
				len += (gsize) _tmp10_;
			}
		}
		if (i == 0) {
			gchar* _tmp15_;
			_tmp15_ = g_strdup ("");
			result = _tmp15_;
			return result;
		}
		str_array_length1 = i;
		_tmp16_ = strlen ((const gchar*) separator);
		_tmp17_ = _tmp16_;
		len += (gsize) (_tmp17_ * (i - 1));
		_tmp18_ = g_malloc (len);
		res = _tmp18_;
		_tmp20_ = str_array[0];
		if (_tmp20_ != NULL) {
			const gchar* _tmp21_;
			_tmp21_ = str_array[0];
			_tmp19_ = (const gchar*) _tmp21_;
		} else {
			_tmp19_ = "";
		}
		_tmp22_ = res;
		_tmp23_ = g_stpcpy ((void*) _tmp22_, _tmp19_);
		ptr = _tmp23_;
		{
			gboolean _tmp24_ = FALSE;
			i = 1;
			_tmp24_ = TRUE;
			while (TRUE) {
				void* _tmp26_;
				void* _tmp27_;
				const gchar* _tmp28_ = NULL;
				const gchar* _tmp29_;
				void* _tmp31_;
				void* _tmp32_;
				if (!_tmp24_) {
					gint _tmp25_;
					_tmp25_ = i;
					i = _tmp25_ + 1;
				}
				_tmp24_ = FALSE;
				if (!(i < str_array_length1)) {
					break;
				}
				_tmp26_ = ptr;
				_tmp27_ = g_stpcpy (_tmp26_, (const gchar*) separator);
				ptr = _tmp27_;
				_tmp29_ = str_array[i];
				if (_tmp29_ != NULL) {
					const gchar* _tmp30_;
					_tmp30_ = str_array[i];
					_tmp28_ = (const gchar*) _tmp30_;
				} else {
					_tmp28_ = "";
				}
				_tmp31_ = ptr;
				_tmp32_ = g_stpcpy (_tmp31_, _tmp28_);
				ptr = _tmp32_;
			}
		}
		_tmp33_ = res;
		res = NULL;
		result = (gchar*) _tmp33_;
		return result;
	} else {
		gchar* _tmp34_;
		_tmp34_ = g_strdup ("");
		result = _tmp34_;
		return result;
	}
}

static void
_tuba_widgets_admin_domain_block_on_remove_gtk_button_clicked (GtkButton* _sender,
                                                               gpointer self)
{
	tuba_widgets_admin_domain_block_on_remove ((TubaWidgetsAdminDomainBlock*) self);
}

TubaWidgetsAdminDomainBlock*
tuba_widgets_admin_domain_block_construct (GType object_type,
                                           TubaAPIAdminDomainBlock* federation_block)
{
	TubaWidgetsAdminDomainBlock * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	const gchar* _tmp9_ = NULL;
	gboolean _tmp10_ = FALSE;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	const gchar* _tmp19_ = NULL;
	gboolean _tmp20_ = FALSE;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar** rules = NULL;
	gchar** _tmp29_;
	gint rules_length1;
	gint _rules_size_;
	gboolean _tmp30_;
	gboolean _tmp31_;
	gboolean _tmp33_;
	gboolean _tmp34_;
	gboolean _tmp36_;
	gboolean _tmp37_;
	gchar** _tmp39_;
	gint _tmp39__length1;
	GtkButton* delete_button = NULL;
	gchar* _tmp45_;
	gchar* _tmp46_;
	gchar* _tmp47_;
	gchar** _tmp48_;
	gchar* _tmp49_;
	GtkButton* _tmp50_ = NULL;
	g_return_val_if_fail (federation_block != NULL, NULL);
	self = (TubaWidgetsAdminDomainBlock*) g_object_new (object_type, NULL);
	_tmp0_ = tuba_api_admin_domain_block_get_id (federation_block);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (self->priv->federation_block_id);
	self->priv->federation_block_id = _tmp2_;
	gtk_widget_set_overflow ((GtkWidget*) self, GTK_OVERFLOW_HIDDEN);
	_tmp3_ = tuba_api_admin_domain_block_get_domain (federation_block);
	_tmp4_ = _tmp3_;
	adw_preferences_row_set_title ((AdwPreferencesRow*) self, _tmp4_);
	_tmp5_ = tuba_api_admin_domain_block_get_severity (federation_block);
	_tmp6_ = _tmp5_;
	_tmp7_ = tuba_api_admin_domain_block_severity_to_string (tuba_api_admin_domain_block_severity_from_string (_tmp6_));
	_tmp8_ = _tmp7_;
	adw_expander_row_set_subtitle ((AdwExpanderRow*) self, _tmp8_);
	_g_free0 (_tmp8_);
	_tmp11_ = tuba_api_admin_domain_block_get_private_comment (federation_block);
	_tmp12_ = _tmp11_;
	if (_tmp12_ == NULL) {
		_tmp10_ = TRUE;
	} else {
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		_tmp13_ = tuba_api_admin_domain_block_get_private_comment (federation_block);
		_tmp14_ = _tmp13_;
		_tmp10_ = g_strcmp0 (_tmp14_, "") == 0;
	}
	if (_tmp10_) {
		_tmp9_ = _ ("None");
	} else {
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		_tmp15_ = tuba_api_admin_domain_block_get_private_comment (federation_block);
		_tmp16_ = _tmp15_;
		_tmp9_ = _tmp16_;
	}
	_tmp17_ = g_strdup_printf ("<b>%s</b>: %s", _ ("Private Comment"), _tmp9_);
	_tmp18_ = _tmp17_;
	tuba_widgets_admin_domain_block_add_expander_row_label (self, _tmp18_);
	_g_free0 (_tmp18_);
	_tmp21_ = tuba_api_admin_domain_block_get_public_comment (federation_block);
	_tmp22_ = _tmp21_;
	if (_tmp22_ == NULL) {
		_tmp20_ = TRUE;
	} else {
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		_tmp23_ = tuba_api_admin_domain_block_get_public_comment (federation_block);
		_tmp24_ = _tmp23_;
		_tmp20_ = g_strcmp0 (_tmp24_, "") == 0;
	}
	if (_tmp20_) {
		_tmp19_ = _ ("None");
	} else {
		const gchar* _tmp25_;
		const gchar* _tmp26_;
		_tmp25_ = tuba_api_admin_domain_block_get_public_comment (federation_block);
		_tmp26_ = _tmp25_;
		_tmp19_ = _tmp26_;
	}
	_tmp27_ = g_strdup_printf ("<b>%s</b>: %s", _ ("Public Comment"), _tmp19_);
	_tmp28_ = _tmp27_;
	tuba_widgets_admin_domain_block_add_expander_row_label (self, _tmp28_);
	_g_free0 (_tmp28_);
	_tmp29_ = g_new0 (gchar*, 0 + 1);
	rules = _tmp29_;
	rules_length1 = 0;
	_rules_size_ = rules_length1;
	_tmp30_ = tuba_api_admin_domain_block_get_reject_media (federation_block);
	_tmp31_ = _tmp30_;
	if (_tmp31_) {
		gchar* _tmp32_;
		_tmp32_ = g_strdup (_ ("Reject Media Files"));
		_vala_array_add155 (&rules, &rules_length1, &_rules_size_, _tmp32_);
	}
	_tmp33_ = tuba_api_admin_domain_block_get_reject_reports (federation_block);
	_tmp34_ = _tmp33_;
	if (_tmp34_) {
		gchar* _tmp35_;
		_tmp35_ = g_strdup (_ ("Reject Reports"));
		_vala_array_add156 (&rules, &rules_length1, &_rules_size_, _tmp35_);
	}
	_tmp36_ = tuba_api_admin_domain_block_get_obfuscate (federation_block);
	_tmp37_ = _tmp36_;
	if (_tmp37_) {
		gchar* _tmp38_;
		_tmp38_ = g_strdup (_ ("Obfuscate Domain Name"));
		_vala_array_add157 (&rules, &rules_length1, &_rules_size_, _tmp38_);
	}
	_tmp39_ = rules;
	_tmp39__length1 = rules_length1;
	if (_tmp39__length1 > 0) {
		gchar** _tmp40_;
		gint _tmp40__length1;
		gchar* _tmp41_;
		gchar* _tmp42_;
		gchar* _tmp43_;
		gchar* _tmp44_;
		_tmp40_ = rules;
		_tmp40__length1 = rules_length1;
		_tmp41_ = _vala_g_strjoinv ("·", _tmp40_, (gint) _tmp40__length1);
		_tmp42_ = _tmp41_;
		_tmp43_ = g_strdup_printf ("<b>%s</b>", _tmp42_);
		_tmp44_ = _tmp43_;
		tuba_widgets_admin_domain_block_add_expander_row_label (self, _tmp44_);
		_g_free0 (_tmp44_);
		_g_free0 (_tmp42_);
	}
	_tmp45_ = g_strdup ("circular");
	_tmp46_ = g_strdup ("flat");
	_tmp47_ = g_strdup ("error");
	_tmp48_ = g_new0 (gchar*, 3 + 1);
	_tmp48_[0] = _tmp45_;
	_tmp48_[1] = _tmp46_;
	_tmp48_[2] = _tmp47_;
	_tmp49_ = g_strdup (_ ("Delete"));
	_tmp50_ = (GtkButton*) gtk_button_new_from_icon_name ("user-trash-symbolic");
	gtk_widget_set_css_classes ((GtkWidget*) _tmp50_, _tmp48_);
	_tmp48_ = (_vala_array_free (_tmp48_, 3, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp50_, _tmp49_);
	_g_free0 (_tmp49_);
	gtk_widget_set_valign ((GtkWidget*) _tmp50_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp50_);
	delete_button = _tmp50_;
	g_signal_connect_object (delete_button, "clicked", (GCallback) _tuba_widgets_admin_domain_block_on_remove_gtk_button_clicked, self, 0);
	adw_expander_row_add_suffix ((AdwExpanderRow*) self, (GtkWidget*) delete_button);
	_g_object_unref0 (delete_button);
	rules = (_vala_array_free (rules, rules_length1, (GDestroyNotify) g_free), NULL);
	return self;
}

TubaWidgetsAdminDomainBlock*
tuba_widgets_admin_domain_block_new (TubaAPIAdminDomainBlock* federation_block)
{
	return tuba_widgets_admin_domain_block_construct (TUBA_WIDGETS_ADMIN_TYPE_DOMAIN_BLOCK, federation_block);
}

static void
tuba_widgets_admin_domain_block_add_expander_row_label (TubaWidgetsAdminDomainBlock* self,
                                                        const gchar* label)
{
	GtkLabel* _tmp0_ = NULL;
	GtkLabel* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (label != NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (label);
	gtk_label_set_wrap (_tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, 0.0f);
	gtk_label_set_wrap_mode (_tmp0_, PANGO_WRAP_WORD_CHAR);
	gtk_label_set_use_markup (_tmp0_, TRUE);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp0_, 8);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp0_, 8);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp0_, 8);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp0_, 8);
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	adw_expander_row_add_row ((AdwExpanderRow*) self, (GtkWidget*) _tmp1_);
	_g_object_unref0 (_tmp1_);
}

void
tuba_widgets_admin_domain_block_on_remove (TubaWidgetsAdminDomainBlock* self)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->federation_block_id;
	g_signal_emit (self, tuba_widgets_admin_domain_block_signals[TUBA_WIDGETS_ADMIN_DOMAIN_BLOCK_REMOVED_SIGNAL], 0, _tmp0_);
}

static void
tuba_widgets_admin_domain_block_class_init (TubaWidgetsAdminDomainBlockClass * klass,
                                            gpointer klass_data)
{
	tuba_widgets_admin_domain_block_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaWidgetsAdminDomainBlock_private_offset);
	G_OBJECT_CLASS (klass)->finalize = tuba_widgets_admin_domain_block_finalize;
	tuba_widgets_admin_domain_block_signals[TUBA_WIDGETS_ADMIN_DOMAIN_BLOCK_REMOVED_SIGNAL] = g_signal_new ("removed", TUBA_WIDGETS_ADMIN_TYPE_DOMAIN_BLOCK, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
}

static void
tuba_widgets_admin_domain_block_instance_init (TubaWidgetsAdminDomainBlock * self,
                                               gpointer klass)
{
	self->priv = tuba_widgets_admin_domain_block_get_instance_private (self);
}

static void
tuba_widgets_admin_domain_block_finalize (GObject * obj)
{
	TubaWidgetsAdminDomainBlock * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_WIDGETS_ADMIN_TYPE_DOMAIN_BLOCK, TubaWidgetsAdminDomainBlock);
	g_debug ("DomainBlock.vala:5: Destroying DomainBlock");
	_g_free0 (self->priv->federation_block_id);
	G_OBJECT_CLASS (tuba_widgets_admin_domain_block_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_widgets_admin_domain_block_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaWidgetsAdminDomainBlockClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_widgets_admin_domain_block_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaWidgetsAdminDomainBlock), 0, (GInstanceInitFunc) tuba_widgets_admin_domain_block_instance_init, NULL };
	GType tuba_widgets_admin_domain_block_type_id;
	tuba_widgets_admin_domain_block_type_id = g_type_register_static (adw_expander_row_get_type (), "TubaWidgetsAdminDomainBlock", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaWidgetsAdminDomainBlock_private_offset = g_type_add_instance_private (tuba_widgets_admin_domain_block_type_id, sizeof (TubaWidgetsAdminDomainBlockPrivate));
	return tuba_widgets_admin_domain_block_type_id;
}

GType
tuba_widgets_admin_domain_block_get_type (void)
{
	static GType tuba_widgets_admin_domain_block_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_widgets_admin_domain_block_type_id__once)) {
		GType tuba_widgets_admin_domain_block_type_id;
		tuba_widgets_admin_domain_block_type_id = tuba_widgets_admin_domain_block_get_type_once ();
		g_once_init_leave_pointer (&tuba_widgets_admin_domain_block_type_id__once, tuba_widgets_admin_domain_block_type_id);
	}
	return tuba_widgets_admin_domain_block_type_id__once;
}

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

