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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <adwaita.h>
#include <pango/pango.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_ACCOUNT_ROW (tuba_widgets_account_row_get_type ())
#define TUBA_WIDGETS_ACCOUNT_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_ACCOUNT_ROW, TubaWidgetsAccountRow))
#define TUBA_WIDGETS_ACCOUNT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_ACCOUNT_ROW, TubaWidgetsAccountRowClass))
#define TUBA_WIDGETS_IS_ACCOUNT_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_ACCOUNT_ROW))
#define TUBA_WIDGETS_IS_ACCOUNT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_ACCOUNT_ROW))
#define TUBA_WIDGETS_ACCOUNT_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_ACCOUNT_ROW, TubaWidgetsAccountRowClass))

typedef struct _TubaWidgetsAccountRow TubaWidgetsAccountRow;
typedef struct _TubaWidgetsAccountRowClass TubaWidgetsAccountRowClass;
typedef struct _TubaWidgetsAccountRowPrivate TubaWidgetsAccountRowPrivate;

#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_WIDGETS_TYPE_RELATIONSHIP_BUTTON (tuba_widgets_relationship_button_get_type ())
#define TUBA_WIDGETS_RELATIONSHIP_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_RELATIONSHIP_BUTTON, TubaWidgetsRelationshipButton))
#define TUBA_WIDGETS_RELATIONSHIP_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_RELATIONSHIP_BUTTON, TubaWidgetsRelationshipButtonClass))
#define TUBA_WIDGETS_IS_RELATIONSHIP_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_RELATIONSHIP_BUTTON))
#define TUBA_WIDGETS_IS_RELATIONSHIP_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_RELATIONSHIP_BUTTON))
#define TUBA_WIDGETS_RELATIONSHIP_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_RELATIONSHIP_BUTTON, TubaWidgetsRelationshipButtonClass))

typedef struct _TubaWidgetsRelationshipButton TubaWidgetsRelationshipButton;
typedef struct _TubaWidgetsRelationshipButtonClass TubaWidgetsRelationshipButtonClass;
enum  {
	TUBA_WIDGETS_ACCOUNT_ROW_0_PROPERTY,
	TUBA_WIDGETS_ACCOUNT_ROW_ACCOUNT_PROPERTY,
	TUBA_WIDGETS_ACCOUNT_ROW_RS_PROPERTY,
	TUBA_WIDGETS_ACCOUNT_ROW_CHECKBOX_SENSITIVE_PROPERTY,
	TUBA_WIDGETS_ACCOUNT_ROW_CHECKBOX_ACTIVE_PROPERTY,
	TUBA_WIDGETS_ACCOUNT_ROW_NUM_PROPERTIES
};
static GParamSpec* tuba_widgets_account_row_properties[TUBA_WIDGETS_ACCOUNT_ROW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TUBA_WIDGETS_TYPE_AVATAR (tuba_widgets_avatar_get_type ())
#define TUBA_WIDGETS_AVATAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_AVATAR, TubaWidgetsAvatar))
#define TUBA_WIDGETS_AVATAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_AVATAR, TubaWidgetsAvatarClass))
#define TUBA_WIDGETS_IS_AVATAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_AVATAR))
#define TUBA_WIDGETS_IS_AVATAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_AVATAR))
#define TUBA_WIDGETS_AVATAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_AVATAR, TubaWidgetsAvatarClass))

typedef struct _TubaWidgetsAvatar TubaWidgetsAvatar;
typedef struct _TubaWidgetsAvatarClass TubaWidgetsAvatarClass;

#define TUBA_WIDGETS_TYPE_LABEL_WITH_WIDGETS (tuba_widgets_label_with_widgets_get_type ())
#define TUBA_WIDGETS_LABEL_WITH_WIDGETS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_LABEL_WITH_WIDGETS, TubaWidgetsLabelWithWidgets))
#define TUBA_WIDGETS_LABEL_WITH_WIDGETS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_LABEL_WITH_WIDGETS, TubaWidgetsLabelWithWidgetsClass))
#define TUBA_WIDGETS_IS_LABEL_WITH_WIDGETS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_LABEL_WITH_WIDGETS))
#define TUBA_WIDGETS_IS_LABEL_WITH_WIDGETS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_LABEL_WITH_WIDGETS))
#define TUBA_WIDGETS_LABEL_WITH_WIDGETS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_LABEL_WITH_WIDGETS, TubaWidgetsLabelWithWidgetsClass))

typedef struct _TubaWidgetsLabelWithWidgets TubaWidgetsLabelWithWidgets;
typedef struct _TubaWidgetsLabelWithWidgetsClass TubaWidgetsLabelWithWidgetsClass;

#define TUBA_WIDGETS_TYPE_EMOJI_LABEL (tuba_widgets_emoji_label_get_type ())
#define TUBA_WIDGETS_EMOJI_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_EMOJI_LABEL, TubaWidgetsEmojiLabel))
#define TUBA_WIDGETS_EMOJI_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_EMOJI_LABEL, TubaWidgetsEmojiLabelClass))
#define TUBA_WIDGETS_IS_EMOJI_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_EMOJI_LABEL))
#define TUBA_WIDGETS_IS_EMOJI_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_EMOJI_LABEL))
#define TUBA_WIDGETS_EMOJI_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_EMOJI_LABEL, TubaWidgetsEmojiLabelClass))

typedef struct _TubaWidgetsEmojiLabel TubaWidgetsEmojiLabel;
typedef struct _TubaWidgetsEmojiLabelClass TubaWidgetsEmojiLabelClass;
#define _g_free0(var) (var = (g_free (var), NULL))

#define TUBA_TYPE_WIDGETIZABLE (tuba_widgetizable_get_type ())
#define TUBA_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_WIDGETIZABLE, TubaWidgetizable))
#define TUBA_IS_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_WIDGETIZABLE))
#define TUBA_WIDGETIZABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_TYPE_WIDGETIZABLE, TubaWidgetizableIface))

typedef struct _TubaWidgetizable TubaWidgetizable;
typedef struct _TubaWidgetizableIface TubaWidgetizableIface;

#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_TYPE_RELATIONSHIP (tuba_api_relationship_get_type ())
#define TUBA_API_RELATIONSHIP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_RELATIONSHIP, TubaAPIRelationship))
#define TUBA_API_RELATIONSHIP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_RELATIONSHIP, TubaAPIRelationshipClass))
#define TUBA_API_IS_RELATIONSHIP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_RELATIONSHIP))
#define TUBA_API_IS_RELATIONSHIP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_RELATIONSHIP))
#define TUBA_API_RELATIONSHIP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_RELATIONSHIP, TubaAPIRelationshipClass))

typedef struct _TubaAPIRelationship TubaAPIRelationship;
typedef struct _TubaAPIRelationshipClass TubaAPIRelationshipClass;

#define TUBA_TYPE_APPLICATION (tuba_application_get_type ())
#define TUBA_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_APPLICATION, TubaApplication))
#define TUBA_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_APPLICATION, TubaApplicationClass))
#define TUBA_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_APPLICATION))
#define TUBA_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_APPLICATION))
#define TUBA_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_APPLICATION, TubaApplicationClass))

typedef struct _TubaApplication TubaApplication;
typedef struct _TubaApplicationClass TubaApplicationClass;

#define TUBA_API_TYPE_ACCOUNT_FIELD (tuba_api_account_field_get_type ())
#define TUBA_API_ACCOUNT_FIELD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_ACCOUNT_FIELD, TubaAPIAccountField))
#define TUBA_API_ACCOUNT_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_ACCOUNT_FIELD, TubaAPIAccountFieldClass))
#define TUBA_API_IS_ACCOUNT_FIELD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_ACCOUNT_FIELD))
#define TUBA_API_IS_ACCOUNT_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_ACCOUNT_FIELD))
#define TUBA_API_ACCOUNT_FIELD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_ACCOUNT_FIELD, TubaAPIAccountFieldClass))

typedef struct _TubaAPIAccountField TubaAPIAccountField;
typedef struct _TubaAPIAccountFieldClass TubaAPIAccountFieldClass;
enum  {
	TUBA_WIDGETS_ACCOUNT_ROW_CHECKBOX_TOGGLED_SIGNAL,
	TUBA_WIDGETS_ACCOUNT_ROW_BUTTON_CLICKED_SIGNAL,
	TUBA_WIDGETS_ACCOUNT_ROW_OPEN_SIGNAL,
	TUBA_WIDGETS_ACCOUNT_ROW_NUM_SIGNALS
};
static guint tuba_widgets_account_row_signals[TUBA_WIDGETS_ACCOUNT_ROW_NUM_SIGNALS] = {0};

struct _TubaWidgetsAccountRow {
	GtkListBoxRow parent_instance;
	TubaWidgetsAccountRowPrivate * priv;
};

struct _TubaWidgetsAccountRowClass {
	GtkListBoxRowClass parent_class;
};

struct _TubaWidgetsAccountRowPrivate {
	TubaAPIAccount* _account;
	GtkBox* main_box;
	GtkBox* info_box;
	GtkCheckButton* selection_button;
	TubaWidgetsRelationshipButton* rs_btn;
	GtkLabel* note;
};

struct _TubaWidgetizableIface {
	GTypeInterface parent_iface;
	GtkWidget* (*to_widget) (TubaWidgetizable* self);
	void (*open) (TubaWidgetizable* self);
	void (*resolve_open) (TubaWidgetizable* self, TubaInstanceAccount* account);
};

static gint TubaWidgetsAccountRow_private_offset;
static gpointer tuba_widgets_account_row_parent_class = NULL;
VALA_EXTERN TubaApplication* tuba_app;

VALA_EXTERN GType tuba_widgets_account_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsAccountRow, 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_widgets_relationship_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsRelationshipButton, g_object_unref)
VALA_EXTERN TubaWidgetsAccountRow* tuba_widgets_account_row_new (TubaAPIAccount* account,
                                                     gboolean open_only);
