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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <adwaita.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.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_TYPE_PROFILE_FILTER_GROUP (tuba_widgets_profile_filter_group_get_type ())
#define TUBA_WIDGETS_PROFILE_FILTER_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_PROFILE_FILTER_GROUP, TubaWidgetsProfileFilterGroup))
#define TUBA_WIDGETS_PROFILE_FILTER_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_PROFILE_FILTER_GROUP, TubaWidgetsProfileFilterGroupClass))
#define TUBA_WIDGETS_IS_PROFILE_FILTER_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_PROFILE_FILTER_GROUP))
#define TUBA_WIDGETS_IS_PROFILE_FILTER_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_PROFILE_FILTER_GROUP))
#define TUBA_WIDGETS_PROFILE_FILTER_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_PROFILE_FILTER_GROUP, TubaWidgetsProfileFilterGroupClass))

typedef struct _TubaWidgetsProfileFilterGroup TubaWidgetsProfileFilterGroup;
typedef struct _TubaWidgetsProfileFilterGroupClass TubaWidgetsProfileFilterGroupClass;
typedef struct _TubaWidgetsProfileFilterGroupPrivate TubaWidgetsProfileFilterGroupPrivate;
enum  {
	TUBA_WIDGETS_PROFILE_FILTER_GROUP_0_PROPERTY,
	TUBA_WIDGETS_PROFILE_FILTER_GROUP_NUM_PROPERTIES
};
static GParamSpec* tuba_widgets_profile_filter_group_properties[TUBA_WIDGETS_PROFILE_FILTER_GROUP_NUM_PROPERTIES];
typedef enum  {
	TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_POSTS,
	TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_REPLIES,
	TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_MEDIA,
	TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_FEATURED
} TubaWidgetsProfileFilterGroupFilter;

#define TUBA_WIDGETS_PROFILE_FILTER_GROUP_TYPE_FILTER (tuba_widgets_profile_filter_group_filter_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TUBA_TYPE_ACCOUNT_STORE (tuba_account_store_get_type ())
#define TUBA_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStore))
#define TUBA_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))
#define TUBA_IS_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_IS_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_ACCOUNT_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))

typedef struct _TubaAccountStore TubaAccountStore;
typedef struct _TubaAccountStoreClass TubaAccountStoreClass;

#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_TYPE_ACCOUNT (tuba_api_account_get_type ())
#define TUBA_API_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccount))
#define TUBA_API_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))
#define TUBA_API_IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))

typedef struct _TubaAPIAccount TubaAPIAccount;
typedef struct _TubaAPIAccountClass TubaAPIAccountClass;

#define TUBA_TYPE_INSTANCE_ACCOUNT (tuba_instance_account_get_type ())
#define TUBA_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccount))
#define TUBA_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))
#define TUBA_IS_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_IS_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_INSTANCE_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))

typedef struct _TubaInstanceAccount TubaInstanceAccount;
typedef struct _TubaInstanceAccountClass TubaInstanceAccountClass;

#define TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS (tuba_api_instance_v2_api_versions_get_type ())
#define TUBA_API_INSTANCE_V2_API_VERSIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS, TubaAPIInstanceV2APIVersions))
#define TUBA_API_INSTANCE_V2_API_VERSIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS, TubaAPIInstanceV2APIVersionsClass))
#define TUBA_API_INSTANCE_V2_IS_API_VERSIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS))
#define TUBA_API_INSTANCE_V2_IS_API_VERSIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS))
#define TUBA_API_INSTANCE_V2_API_VERSIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS, TubaAPIInstanceV2APIVersionsClass))

typedef struct _TubaAPIInstanceV2APIVersions TubaAPIInstanceV2APIVersions;
typedef struct _TubaAPIInstanceV2APIVersionsClass TubaAPIInstanceV2APIVersionsClass;
typedef enum  {
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_NONE = 1 << 0,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_QUOTE = 1 << 1,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_EMOJI_REACTIONS = 1 << 2,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_BUBBLE = 1 << 3,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GROUP_NOTIFICATIONS = 1 << 4,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_FEATURE_TAGS = 1 << 5,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ENDORSE_USERS = 1 << 6,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_MUTUALS = 1 << 7,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_TRANSLATION = 1 << 8,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ICESHRIMP = 1 << 9,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GLITCH = 1 << 10,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_LOCAL_ONLY = 1 << 11,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GOTOSOCIAL = 1 << 12
} TubaInstanceAccountInstanceFeatures;