VALA_EXTERN TubaWidgetsAccountRow* tuba_widgets_account_row_construct (GType object_type,
                                                           TubaAPIAccount* account,
                                                           gboolean open_only);
static void tuba_widgets_account_row_set_account (TubaWidgetsAccountRow* self,
                                           TubaAPIAccount* value);
VALA_EXTERN GType tuba_widgets_avatar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsAvatar, g_object_unref)
VALA_EXTERN TubaWidgetsAvatar* tuba_widgets_avatar_new (void);
VALA_EXTERN TubaWidgetsAvatar* tuba_widgets_avatar_construct (GType object_type);
VALA_EXTERN void tuba_widgets_avatar_set_size (TubaWidgetsAvatar* self,
                                   gint value);
VALA_EXTERN void tuba_widgets_avatar_set_allow_mini_profile (TubaWidgetsAvatar* self,
                                                 gboolean value);
VALA_EXTERN void tuba_widgets_avatar_set_account (TubaWidgetsAvatar* self,
                                      TubaAPIAccount* value);
VALA_EXTERN GType tuba_widgets_label_with_widgets_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsLabelWithWidgets, g_object_unref)
VALA_EXTERN GType tuba_widgets_emoji_label_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsEmojiLabel, g_object_unref)
VALA_EXTERN TubaWidgetsEmojiLabel* tuba_widgets_emoji_label_new (const gchar* text,
                                                     GeeHashMap* emojis);
VALA_EXTERN TubaWidgetsEmojiLabel* tuba_widgets_emoji_label_construct (GType object_type,
                                                           const gchar* text,
                                                           GeeHashMap* emojis);
VALA_EXTERN void tuba_widgets_label_with_widgets_set_use_markup (TubaWidgetsLabelWithWidgets* self,
                                                     gboolean value);
VALA_EXTERN GeeHashMap* tuba_api_account_get_emojis_map (TubaAPIAccount* self);
VALA_EXTERN void tuba_widgets_emoji_label_set_instance_emojis (TubaWidgetsEmojiLabel* self,
                                                   GeeHashMap* value);
VALA_EXTERN const gchar* tuba_api_account_get_display_name (TubaAPIAccount* self);
VALA_EXTERN void tuba_widgets_emoji_label_set_content (TubaWidgetsEmojiLabel* self,
                                           const gchar* value);
VALA_EXTERN gchar* tuba_api_account_get_full_handle (TubaAPIAccount* self);
static void tuba_widgets_account_row_open_clicked (TubaWidgetsAccountRow* self);
static void _tuba_widgets_account_row_open_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                gpointer self);
VALA_EXTERN void tuba_widgets_account_row_add_checkbox (TubaWidgetsAccountRow* self,
                                            const gchar* tooltip_text);
static void tuba_widgets_account_row_on_checkbox_toggled (TubaWidgetsAccountRow* self);
static void _tuba_widgets_account_row_on_checkbox_toggled_g_object_notify (GObject* _sender,
                                                                    GParamSpec* pspec,
                                                                    gpointer self);
VALA_EXTERN void tuba_widgets_account_row_add_button (TubaWidgetsAccountRow* self,
                                          const gchar* label,
                                          const gchar* icon_name,
                                          gchar** styles,
                                          gint styles_length1);
static void tuba_widgets_account_row_on_button_clicked (TubaWidgetsAccountRow* self);
static void _tuba_widgets_account_row_on_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                     gpointer self);
VALA_EXTERN TubaAPIAccount* tuba_widgets_account_row_get_account (TubaWidgetsAccountRow* self);
VALA_EXTERN GType tuba_instance_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccount, g_object_unref)
VALA_EXTERN GType tuba_widgetizable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetizable, g_object_unref)
VALA_EXTERN void tuba_widgetizable_open (TubaWidgetizable* self);
VALA_EXTERN void tuba_widgets_account_row_add_rs_button (TubaWidgetsAccountRow* self,
                                             gboolean from_acc);
VALA_EXTERN TubaWidgetsRelationshipButton* tuba_widgets_relationship_button_new (void);
VALA_EXTERN TubaWidgetsRelationshipButton* tuba_widgets_relationship_button_construct (GType object_type);
VALA_EXTERN GType tuba_api_relationship_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIRelationship, g_object_unref)
VALA_EXTERN TubaAPIRelationship* tuba_api_account_get_tuba_rs (TubaAPIAccount* self);
VALA_EXTERN void tuba_widgets_account_row_set_rs (TubaWidgetsAccountRow* self,
                                      TubaAPIRelationship* value);
static void tuba_widgets_account_row_on_tuba_rs (TubaWidgetsAccountRow* self);
static void _tuba_widgets_account_row_on_tuba_rs_g_object_notify (GObject* _sender,
                                                           GParamSpec* pspec,
                                                           gpointer self);
VALA_EXTERN GType tuba_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaApplication, g_object_unref)
static void tuba_widgets_account_row_on_relationship_invalidated_global (TubaWidgetsAccountRow* self,
                                                                  TubaAPIRelationship* new_relationship);
static void _tuba_widgets_account_row_on_relationship_invalidated_global_tuba_application_relationship_invalidated (TubaApplication* _sender,
                                                                                                             TubaAPIRelationship* new_relationship,
                                                                                                             gpointer self);
VALA_EXTERN void tuba_widgets_account_row_enable_activation (TubaWidgetsAccountRow* self);
static void _tuba_widgetizable_open_tuba_widgets_account_row_open (TubaWidgetsAccountRow* _sender,
                                                            gpointer self);
VALA_EXTERN void tuba_widgets_account_row_add_followers_and_verified_link (TubaWidgetsAccountRow* self);
VALA_EXTERN gint64 tuba_api_account_get_followers_count (TubaAPIAccount* self);
VALA_EXTERN gchar* tuba_utils_units_shorten (gint64 unit);
VALA_EXTERN GType tuba_api_account_field_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccountField, g_object_unref)
VALA_EXTERN GeeArrayList* tuba_api_account_get_fields (TubaAPIAccount* self);
VALA_EXTERN const gchar* tuba_api_account_field_get_verified_at (TubaAPIAccountField* self);
VALA_EXTERN gchar* tuba_utils_htmlx_simplify (const gchar* str);
VALA_EXTERN const gchar* tuba_api_account_field_get_val (TubaAPIAccountField* self);
VALA_EXTERN void tuba_widgets_account_row_add_note (TubaWidgetsAccountRow* self);
static void tuba_widgets_account_row_update_note (TubaWidgetsAccountRow* self);
VALA_EXTERN TubaAPIRelationship* tuba_widgets_account_row_get_rs (TubaWidgetsAccountRow* self);
VALA_EXTERN const gchar* tuba_api_relationship_get_note (TubaAPIRelationship* self);
VALA_EXTERN void tuba_widgets_account_row_add (TubaWidgetsAccountRow* self,
                                   GtkWidget* widget);
static void tuba_widgets_account_row_on_rs_invalidation (TubaWidgetsAccountRow* self,
                                                  TubaAPIRelationship* rs);
VALA_EXTERN const gchar* tuba_api_relationship_get_id (TubaAPIRelationship* self);
VALA_EXTERN TubaAPIRelationship* tuba_widgets_relationship_button_get_rs (TubaWidgetsRelationshipButton* self);
static void _tuba_widgets_account_row_on_rs_invalidation_tuba_api_relationship_invalidated (TubaAPIRelationship* _sender,
                                                                                     gpointer self);
VALA_EXTERN void tuba_widgets_relationship_button_set_rs (TubaWidgetsRelationshipButton* self,
                                              TubaAPIRelationship* value);
VALA_EXTERN gboolean tuba_widgets_account_row_get_checkbox_sensitive (TubaWidgetsAccountRow* self);
VALA_EXTERN void tuba_widgets_account_row_set_checkbox_sensitive (TubaWidgetsAccountRow* self,
                                                      gboolean value);
VALA_EXTERN gboolean tuba_widgets_account_row_get_checkbox_active (TubaWidgetsAccountRow* self);
VALA_EXTERN void tuba_widgets_account_row_set_checkbox_active (TubaWidgetsAccountRow* self,
                                                   gboolean value);
static void tuba_widgets_account_row_finalize (GObject * obj);
static GType tuba_widgets_account_row_get_type_once (void);
static void _vala_tuba_widgets_account_row_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec);
static void _vala_tuba_widgets_account_row_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
tuba_widgets_account_row_get_instance_private (TubaWidgetsAccountRow* self)
{
	return G_STRUCT_MEMBER_P (self, TubaWidgetsAccountRow_private_offset);
}

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

static void
_tuba_widgets_account_row_open_clicked_gtk_button_clicked (GtkButton* _sender,
                                                           gpointer self)
{
	tuba_widgets_account_row_open_clicked ((TubaWidgetsAccountRow*) self);
}

TubaWidgetsAccountRow*
tuba_widgets_account_row_construct (GType object_type,
                                    TubaAPIAccount* account,
                                    gboolean open_only)
{
	TubaWidgetsAccountRow * self = NULL;
	GtkBox* _tmp0_ = NULL;
	TubaWidgetsAvatar* avi = NULL;
	TubaAPIAccount* _tmp1_;
	TubaWidgetsAvatar* _tmp2_ = NULL;
	GtkBox* _tmp3_;
	TubaWidgetsAvatar* _tmp4_;
	GtkBox* _tmp5_ = NULL;
	TubaWidgetsEmojiLabel* title_label = NULL;
	TubaWidgetsEmojiLabel* _tmp6_ = NULL;
	TubaWidgetsEmojiLabel* _tmp7_;
	GeeHashMap* _tmp8_;
	GeeHashMap* _tmp9_;
	GeeHashMap* _tmp10_;
	TubaWidgetsEmojiLabel* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	AdwWrapBox* info_wrap_box = NULL;
	AdwWrapBox* _tmp14_ = NULL;
	AdwWrapBox* _tmp15_;
	TubaWidgetsEmojiLabel* _tmp16_;
	AdwWrapBox* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar** _tmp22_;
	GtkLabel* _tmp23_ = NULL;
	GtkLabel* _tmp24_;
	GtkBox* _tmp25_;
	AdwWrapBox* _tmp26_;
	GtkBox* _tmp27_;
	GtkBox* _tmp28_;
	GtkBox* _tmp33_;
	g_return_val_if_fail (account != NULL, NULL);
	self = (TubaWidgetsAccountRow*) g_object_new (object_type, NULL);
	gtk_list_box_row_set_activatable ((GtkListBoxRow*) self, FALSE);
	tuba_widgets_account_row_set_account (self, account);
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp0_, 8);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp0_, 8);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp0_, 8);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp0_, 8);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->main_box);
	self->priv->main_box = _tmp0_;
	_tmp1_ = _g_object_ref0 (account);
	_tmp2_ = tuba_widgets_avatar_new ();
	tuba_widgets_avatar_set_size (_tmp2_, 36);
	tuba_widgets_avatar_set_allow_mini_profile (_tmp2_, TRUE);
	tuba_widgets_avatar_set_account (_tmp2_, _tmp1_);
	_g_object_unref0 (_tmp1_);
	g_object_ref_sink (_tmp2_);
	avi = _tmp2_;
	_tmp3_ = self->priv->main_box;
	_tmp4_ = avi;
	gtk_box_prepend (_tmp3_, (GtkWidget*) _tmp4_);
	_tmp5_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp5_, TRUE);
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->info_box);
	self->priv->info_box = _tmp5_;
	_tmp6_ = tuba_widgets_emoji_label_new (NULL, NULL);
	tuba_widgets_label_with_widgets_set_use_markup ((TubaWidgetsLabelWithWidgets*) _tmp6_, FALSE);
	g_object_ref_sink (_tmp6_);
	title_label = _tmp6_;
	_tmp7_ = title_label;
	_tmp8_ = tuba_api_account_get_emojis_map (account);
	_tmp9_ = _tmp8_;
	_tmp10_ = _tmp9_;
	tuba_widgets_emoji_label_set_instance_emojis (_tmp7_, _tmp10_);
	_g_object_unref0 (_tmp10_);
	_tmp11_ = title_label;
	_tmp12_ = tuba_api_account_get_display_name (account);
	_tmp13_ = _tmp12_;
	tuba_widgets_emoji_label_set_content (_tmp11_, _tmp13_);
	_tmp14_ = (AdwWrapBox*) adw_wrap_box_new ();
	adw_wrap_box_set_child_spacing (_tmp14_, 4);
	g_object_ref_sink (_tmp14_);
	info_wrap_box = _tmp14_;
	_tmp15_ = info_wrap_box;
	_tmp16_ = title_label;
	adw_wrap_box_append (_tmp15_, (GtkWidget*) _tmp16_);
	_tmp17_ = info_wrap_box;
	_tmp18_ = tuba_api_account_get_full_handle (account);
	_tmp19_ = _tmp18_;
	_tmp20_ = _tmp19_;
	_tmp21_ = g_strdup ("dim-label");
	_tmp22_ = g_new0 (gchar*, 1 + 1);
	_tmp22_[0] = _tmp21_;
	_tmp23_ = (GtkLabel*) gtk_label_new (_tmp20_);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp23_, TRUE);
	gtk_label_set_xalign (_tmp23_, 0.0f);
	gtk_label_set_wrap (_tmp23_, TRUE);
	gtk_label_set_wrap_mode (_tmp23_, PANGO_WRAP_WORD_CHAR);
	gtk_label_set_use_markup (_tmp23_, FALSE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp23_, _tmp22_);
	_tmp22_ = (_vala_array_free (_tmp22_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp23_);
	_tmp24_ = _tmp23_;
	adw_wrap_box_append (_tmp17_, (GtkWidget*) _tmp24_);
	_g_object_unref0 (_tmp24_);
	_g_free0 (_tmp20_);
	_tmp25_ = self->priv->info_box;
	_tmp26_ = info_wrap_box;
	gtk_box_append (_tmp25_, (GtkWidget*) _tmp26_);
	_tmp27_ = self->priv->main_box;
	_tmp28_ = self->priv->info_box;
	gtk_box_append (_tmp27_, (GtkWidget*) _tmp28_);
	if (open_only) {
		GtkButton* open_button = NULL;
		GtkButton* _tmp29_ = NULL;
		GtkButton* _tmp30_;
		GtkBox* _tmp31_;
		GtkButton* _tmp32_;
		_tmp29_ = (GtkButton*) gtk_button_new_with_label (_ ("Open"));
		gtk_widget_set_valign ((GtkWidget*) _tmp29_, GTK_ALIGN_CENTER);
		g_object_ref_sink (_tmp29_);
		open_button = _tmp29_;
		_tmp30_ = open_button;
		g_signal_connect_object (_tmp30_, "clicked", (GCallback) _tuba_widgets_account_row_open_clicked_gtk_button_clicked, self, 0);
		_tmp31_ = self->priv->main_box;
		_tmp32_ = open_button;
		gtk_box_append (_tmp31_, (GtkWidget*) _tmp32_);
		_g_object_unref0 (open_button);
	}
	_tmp33_ = self->priv->main_box;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp33_);
	_g_object_unref0 (info_wrap_box);
	_g_object_unref0 (title_label);
	_g_object_unref0 (avi);
	return self;
}