#define TUBA_INSTANCE_ACCOUNT_TYPE_INSTANCE_FEATURES (tuba_instance_account_instance_features_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_CHANGE_SIGNAL,
	TUBA_WIDGETS_PROFILE_FILTER_GROUP_NUM_SIGNALS
};
static guint tuba_widgets_profile_filter_group_signals[TUBA_WIDGETS_PROFILE_FILTER_GROUP_NUM_SIGNALS] = {0};

struct _TubaWidgetsProfileFilterGroup {
	GtkListBoxRow parent_instance;
	TubaWidgetsProfileFilterGroupPrivate * priv;
};

struct _TubaWidgetsProfileFilterGroupClass {
	GtkListBoxRowClass parent_class;
};

struct _TubaWidgetsProfileFilterGroupPrivate {
	AdwToggleGroup* toggle_group;
};

static gint TubaWidgetsProfileFilterGroup_private_offset;
static gpointer tuba_widgets_profile_filter_group_parent_class = NULL;
VALA_EXTERN TubaAccountStore* tuba_accounts;

VALA_EXTERN GType tuba_widgets_profile_filter_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsProfileFilterGroup, g_object_unref)
VALA_EXTERN GType tuba_widgets_profile_filter_group_filter_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gchar* tuba_widgets_profile_filter_group_filter_to_string (TubaWidgetsProfileFilterGroupFilter self);
VALA_EXTERN TubaWidgetsProfileFilterGroupFilter tuba_widgets_profile_filter_group_filter_from_string (const gchar* filter);
VALA_EXTERN TubaWidgetsProfileFilterGroup* tuba_widgets_profile_filter_group_new (gboolean show_media,
                                                                      gboolean show_featured);
VALA_EXTERN TubaWidgetsProfileFilterGroup* tuba_widgets_profile_filter_group_construct (GType object_type,
                                                                            gboolean show_media,
                                                                            gboolean show_featured);
VALA_EXTERN GType tuba_account_store_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAccountStore, 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_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccount, g_object_unref)
VALA_EXTERN GType tuba_instance_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccount, g_object_unref)
VALA_EXTERN TubaInstanceAccount* tuba_account_store_get_active (TubaAccountStore* self);
VALA_EXTERN GType tuba_api_instance_v2_api_versions_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIInstanceV2APIVersions, g_object_unref)
VALA_EXTERN TubaAPIInstanceV2APIVersions* tuba_instance_account_get_tuba_api_versions (TubaInstanceAccount* self);
VALA_EXTERN gint8 tuba_api_instance_v2_api_versions_get_mastodon (TubaAPIInstanceV2APIVersions* self);
VALA_EXTERN GType tuba_instance_account_instance_features_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaInstanceAccountInstanceFeatures tuba_instance_account_get_tuba_instance_features (TubaInstanceAccount* self);
static void tuba_widgets_profile_filter_group_on_active_changed (TubaWidgetsProfileFilterGroup* self);
static void _tuba_widgets_profile_filter_group_on_active_changed_g_object_notify (GObject* _sender,
                                                                           GParamSpec* pspec,
                                                                           gpointer self);
static void tuba_widgets_profile_filter_group_finalize (GObject * obj);
static GType tuba_widgets_profile_filter_group_get_type_once (void);

static inline gpointer
tuba_widgets_profile_filter_group_get_instance_private (TubaWidgetsProfileFilterGroup* self)
{
	return G_STRUCT_MEMBER_P (self, TubaWidgetsProfileFilterGroup_private_offset);
}