TubaWidgetsAccountRow*
tuba_widgets_account_row_new (TubaAPIAccount* account,
                              gboolean open_only)
{
	return tuba_widgets_account_row_construct (TUBA_WIDGETS_TYPE_ACCOUNT_ROW, account, open_only);
}

static void
_tuba_widgets_account_row_on_checkbox_toggled_g_object_notify (GObject* _sender,
                                                               GParamSpec* pspec,
                                                               gpointer self)
{
	tuba_widgets_account_row_on_checkbox_toggled ((TubaWidgetsAccountRow*) self);
}

void
tuba_widgets_account_row_add_checkbox (TubaWidgetsAccountRow* self,
                                       const gchar* tooltip_text)
{
	GtkCheckButton* _tmp0_;
	gchar* _tmp1_;
	gchar** _tmp2_;
	gchar* _tmp3_;
	GtkCheckButton* _tmp4_ = NULL;
	GtkBox* _tmp5_;
	GtkCheckButton* _tmp6_;
	GtkCheckButton* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (tooltip_text != NULL);
	_tmp0_ = self->priv->selection_button;
	if (_tmp0_ != NULL) {
		return;
	}
	_tmp1_ = g_strdup ("selection-mode");
	_tmp2_ = g_new0 (gchar*, 1 + 1);
	_tmp2_[0] = _tmp1_;
	_tmp3_ = g_strdup (tooltip_text);
	_tmp4_ = (GtkCheckButton*) gtk_check_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp4_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp4_, _tmp2_);
	_tmp2_ = (_vala_array_free (_tmp2_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp4_, _tmp3_);
	_g_free0 (_tmp3_);
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->selection_button);
	self->priv->selection_button = _tmp4_;
	_tmp5_ = self->priv->main_box;
	_tmp6_ = self->priv->selection_button;
	gtk_box_prepend (_tmp5_, (GtkWidget*) _tmp6_);
	_tmp7_ = self->priv->selection_button;
	g_signal_connect_object ((GObject*) _tmp7_, "notify::active", (GCallback) _tuba_widgets_account_row_on_checkbox_toggled_g_object_notify, self, 0);
}

static void
tuba_widgets_account_row_on_checkbox_toggled (TubaWidgetsAccountRow* self)
{
	GtkCheckButton* _tmp0_;
	GtkCheckButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->selection_button;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->selection_button;
	_tmp2_ = gtk_check_button_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	g_signal_emit (self, tuba_widgets_account_row_signals[TUBA_WIDGETS_ACCOUNT_ROW_CHECKBOX_TOGGLED_SIGNAL], 0, _tmp3_);
}

static void
_tuba_widgets_account_row_on_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                gpointer self)
{
	tuba_widgets_account_row_on_button_clicked ((TubaWidgetsAccountRow*) self);
}

void
tuba_widgets_account_row_add_button (TubaWidgetsAccountRow* self,
                                     const gchar* label,
                                     const gchar* icon_name,
                                     gchar** styles,
                                     gint styles_length1)
{
	GtkButton* btn = NULL;
	GtkButton* _tmp0_ = NULL;
	GtkButton* _tmp7_;
	GtkBox* _tmp8_;
	GtkButton* _tmp9_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (label != NULL);
	_tmp0_ = (GtkButton*) gtk_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp0_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp0_);
	btn = _tmp0_;
	if (icon_name != NULL) {
		GtkButton* _tmp1_;
		GtkButton* _tmp2_;
		_tmp1_ = btn;
		gtk_button_set_icon_name (_tmp1_, icon_name);
		_tmp2_ = btn;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp2_, label);
	} else {
		GtkButton* _tmp3_;
		_tmp3_ = btn;
		gtk_button_set_label (_tmp3_, label);
	}
	if (styles != NULL) {
		{
			gchar** style_collection = NULL;
			gint style_collection_length1 = 0;
			gint _style_collection_size_ = 0;
			gint style_it = 0;
			style_collection = styles;
			style_collection_length1 = styles_length1;
			for (style_it = 0; style_it < style_collection_length1; style_it = style_it + 1) {
				gchar* _tmp4_;
				gchar* style = NULL;
				_tmp4_ = g_strdup (style_collection[style_it]);
				style = _tmp4_;
				{
					GtkButton* _tmp5_;
					const gchar* _tmp6_;
					_tmp5_ = btn;
					_tmp6_ = style;
					gtk_widget_add_css_class ((GtkWidget*) _tmp5_, _tmp6_);
					_g_free0 (style);
				}
			}
		}
	}
	_tmp7_ = btn;
	g_signal_connect_object (_tmp7_, "clicked", (GCallback) _tuba_widgets_account_row_on_button_clicked_gtk_button_clicked, self, 0);
	_tmp8_ = self->priv->main_box;
	_tmp9_ = btn;
	gtk_box_append (_tmp8_, (GtkWidget*) _tmp9_);
	_g_object_unref0 (btn);
}

static void
tuba_widgets_account_row_on_button_clicked (TubaWidgetsAccountRow* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, tuba_widgets_account_row_signals[TUBA_WIDGETS_ACCOUNT_ROW_BUTTON_CLICKED_SIGNAL], 0);
}

static void
tuba_widgets_account_row_open_clicked (TubaWidgetsAccountRow* self)
{
	TubaAPIAccount* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_account;
	tuba_widgetizable_open ((TubaWidgetizable*) _tmp0_);
}

static void
_tuba_widgets_account_row_on_tuba_rs_g_object_notify (GObject* _sender,
                                                      GParamSpec* pspec,
                                                      gpointer self)
{
	tuba_widgets_account_row_on_tuba_rs ((TubaWidgetsAccountRow*) self);
}

static void
_tuba_widgets_account_row_on_relationship_invalidated_global_tuba_application_relationship_invalidated (TubaApplication* _sender,
                                                                                                        TubaAPIRelationship* new_relationship,
                                                                                                        gpointer self)
{
	tuba_widgets_account_row_on_relationship_invalidated_global ((TubaWidgetsAccountRow*) self, new_relationship);
}