gchar*
tuba_widgets_profile_filter_group_filter_to_string (TubaWidgetsProfileFilterGroupFilter self)
{
	gchar* result;
	switch (self) {
		case TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_POSTS:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("posts");
			result = _tmp0_;
			return result;
		}
		case TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_REPLIES:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("replies");
			result = _tmp1_;
			return result;
		}
		case TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_FEATURED:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("featured");
			result = _tmp2_;
			return result;
		}
		default:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("media");
			result = _tmp3_;
			return result;
		}
	}
}

TubaWidgetsProfileFilterGroupFilter
tuba_widgets_profile_filter_group_filter_from_string (const gchar* filter)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	TubaWidgetsProfileFilterGroupFilter result;
	g_return_val_if_fail (filter != NULL, 0);
	_tmp0_ = filter;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("posts")))) {
		switch (0) {
			default:
			{
				result = TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_POSTS;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("replies")))) {
		switch (0) {
			default:
			{
				result = TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_REPLIES;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("featured")))) {
		switch (0) {
			default:
			{
				result = TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_FEATURED;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_MEDIA;
				return result;
			}
		}
	}
}

 G_GNUC_NO_INLINE static GType
tuba_widgets_profile_filter_group_filter_get_type_once (void)
{
	static const GEnumValue values[] = {{TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_POSTS, "TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_POSTS", "posts"}, {TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_REPLIES, "TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_REPLIES", "replies"}, {TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_MEDIA, "TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_MEDIA", "media"}, {TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_FEATURED, "TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_FEATURED", "featured"}, {0, NULL, NULL}};
	GType tuba_widgets_profile_filter_group_filter_type_id;
	tuba_widgets_profile_filter_group_filter_type_id = g_enum_register_static ("TubaWidgetsProfileFilterGroupFilter", values);
	return tuba_widgets_profile_filter_group_filter_type_id;
}

GType
tuba_widgets_profile_filter_group_filter_get_type (void)
{
	static GType tuba_widgets_profile_filter_group_filter_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_widgets_profile_filter_group_filter_type_id__once)) {
		GType tuba_widgets_profile_filter_group_filter_type_id;
		tuba_widgets_profile_filter_group_filter_type_id = tuba_widgets_profile_filter_group_filter_get_type_once ();
		g_once_init_leave_pointer (&tuba_widgets_profile_filter_group_filter_type_id__once, tuba_widgets_profile_filter_group_filter_type_id);
	}
	return tuba_widgets_profile_filter_group_filter_type_id__once;
}

static void
_tuba_widgets_profile_filter_group_on_active_changed_g_object_notify (GObject* _sender,
                                                                      GParamSpec* pspec,
                                                                      gpointer self)
{
	tuba_widgets_profile_filter_group_on_active_changed ((TubaWidgetsProfileFilterGroup*) self);
}