void
tuba_widgets_account_row_add_rs_button (TubaWidgetsAccountRow* self,
                                        gboolean from_acc)
{
	TubaWidgetsRelationshipButton* _tmp0_ = NULL;
	GtkBox* _tmp1_;
	TubaWidgetsRelationshipButton* _tmp2_;
	TubaApplication* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_widgets_relationship_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp0_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->rs_btn);
	self->priv->rs_btn = _tmp0_;
	_tmp1_ = self->priv->main_box;
	_tmp2_ = self->priv->rs_btn;
	gtk_box_append (_tmp1_, (GtkWidget*) _tmp2_);
	if (from_acc) {
		TubaAPIAccount* _tmp3_;
		TubaAPIRelationship* _tmp4_;
		TubaAPIRelationship* _tmp5_;
		TubaAPIAccount* _tmp6_;
		_tmp3_ = self->priv->_account;
		_tmp4_ = tuba_api_account_get_tuba_rs (_tmp3_);
		_tmp5_ = _tmp4_;
		tuba_widgets_account_row_set_rs (self, _tmp5_);
		_tmp6_ = self->priv->_account;
		g_signal_connect_object ((GObject*) _tmp6_, "notify::tuba-rs", (GCallback) _tuba_widgets_account_row_on_tuba_rs_g_object_notify, self, 0);
	}
	_tmp7_ = tuba_app;
	g_signal_connect_object (_tmp7_, "relationship-invalidated", (GCallback) _tuba_widgets_account_row_on_relationship_invalidated_global_tuba_application_relationship_invalidated, self, 0);
}