TubaWidgetsProfileFilterGroup*
tuba_widgets_profile_filter_group_construct (GType object_type,
                                             gboolean show_media,
                                             gboolean show_featured)
{
	TubaWidgetsProfileFilterGroup * self = NULL;
	AdwToggleGroup* _tmp0_;
	AdwToggleGroup* _tmp1_;
	gboolean set_active_manually = FALSE;
	gboolean _tmp2_ = FALSE;
	AdwToggleGroup* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	AdwToggle* _tmp23_ = NULL;
	AdwToggleGroup* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	AdwToggle* _tmp27_ = NULL;
	AdwToggleGroup* _tmp33_;
	self = (TubaWidgetsProfileFilterGroup*) g_object_new (object_type, NULL);
	_tmp0_ = (AdwToggleGroup*) adw_toggle_group_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->toggle_group);
	self->priv->toggle_group = _tmp0_;
	gtk_widget_set_focusable ((GtkWidget*) self, TRUE);
	gtk_list_box_row_set_activatable ((GtkListBoxRow*) self, FALSE);
	_tmp1_ = self->priv->toggle_group;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp1_);
	gtk_widget_add_css_class ((GtkWidget*) self, "toggle-group-17");
	set_active_manually = FALSE;
	if (show_featured) {
		gboolean _tmp3_ = FALSE;
		TubaAccountStore* _tmp4_;
		TubaInstanceAccount* _tmp5_;
		TubaInstanceAccount* _tmp6_;
		TubaAPIInstanceV2APIVersions* _tmp7_;
		TubaAPIInstanceV2APIVersions* _tmp8_;
		gint8 _tmp9_;
		gint8 _tmp10_;
		_tmp4_ = tuba_accounts;
		_tmp5_ = tuba_account_store_get_active (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = tuba_instance_account_get_tuba_api_versions (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = tuba_api_instance_v2_api_versions_get_mastodon (_tmp8_);
		_tmp10_ = _tmp9_;
		if (((gint) _tmp10_) > 5) {
			_tmp3_ = TRUE;
		} else {
			TubaAccountStore* _tmp11_;
			TubaInstanceAccount* _tmp12_;
			TubaInstanceAccount* _tmp13_;
			TubaInstanceAccountInstanceFeatures _tmp14_;
			TubaInstanceAccountInstanceFeatures _tmp15_;
			_tmp11_ = tuba_accounts;
			_tmp12_ = tuba_account_store_get_active (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = tuba_instance_account_get_tuba_instance_features (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp3_ = (_tmp15_ & TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ENDORSE_USERS) == TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ENDORSE_USERS;
		}
		_tmp2_ = _tmp3_;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		AdwToggleGroup* _tmp16_;
		gchar* _tmp17_;
		gchar* _tmp18_;
		AdwToggle* _tmp19_ = NULL;
		_tmp16_ = self->priv->toggle_group;
		_tmp17_ = g_strdup (_ ("Featured"));
		_tmp18_ = tuba_widgets_profile_filter_group_filter_to_string (TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_FEATURED);
		_tmp19_ = adw_toggle_new ();
		adw_toggle_set_label (_tmp19_, _tmp17_);
		_g_free0 (_tmp17_);
		adw_toggle_set_name (_tmp19_, _tmp18_);
		_g_free0 (_tmp18_);
		adw_toggle_group_add (_tmp16_, _tmp19_);
		set_active_manually = TRUE;
	}
	_tmp20_ = self->priv->toggle_group;
	_tmp21_ = g_strdup (_ ("Posts"));
	_tmp22_ = tuba_widgets_profile_filter_group_filter_to_string (TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_POSTS);
	_tmp23_ = adw_toggle_new ();
	adw_toggle_set_label (_tmp23_, _tmp21_);
	_g_free0 (_tmp21_);
	adw_toggle_set_name (_tmp23_, _tmp22_);
	_g_free0 (_tmp22_);
	adw_toggle_set_enabled (_tmp23_, TRUE);
	adw_toggle_group_add (_tmp20_, _tmp23_);
	_tmp24_ = self->priv->toggle_group;
	_tmp25_ = g_strdup (_ ("Replies"));
	_tmp26_ = tuba_widgets_profile_filter_group_filter_to_string (TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_REPLIES);
	_tmp27_ = adw_toggle_new ();
	adw_toggle_set_label (_tmp27_, _tmp25_);
	_g_free0 (_tmp25_);
	adw_toggle_set_name (_tmp27_, _tmp26_);
	_g_free0 (_tmp26_);
	adw_toggle_group_add (_tmp24_, _tmp27_);
	if (show_media) {
		AdwToggleGroup* _tmp28_;
		gchar* _tmp29_;
		gchar* _tmp30_;
		AdwToggle* _tmp31_ = NULL;
		_tmp28_ = self->priv->toggle_group;
		_tmp29_ = g_strdup (_ ("Media"));
		_tmp30_ = tuba_widgets_profile_filter_group_filter_to_string (TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_MEDIA);
		_tmp31_ = adw_toggle_new ();
		adw_toggle_set_label (_tmp31_, _tmp29_);
		_g_free0 (_tmp29_);
		adw_toggle_set_name (_tmp31_, _tmp30_);
		_g_free0 (_tmp30_);
		adw_toggle_group_add (_tmp28_, _tmp31_);
	}
	if (set_active_manually) {
		AdwToggleGroup* _tmp32_;
		_tmp32_ = self->priv->toggle_group;
		adw_toggle_group_set_active (_tmp32_, (guint) 1);
	}
	_tmp33_ = self->priv->toggle_group;
	g_signal_connect_object ((GObject*) _tmp33_, "notify::active-name", (GCallback) _tuba_widgets_profile_filter_group_on_active_changed_g_object_notify, self, 0);
	return self;
}

TubaWidgetsProfileFilterGroup*
tuba_widgets_profile_filter_group_new (gboolean show_media,
                                       gboolean show_featured)
{
	return tuba_widgets_profile_filter_group_construct (TUBA_WIDGETS_TYPE_PROFILE_FILTER_GROUP, show_media, show_featured);
}

static void
tuba_widgets_profile_filter_group_on_active_changed (TubaWidgetsProfileFilterGroup* self)
{
	gchar* filter_name = NULL;
	AdwToggleGroup* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->toggle_group;
	_tmp1_ = adw_toggle_group_get_active_name (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	filter_name = _tmp3_;
	_tmp4_ = filter_name;
	if (_tmp4_ != NULL) {
		const gchar* _tmp5_;
		_tmp5_ = filter_name;
		g_signal_emit (self, tuba_widgets_profile_filter_group_signals[TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_CHANGE_SIGNAL], 0, tuba_widgets_profile_filter_group_filter_from_string (_tmp5_));
	}
	_g_free0 (filter_name);
}

static void
tuba_widgets_profile_filter_group_class_init (TubaWidgetsProfileFilterGroupClass * klass,
                                              gpointer klass_data)
{
	tuba_widgets_profile_filter_group_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaWidgetsProfileFilterGroup_private_offset);
	G_OBJECT_CLASS (klass)->finalize = tuba_widgets_profile_filter_group_finalize;
	tuba_widgets_profile_filter_group_signals[TUBA_WIDGETS_PROFILE_FILTER_GROUP_FILTER_CHANGE_SIGNAL] = g_signal_new ("filter-change", TUBA_WIDGETS_TYPE_PROFILE_FILTER_GROUP, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__ENUM, G_TYPE_NONE, 1, TUBA_WIDGETS_PROFILE_FILTER_GROUP_TYPE_FILTER);
}

static void
tuba_widgets_profile_filter_group_instance_init (TubaWidgetsProfileFilterGroup * self,
                                                 gpointer klass)
{
	self->priv = tuba_widgets_profile_filter_group_get_instance_private (self);
}

static void
tuba_widgets_profile_filter_group_finalize (GObject * obj)
{
	TubaWidgetsProfileFilterGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_WIDGETS_TYPE_PROFILE_FILTER_GROUP, TubaWidgetsProfileFilterGroup);
	_g_object_unref0 (self->priv->toggle_group);
	G_OBJECT_CLASS (tuba_widgets_profile_filter_group_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_widgets_profile_filter_group_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaWidgetsProfileFilterGroupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_widgets_profile_filter_group_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaWidgetsProfileFilterGroup), 0, (GInstanceInitFunc) tuba_widgets_profile_filter_group_instance_init, NULL };
	GType tuba_widgets_profile_filter_group_type_id;
	tuba_widgets_profile_filter_group_type_id = g_type_register_static (gtk_list_box_row_get_type (), "TubaWidgetsProfileFilterGroup", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaWidgetsProfileFilterGroup_private_offset = g_type_add_instance_private (tuba_widgets_profile_filter_group_type_id, sizeof (TubaWidgetsProfileFilterGroupPrivate));
	return tuba_widgets_profile_filter_group_type_id;
}

GType
tuba_widgets_profile_filter_group_get_type (void)
{
	static GType tuba_widgets_profile_filter_group_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_widgets_profile_filter_group_type_id__once)) {
		GType tuba_widgets_profile_filter_group_type_id;
		tuba_widgets_profile_filter_group_type_id = tuba_widgets_profile_filter_group_get_type_once ();
		g_once_init_leave_pointer (&tuba_widgets_profile_filter_group_type_id__once, tuba_widgets_profile_filter_group_type_id);
	}
	return tuba_widgets_profile_filter_group_type_id__once;
}