static void
tuba_widgets_account_row_on_tuba_rs (TubaWidgetsAccountRow* self)
{
	gboolean _tmp0_ = FALSE;
	TubaAPIAccount* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_account;
	if (_tmp1_ != NULL) {
		TubaAPIAccount* _tmp2_;
		TubaAPIRelationship* _tmp3_;
		TubaAPIRelationship* _tmp4_;
		_tmp2_ = self->priv->_account;
		_tmp3_ = tuba_api_account_get_tuba_rs (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		TubaAPIAccount* _tmp5_;
		TubaAPIRelationship* _tmp6_;
		TubaAPIRelationship* _tmp7_;
		_tmp5_ = self->priv->_account;
		_tmp6_ = tuba_api_account_get_tuba_rs (_tmp5_);
		_tmp7_ = _tmp6_;
		tuba_widgets_account_row_set_rs (self, _tmp7_);
	}
}

static void
_tuba_widgetizable_open_tuba_widgets_account_row_open (TubaWidgetsAccountRow* _sender,
                                                       gpointer self)
{
	tuba_widgetizable_open ((TubaWidgetizable*) self);
}

void
tuba_widgets_account_row_enable_activation (TubaWidgetsAccountRow* self)
{
	TubaAPIAccount* _tmp0_;
	g_return_if_fail (self != NULL);
	gtk_list_box_row_set_activatable ((GtkListBoxRow*) self, TRUE);
	_tmp0_ = self->priv->_account;
	g_signal_connect_object (self, "open", (GCallback) _tuba_widgetizable_open_tuba_widgets_account_row_open, (TubaWidgetizable*) _tmp0_, 0);
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

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

static gint
string_last_index_of (const gchar* self,
                      const gchar* needle,
                      gint start_index)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (needle != NULL, -1);
	_tmp0_ = g_strrstr (((gchar*) self) + start_index, (gchar*) needle);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = _result_;
		result = (gint) (_tmp2_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}

void
tuba_widgets_account_row_add_followers_and_verified_link (TubaWidgetsAccountRow* self)
{
	gchar* sub_string = NULL;
	TubaAPIAccount* _tmp0_;
	gint64 _tmp1_;
	gint64 _tmp2_;
	TubaAPIAccount* _tmp3_;
	gint64 _tmp4_;
	gint64 _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	AdwWrapBox* info_wrap_box = NULL;
	AdwWrapBox* _tmp13_ = NULL;
	AdwWrapBox* _tmp14_;
	const gchar* _tmp15_;
	GtkLabel* _tmp16_ = NULL;
	GtkLabel* _tmp17_;
	gboolean _tmp18_ = FALSE;
	TubaAPIAccount* _tmp19_;
	GeeArrayList* _tmp20_;
	GeeArrayList* _tmp21_;
	GtkBox* _tmp72_;
	AdwWrapBox* _tmp73_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_account;
	_tmp1_ = tuba_api_account_get_followers_count (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_account;
	_tmp4_ = tuba_api_account_get_followers_count (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = tuba_utils_units_shorten (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = string_to_string (_tmp7_);
	_tmp9_ = g_strconcat ("<b>", _tmp8_, "</b>", NULL);
	_tmp10_ = _tmp9_;
	_tmp11_ = g_strdup_printf (ngettext ("%s Follower", "%s Followers", (gulong) _tmp2_), _tmp10_);
	_tmp12_ = _tmp11_;
	_g_free0 (_tmp10_);
	_g_free0 (_tmp7_);
	sub_string = _tmp12_;
	_tmp13_ = (AdwWrapBox*) adw_wrap_box_new ();
	adw_wrap_box_set_child_spacing (_tmp13_, 4);
	adw_wrap_box_set_line_spacing (_tmp13_, 4);
	g_object_ref_sink (_tmp13_);
	info_wrap_box = _tmp13_;
	_tmp14_ = info_wrap_box;
	_tmp15_ = sub_string;
	_tmp16_ = (GtkLabel*) gtk_label_new (_tmp15_);
	gtk_label_set_xalign (_tmp16_, 0.0f);
	gtk_label_set_wrap (_tmp16_, TRUE);
	gtk_label_set_wrap_mode (_tmp16_, PANGO_WRAP_WORD_CHAR);
	gtk_label_set_use_markup (_tmp16_, TRUE);
	g_object_ref_sink (_tmp16_);
	_tmp17_ = _tmp16_;
	adw_wrap_box_append (_tmp14_, (GtkWidget*) _tmp17_);
	_g_object_unref0 (_tmp17_);
	_tmp19_ = self->priv->_account;
	_tmp20_ = tuba_api_account_get_fields (_tmp19_);
	_tmp21_ = _tmp20_;
	if (_tmp21_ != NULL) {
		TubaAPIAccount* _tmp22_;
		GeeArrayList* _tmp23_;
		GeeArrayList* _tmp24_;
		gint _tmp25_;
		gint _tmp26_;
		_tmp22_ = self->priv->_account;
		_tmp23_ = tuba_api_account_get_fields (_tmp22_);
		_tmp24_ = _tmp23_;
		_tmp25_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp24_);
		_tmp26_ = _tmp25_;
		_tmp18_ = _tmp26_ > 0;
	} else {
		_tmp18_ = FALSE;
	}
	if (_tmp18_) {
		{
			GeeArrayList* _f_list = NULL;
			TubaAPIAccount* _tmp27_;
			GeeArrayList* _tmp28_;
			GeeArrayList* _tmp29_;
			gint _f_size = 0;
			GeeArrayList* _tmp30_;
			gint _tmp31_;
			gint _tmp32_;
			gint _f_index = 0;
			_tmp27_ = self->priv->_account;
			_tmp28_ = tuba_api_account_get_fields (_tmp27_);
			_tmp29_ = _tmp28_;
			_f_list = _tmp29_;
			_tmp30_ = _f_list;
			_tmp31_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp30_);
			_tmp32_ = _tmp31_;
			_f_size = _tmp32_;
			_f_index = -1;
			while (TRUE) {
				gint _tmp33_;
				gint _tmp34_;
				TubaAPIAccountField* f = NULL;
				GeeArrayList* _tmp35_;
				gpointer _tmp36_;
				gboolean _tmp37_ = FALSE;
				TubaAPIAccountField* _tmp38_;
				const gchar* _tmp39_;
				const gchar* _tmp40_;
				_f_index = _f_index + 1;
				_tmp33_ = _f_index;
				_tmp34_ = _f_size;
				if (!(_tmp33_ < _tmp34_)) {
					break;
				}
				_tmp35_ = _f_list;
				_tmp36_ = gee_abstract_list_get ((GeeAbstractList*) _tmp35_, _f_index);
				f = (TubaAPIAccountField*) _tmp36_;
				_tmp38_ = f;
				_tmp39_ = tuba_api_account_field_get_verified_at (_tmp38_);
				_tmp40_ = _tmp39_;
				if (_tmp40_ != NULL) {
					TubaAPIAccountField* _tmp41_;
					const gchar* _tmp42_;
					const gchar* _tmp43_;
					_tmp41_ = f;
					_tmp42_ = tuba_api_account_field_get_verified_at (_tmp41_);
					_tmp43_ = _tmp42_;
					_tmp37_ = g_strcmp0 (_tmp43_, "") != 0;
				} else {
					_tmp37_ = FALSE;
				}
				if (_tmp37_) {
					GtkBox* box = NULL;
					gchar* _tmp44_;
					gchar** _tmp45_;
					GtkBox* _tmp46_ = NULL;
					gchar* verified_date = NULL;
					TubaAPIAccountField* _tmp47_;
					const gchar* _tmp48_;
					const gchar* _tmp49_;
					TubaAPIAccountField* _tmp50_;
					const gchar* _tmp51_;
					const gchar* _tmp52_;
					gchar* _tmp53_;
					GtkBox* _tmp54_;
					const gchar* _tmp55_;
					const gchar* _tmp56_;
					gchar* _tmp57_;
					gchar* _tmp58_;
					gchar* _tmp59_;
					GtkImage* _tmp60_ = NULL;
					GtkImage* _tmp61_;
					GtkBox* _tmp62_;
					TubaAPIAccountField* _tmp63_;
					const gchar* _tmp64_;
					const gchar* _tmp65_;
					gchar* _tmp66_;
					gchar* _tmp67_;
					GtkLabel* _tmp68_ = NULL;
					GtkLabel* _tmp69_;
					AdwWrapBox* _tmp70_;
					GtkBox* _tmp71_;
					_tmp44_ = g_strdup ("verified-link");
					_tmp45_ = g_new0 (gchar*, 1 + 1);
					_tmp45_[0] = _tmp44_;
					_tmp46_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
					gtk_widget_set_css_classes ((GtkWidget*) _tmp46_, _tmp45_);
					_tmp45_ = (_vala_array_free (_tmp45_, 1, (GDestroyNotify) g_free), NULL);
					g_object_ref_sink (_tmp46_);
					box = _tmp46_;
					_tmp47_ = f;
					_tmp48_ = tuba_api_account_field_get_verified_at (_tmp47_);
					_tmp49_ = _tmp48_;
					_tmp50_ = f;
					_tmp51_ = tuba_api_account_field_get_verified_at (_tmp50_);
					_tmp52_ = _tmp51_;
					_tmp53_ = string_slice (_tmp49_, (glong) 0, (glong) string_last_index_of (_tmp52_, "T", 0));
					verified_date = _tmp53_;
					_tmp54_ = box;
					_tmp55_ = verified_date;
					_tmp56_ = string_to_string (_tmp55_);
					_tmp57_ = g_strconcat ("Ownership of this link was checked on ", _tmp56_, NULL);
					_tmp58_ = _tmp57_;
					_tmp59_ = g_strdup (_ (_tmp58_));
					_tmp60_ = (GtkImage*) gtk_image_new_from_icon_name ("tuba-verified-checkmark-symbolic");
					gtk_widget_set_tooltip_text ((GtkWidget*) _tmp60_, _tmp59_);
					_g_free0 (_tmp59_);
					g_object_ref_sink (_tmp60_);
					_tmp61_ = _tmp60_;
					gtk_box_append (_tmp54_, (GtkWidget*) _tmp61_);
					_g_object_unref0 (_tmp61_);
					_g_free0 (_tmp58_);
					_tmp62_ = box;
					_tmp63_ = f;
					_tmp64_ = tuba_api_account_field_get_val (_tmp63_);
					_tmp65_ = _tmp64_;
					_tmp66_ = tuba_utils_htmlx_simplify (_tmp65_);
					_tmp67_ = _tmp66_;
					_tmp68_ = (GtkLabel*) gtk_label_new (_tmp67_);
					gtk_label_set_xalign (_tmp68_, 0.0f);
					gtk_label_set_wrap (_tmp68_, TRUE);
					gtk_label_set_wrap_mode (_tmp68_, PANGO_WRAP_WORD_CHAR);
					gtk_label_set_use_markup (_tmp68_, TRUE);
					g_object_ref_sink (_tmp68_);
					_tmp69_ = _tmp68_;
					gtk_box_append (_tmp62_, (GtkWidget*) _tmp69_);
					_g_object_unref0 (_tmp69_);
					_g_free0 (_tmp67_);
					_tmp70_ = info_wrap_box;
					_tmp71_ = box;
					adw_wrap_box_append (_tmp70_, (GtkWidget*) _tmp71_);
					_g_free0 (verified_date);
					_g_object_unref0 (box);
					_g_object_unref0 (f);
					break;
				}
				_g_object_unref0 (f);
			}
		}
	}
	_tmp72_ = self->priv->info_box;
	_tmp73_ = info_wrap_box;
	gtk_box_append (_tmp72_, (GtkWidget*) _tmp73_);
	_g_object_unref0 (info_wrap_box);
	_g_free0 (sub_string);
}

void
tuba_widgets_account_row_add_note (TubaWidgetsAccountRow* self)
{
	GtkLabel* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	GtkLabel* _tmp4_ = NULL;
	GtkBox* _tmp5_;
	GtkLabel* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->note;
	if (_tmp0_ != NULL) {
		return;
	}
	_tmp1_ = g_strdup ("italic");
	_tmp2_ = g_strdup ("dim-label");
	_tmp3_ = g_new0 (gchar*, 2 + 1);
	_tmp3_[0] = _tmp1_;
	_tmp3_[1] = _tmp2_;
	_tmp4_ = (GtkLabel*) gtk_label_new ("");
	gtk_label_set_xalign (_tmp4_, 0.0f);
	gtk_label_set_wrap (_tmp4_, TRUE);
	gtk_label_set_wrap_mode (_tmp4_, PANGO_WRAP_WORD_CHAR);
	gtk_label_set_use_markup (_tmp4_, TRUE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp4_, _tmp3_);
	_tmp3_ = (_vala_array_free (_tmp3_, 2, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_visible ((GtkWidget*) _tmp4_, FALSE);
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->note);
	self->priv->note = _tmp4_;
	_tmp5_ = self->priv->info_box;
	_tmp6_ = self->priv->note;
	gtk_box_append (_tmp5_, (GtkWidget*) _tmp6_);
	tuba_widgets_account_row_update_note (self);
}

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

static void
tuba_widgets_account_row_update_note (TubaWidgetsAccountRow* self)
{
	GtkLabel* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	TubaAPIRelationship* _tmp3_;
	TubaAPIRelationship* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->note;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp3_ = tuba_widgets_account_row_get_rs (self);
	_tmp4_ = _tmp3_;
	if (_tmp4_ != NULL) {
		TubaAPIRelationship* _tmp5_;
		TubaAPIRelationship* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp5_ = tuba_widgets_account_row_get_rs (self);
		_tmp6_ = _tmp5_;
		_tmp7_ = tuba_api_relationship_get_note (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp2_ = _tmp8_ != NULL;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		TubaAPIRelationship* _tmp9_;
		TubaAPIRelationship* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		_tmp9_ = tuba_widgets_account_row_get_rs (self);
		_tmp10_ = _tmp9_;
		_tmp11_ = tuba_api_relationship_get_note (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp1_ = g_strcmp0 (_tmp12_, "") != 0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkLabel* _tmp13_;
		TubaAPIRelationship* _tmp14_;
		TubaAPIRelationship* _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		const gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		GtkLabel* _tmp23_;
		_tmp13_ = self->priv->note;
		_tmp14_ = tuba_widgets_account_row_get_rs (self);
		_tmp15_ = _tmp14_;
		_tmp16_ = tuba_api_relationship_get_note (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = string_strip (_tmp17_);
		_tmp19_ = _tmp18_;
		_tmp20_ = string_to_string (_tmp19_);
		_tmp21_ = g_strconcat ("“", _tmp20_, "”", NULL);
		_tmp22_ = _tmp21_;
		gtk_label_set_label (_tmp13_, _tmp22_);
		_g_free0 (_tmp22_);
		_g_free0 (_tmp19_);
		_tmp23_ = self->priv->note;
		gtk_widget_set_visible ((GtkWidget*) _tmp23_, TRUE);
	} else {
		GtkLabel* _tmp24_;
		_tmp24_ = self->priv->note;
		gtk_widget_set_visible ((GtkWidget*) _tmp24_, FALSE);
	}
}

void
tuba_widgets_account_row_add (TubaWidgetsAccountRow* self,
                              GtkWidget* widget)
{
	GtkBox* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	_tmp0_ = self->priv->main_box;
	gtk_box_append (_tmp0_, widget);
}

static void
tuba_widgets_account_row_on_rs_invalidation (TubaWidgetsAccountRow* self,
                                             TubaAPIRelationship* rs)
{
	TubaApplication* _tmp0_;
	GtkLabel* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (rs != NULL);
	_tmp0_ = tuba_app;
	g_signal_emit_by_name (_tmp0_, "relationship-invalidated", rs);
	_tmp1_ = self->priv->note;
	if (_tmp1_ != NULL) {
		tuba_widgets_account_row_update_note (self);
	}
}

static void
tuba_widgets_account_row_on_relationship_invalidated_global (TubaWidgetsAccountRow* self,
                                                             TubaAPIRelationship* new_relationship)
{
	gboolean _tmp0_ = FALSE;
	TubaAPIRelationship* _tmp1_;
	TubaAPIRelationship* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (new_relationship != NULL);
	_tmp1_ = tuba_widgets_account_row_get_rs (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		TubaAPIRelationship* _tmp3_;
		TubaAPIRelationship* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp3_ = tuba_widgets_account_row_get_rs (self);
		_tmp4_ = _tmp3_;
		_tmp5_ = tuba_api_relationship_get_id (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = tuba_api_relationship_get_id (new_relationship);
		_tmp8_ = _tmp7_;
		_tmp0_ = g_strcmp0 (_tmp6_, _tmp8_) != 0;
	}
	if (_tmp0_) {
		return;
	}
	tuba_widgets_account_row_set_rs (self, new_relationship);
}

TubaAPIAccount*
tuba_widgets_account_row_get_account (TubaWidgetsAccountRow* self)
{
	TubaAPIAccount* result;
	TubaAPIAccount* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_account;
	result = _tmp0_;
	return result;
}

static void
tuba_widgets_account_row_set_account (TubaWidgetsAccountRow* self,
                                      TubaAPIAccount* value)
{
	TubaAPIAccount* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_widgets_account_row_get_account (self);
	if (old_value != value) {
		TubaAPIAccount* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_account);
		self->priv->_account = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_widgets_account_row_properties[TUBA_WIDGETS_ACCOUNT_ROW_ACCOUNT_PROPERTY]);
	}
}

TubaAPIRelationship*
tuba_widgets_account_row_get_rs (TubaWidgetsAccountRow* self)
{
	TubaAPIRelationship* result;
	TubaAPIRelationship* _tmp0_ = NULL;
	TubaWidgetsRelationshipButton* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->rs_btn;
	if (_tmp1_ == NULL) {
		_tmp0_ = NULL;
	} else {
		TubaWidgetsRelationshipButton* _tmp2_;
		TubaAPIRelationship* _tmp3_;
		TubaAPIRelationship* _tmp4_;
		_tmp2_ = self->priv->rs_btn;
		_tmp3_ = tuba_widgets_relationship_button_get_rs (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_;
	}
	result = _tmp0_;
	return result;
}

static void
_tuba_widgets_account_row_on_rs_invalidation_tuba_api_relationship_invalidated (TubaAPIRelationship* _sender,
                                                                                gpointer self)
{
	tuba_widgets_account_row_on_rs_invalidation ((TubaWidgetsAccountRow*) self, _sender);
}

void
tuba_widgets_account_row_set_rs (TubaWidgetsAccountRow* self,
                                 TubaAPIRelationship* value)
{
	TubaWidgetsRelationshipButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->rs_btn;
	if (_tmp0_ != NULL) {
		TubaWidgetsRelationshipButton* _tmp1_;
		TubaAPIRelationship* _tmp2_;
		TubaAPIRelationship* _tmp3_;
		TubaWidgetsRelationshipButton* _tmp8_;
		TubaWidgetsRelationshipButton* _tmp9_;
		TubaAPIRelationship* _tmp10_;
		TubaAPIRelationship* _tmp11_;
		TubaWidgetsRelationshipButton* _tmp15_;
		TubaWidgetsRelationshipButton* _tmp16_;
		TubaAPIRelationship* _tmp17_;
		TubaAPIRelationship* _tmp18_;
		_tmp1_ = self->priv->rs_btn;
		_tmp2_ = tuba_widgets_relationship_button_get_rs (_tmp1_);
		_tmp3_ = _tmp2_;
		if (_tmp3_ != NULL) {
			TubaWidgetsRelationshipButton* _tmp4_;
			TubaAPIRelationship* _tmp5_;
			TubaAPIRelationship* _tmp6_;
			guint _tmp7_;
			_tmp4_ = self->priv->rs_btn;
			_tmp5_ = tuba_widgets_relationship_button_get_rs (_tmp4_);
			_tmp6_ = _tmp5_;
			g_signal_parse_name ("invalidated", TUBA_API_TYPE_RELATIONSHIP, &_tmp7_, NULL, FALSE);
			g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _tuba_widgets_account_row_on_rs_invalidation_tuba_api_relationship_invalidated, self);
		}
		_tmp8_ = self->priv->rs_btn;
		tuba_widgets_relationship_button_set_rs (_tmp8_, value);
		_tmp9_ = self->priv->rs_btn;
		_tmp10_ = tuba_widgets_relationship_button_get_rs (_tmp9_);
		_tmp11_ = _tmp10_;
		if (_tmp11_ != NULL) {
			TubaWidgetsRelationshipButton* _tmp12_;
			TubaAPIRelationship* _tmp13_;
			TubaAPIRelationship* _tmp14_;
			_tmp12_ = self->priv->rs_btn;
			_tmp13_ = tuba_widgets_relationship_button_get_rs (_tmp12_);
			_tmp14_ = _tmp13_;
			g_signal_connect_object (_tmp14_, "invalidated", (GCallback) _tuba_widgets_account_row_on_rs_invalidation_tuba_api_relationship_invalidated, self, 0);
		}
		_tmp15_ = self->priv->rs_btn;
		_tmp16_ = self->priv->rs_btn;
		_tmp17_ = tuba_widgets_relationship_button_get_rs (_tmp16_);
		_tmp18_ = _tmp17_;
		gtk_widget_set_visible ((GtkWidget*) _tmp15_, _tmp18_ != NULL);
		tuba_widgets_account_row_update_note (self);
	}
	g_object_notify_by_pspec ((GObject *) self, tuba_widgets_account_row_properties[TUBA_WIDGETS_ACCOUNT_ROW_RS_PROPERTY]);
}

gboolean
tuba_widgets_account_row_get_checkbox_sensitive (TubaWidgetsAccountRow* self)
{
	gboolean result;
	gboolean _tmp0_ = FALSE;
	GtkCheckButton* _tmp1_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->selection_button;
	if (_tmp1_ != NULL) {
		GtkCheckButton* _tmp2_;
		gboolean _tmp3_;
		gboolean _tmp4_;
		_tmp2_ = self->priv->selection_button;
		_tmp3_ = gtk_widget_get_sensitive ((GtkWidget*) _tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

void
tuba_widgets_account_row_set_checkbox_sensitive (TubaWidgetsAccountRow* self,
                                                 gboolean value)
{
	GtkCheckButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->selection_button;
	if (_tmp0_ != NULL) {
		GtkCheckButton* _tmp1_;
		_tmp1_ = self->priv->selection_button;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp1_, value);
	}
	g_object_notify_by_pspec ((GObject *) self, tuba_widgets_account_row_properties[TUBA_WIDGETS_ACCOUNT_ROW_CHECKBOX_SENSITIVE_PROPERTY]);
}

gboolean
tuba_widgets_account_row_get_checkbox_active (TubaWidgetsAccountRow* self)
{
	gboolean result;
	gboolean _tmp0_ = FALSE;
	GtkCheckButton* _tmp1_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->selection_button;
	if (_tmp1_ != NULL) {
		GtkCheckButton* _tmp2_;
		gboolean _tmp3_;
		gboolean _tmp4_;
		_tmp2_ = self->priv->selection_button;
		_tmp3_ = gtk_check_button_get_active (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

void
tuba_widgets_account_row_set_checkbox_active (TubaWidgetsAccountRow* self,
                                              gboolean value)
{
	GtkCheckButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->selection_button;
	if (_tmp0_ != NULL) {
		GtkCheckButton* _tmp1_;
		GtkCheckButton* _tmp2_;
		GtkCheckButton* _tmp3_;
		_tmp1_ = self->priv->selection_button;
		g_object_freeze_notify ((GObject*) _tmp1_);
		_tmp2_ = self->priv->selection_button;
		gtk_check_button_set_active (_tmp2_, value);
		_tmp3_ = self->priv->selection_button;
		g_object_thaw_notify ((GObject*) _tmp3_);
	}
	g_object_notify_by_pspec ((GObject *) self, tuba_widgets_account_row_properties[TUBA_WIDGETS_ACCOUNT_ROW_CHECKBOX_ACTIVE_PROPERTY]);
}

static void
tuba_widgets_account_row_class_init (TubaWidgetsAccountRowClass * klass,
                                     gpointer klass_data)
{
	tuba_widgets_account_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaWidgetsAccountRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_widgets_account_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_widgets_account_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_widgets_account_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_WIDGETS_ACCOUNT_ROW_ACCOUNT_PROPERTY, tuba_widgets_account_row_properties[TUBA_WIDGETS_ACCOUNT_ROW_ACCOUNT_PROPERTY] = g_param_spec_object ("account", "account", "account", TUBA_API_TYPE_ACCOUNT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_WIDGETS_ACCOUNT_ROW_RS_PROPERTY, tuba_widgets_account_row_properties[TUBA_WIDGETS_ACCOUNT_ROW_RS_PROPERTY] = g_param_spec_object ("rs", "rs", "rs", TUBA_API_TYPE_RELATIONSHIP, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_WIDGETS_ACCOUNT_ROW_CHECKBOX_SENSITIVE_PROPERTY, tuba_widgets_account_row_properties[TUBA_WIDGETS_ACCOUNT_ROW_CHECKBOX_SENSITIVE_PROPERTY] = g_param_spec_boolean ("checkbox-sensitive", "checkbox-sensitive", "checkbox-sensitive", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_WIDGETS_ACCOUNT_ROW_CHECKBOX_ACTIVE_PROPERTY, tuba_widgets_account_row_properties[TUBA_WIDGETS_ACCOUNT_ROW_CHECKBOX_ACTIVE_PROPERTY] = g_param_spec_boolean ("checkbox-active", "checkbox-active", "checkbox-active", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	tuba_widgets_account_row_signals[TUBA_WIDGETS_ACCOUNT_ROW_CHECKBOX_TOGGLED_SIGNAL] = g_signal_new ("checkbox-toggled", TUBA_WIDGETS_TYPE_ACCOUNT_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
	tuba_widgets_account_row_signals[TUBA_WIDGETS_ACCOUNT_ROW_BUTTON_CLICKED_SIGNAL] = g_signal_new ("button-clicked", TUBA_WIDGETS_TYPE_ACCOUNT_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	tuba_widgets_account_row_signals[TUBA_WIDGETS_ACCOUNT_ROW_OPEN_SIGNAL] = g_signal_new ("open", TUBA_WIDGETS_TYPE_ACCOUNT_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
tuba_widgets_account_row_instance_init (TubaWidgetsAccountRow * self,
                                        gpointer klass)
{
	self->priv = tuba_widgets_account_row_get_instance_private (self);
	self->priv->selection_button = NULL;
	self->priv->rs_btn = NULL;
	self->priv->note = NULL;
}

static void
tuba_widgets_account_row_finalize (GObject * obj)
{
	TubaWidgetsAccountRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_WIDGETS_TYPE_ACCOUNT_ROW, TubaWidgetsAccountRow);
	_g_object_unref0 (self->priv->_account);
	_g_object_unref0 (self->priv->main_box);
	_g_object_unref0 (self->priv->info_box);
	_g_object_unref0 (self->priv->selection_button);
	_g_object_unref0 (self->priv->rs_btn);
	_g_object_unref0 (self->priv->note);
	G_OBJECT_CLASS (tuba_widgets_account_row_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_widgets_account_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaWidgetsAccountRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_widgets_account_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaWidgetsAccountRow), 0, (GInstanceInitFunc) tuba_widgets_account_row_instance_init, NULL };
	GType tuba_widgets_account_row_type_id;
	tuba_widgets_account_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "TubaWidgetsAccountRow", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaWidgetsAccountRow_private_offset = g_type_add_instance_private (tuba_widgets_account_row_type_id, sizeof (TubaWidgetsAccountRowPrivate));
	return tuba_widgets_account_row_type_id;
}

GType
tuba_widgets_account_row_get_type (void)
{
	static GType tuba_widgets_account_row_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_widgets_account_row_type_id__once)) {
		GType tuba_widgets_account_row_type_id;
		tuba_widgets_account_row_type_id = tuba_widgets_account_row_get_type_once ();
		g_once_init_leave_pointer (&tuba_widgets_account_row_type_id__once, tuba_widgets_account_row_type_id);
	}
	return tuba_widgets_account_row_type_id__once;
}

static void
_vala_tuba_widgets_account_row_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec)
{
	TubaWidgetsAccountRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_WIDGETS_TYPE_ACCOUNT_ROW, TubaWidgetsAccountRow);
	switch (property_id) {
		case TUBA_WIDGETS_ACCOUNT_ROW_ACCOUNT_PROPERTY:
		g_value_set_object (value, tuba_widgets_account_row_get_account (self));
		break;
		case TUBA_WIDGETS_ACCOUNT_ROW_RS_PROPERTY:
		g_value_set_object (value, tuba_widgets_account_row_get_rs (self));
		break;
		case TUBA_WIDGETS_ACCOUNT_ROW_CHECKBOX_SENSITIVE_PROPERTY:
		g_value_set_boolean (value, tuba_widgets_account_row_get_checkbox_sensitive (self));
		break;
		case TUBA_WIDGETS_ACCOUNT_ROW_CHECKBOX_ACTIVE_PROPERTY:
		g_value_set_boolean (value, tuba_widgets_account_row_get_checkbox_active (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_widgets_account_row_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec)
{
	TubaWidgetsAccountRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_WIDGETS_TYPE_ACCOUNT_ROW, TubaWidgetsAccountRow);
	switch (property_id) {
		case TUBA_WIDGETS_ACCOUNT_ROW_ACCOUNT_PROPERTY:
		tuba_widgets_account_row_set_account (self, g_value_get_object (value));
		break;
		case TUBA_WIDGETS_ACCOUNT_ROW_RS_PROPERTY:
		tuba_widgets_account_row_set_rs (self, g_value_get_object (value));
		break;
		case TUBA_WIDGETS_ACCOUNT_ROW_CHECKBOX_SENSITIVE_PROPERTY:
		tuba_widgets_account_row_set_checkbox_sensitive (self, g_value_get_boolean (value));
		break;
		case TUBA_WIDGETS_ACCOUNT_ROW_CHECKBOX_ACTIVE_PROPERTY:
		tuba_widgets_account_row_set_checkbox_active (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

