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

#include <adwaita.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <libsoup/soup.h>
#include <json-glib/json-glib.h>
#include <gee.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_DIALOGS_TYPE_PROFILE_LISTS (tuba_dialogs_profile_lists_get_type ())
#define TUBA_DIALOGS_PROFILE_LISTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_PROFILE_LISTS, TubaDialogsProfileLists))
#define TUBA_DIALOGS_PROFILE_LISTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_PROFILE_LISTS, TubaDialogsProfileListsClass))
#define TUBA_DIALOGS_IS_PROFILE_LISTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_PROFILE_LISTS))
#define TUBA_DIALOGS_IS_PROFILE_LISTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_PROFILE_LISTS))
#define TUBA_DIALOGS_PROFILE_LISTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_PROFILE_LISTS, TubaDialogsProfileListsClass))

typedef struct _TubaDialogsProfileLists TubaDialogsProfileLists;
typedef struct _TubaDialogsProfileListsClass TubaDialogsProfileListsClass;
typedef struct _TubaDialogsProfileListsPrivate TubaDialogsProfileListsPrivate;
enum  {
	TUBA_DIALOGS_PROFILE_LISTS_0_PROPERTY,
	TUBA_DIALOGS_PROFILE_LISTS_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_profile_lists_properties[TUBA_DIALOGS_PROFILE_LISTS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define TUBA_TYPE_REQUEST_V2 (tuba_request_v2_get_type ())
#define TUBA_REQUEST_V2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_REQUEST_V2, TubaRequestV2))
#define TUBA_REQUEST_V2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_REQUEST_V2, TubaRequestV2Class))
#define TUBA_IS_REQUEST_V2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_REQUEST_V2))
#define TUBA_IS_REQUEST_V2_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_REQUEST_V2))
#define TUBA_REQUEST_V2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_REQUEST_V2, TubaRequestV2Class))

typedef struct _TubaRequestV2 TubaRequestV2;
typedef struct _TubaRequestV2Class TubaRequestV2Class;
typedef enum  {
	TUBA_REQUEST_V2_METHOD_GET,
	TUBA_REQUEST_V2_METHOD_POST,
	TUBA_REQUEST_V2_METHOD_PUT,
	TUBA_REQUEST_V2_METHOD_DELETE,
	TUBA_REQUEST_V2_METHOD_PATCH
} TubaRequestV2Method;

#define TUBA_REQUEST_V2_TYPE_METHOD (tuba_request_v2_method_get_type ())

#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_TYPE_OOPSIE (tuba_oopsie_get_type ())
typedef struct _Block32Data Block32Data;
typedef void (*TubaNetworkNodeCallback) (JsonNode* node, gpointer user_data, GError** error);

#define TUBA_API_TYPE_LIST (tuba_api_list_get_type ())
#define TUBA_API_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_LIST, TubaAPIList))
#define TUBA_API_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_LIST, TubaAPIListClass))
#define TUBA_API_IS_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_LIST))
#define TUBA_API_IS_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_LIST))
#define TUBA_API_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_LIST, TubaAPIListClass))

typedef struct _TubaAPIList TubaAPIList;
typedef struct _TubaAPIListClass TubaAPIListClass;

#define TUBA_DIALOGS_PROFILE_LISTS_TYPE_AR_ROW (tuba_dialogs_profile_lists_ar_row_get_type ())
#define TUBA_DIALOGS_PROFILE_LISTS_AR_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_PROFILE_LISTS_TYPE_AR_ROW, TubaDialogsProfileListsARRow))
#define TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_PROFILE_LISTS_TYPE_AR_ROW, TubaDialogsProfileListsARRowClass))
#define TUBA_DIALOGS_PROFILE_LISTS_IS_AR_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_PROFILE_LISTS_TYPE_AR_ROW))
#define TUBA_DIALOGS_PROFILE_LISTS_IS_AR_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_PROFILE_LISTS_TYPE_AR_ROW))
#define TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_PROFILE_LISTS_TYPE_AR_ROW, TubaDialogsProfileListsARRowClass))

typedef struct _TubaDialogsProfileListsARRow TubaDialogsProfileListsARRow;
typedef struct _TubaDialogsProfileListsARRowClass TubaDialogsProfileListsARRowClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _TubaDialogsProfileListsFillArListData TubaDialogsProfileListsFillArListData;
typedef struct _TubaDialogsProfileListsARRowPrivate TubaDialogsProfileListsARRowPrivate;
enum  {
	TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_0_PROPERTY,
	TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_IS_ALREADY_IN_LIST_PROPERTY,
	TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_profile_lists_ar_row_properties[TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_NUM_PROPERTIES];
typedef struct _TubaDialogsProfileListsArRowHandleListEditData TubaDialogsProfileListsArRowHandleListEditData;
enum  {
	TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_ERRORED_SIGNAL,
	TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_TOAST_SIGNAL,
	TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_NUM_SIGNALS
};
static guint tuba_dialogs_profile_lists_ar_row_signals[TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_NUM_SIGNALS] = {0};
enum  {
	TUBA_DIALOGS_PROFILE_LISTS_ERRORED_SIGNAL,
	TUBA_DIALOGS_PROFILE_LISTS_NUM_SIGNALS
};
static guint tuba_dialogs_profile_lists_signals[TUBA_DIALOGS_PROFILE_LISTS_NUM_SIGNALS] = {0};

struct _TubaDialogsProfileLists {
	AdwDialog parent_instance;
	TubaDialogsProfileListsPrivate * priv;
};

struct _TubaDialogsProfileListsClass {
	AdwDialogClass parent_class;
};

struct _TubaDialogsProfileListsPrivate {
	AdwPreferencesPage* preferences_page;
	AdwPreferencesGroup* preferences_group;
	AdwToastOverlay* toast_overlay;
	AdwStatusPage* no_lists_page;
	gchar* profile_id;
	gchar* profile_handle;
};

typedef enum  {
	TUBA_OOPSIE_USER,
	TUBA_OOPSIE_PARSING,
	TUBA_OOPSIE_INSTANCE,
	TUBA_OOPSIE_INTERNAL,
	TUBA_OOPSIE_HTTP_401 = 401,
	TUBA_OOPSIE_HTTP_403 = 403,
	TUBA_OOPSIE_HTTP_404 = 404,
	TUBA_OOPSIE_HTTP_410 = 410,
	TUBA_OOPSIE_HTTP_422 = 422,
	TUBA_OOPSIE_HTTP_429 = 429,
	TUBA_OOPSIE_HTTP_500 = 500,
	TUBA_OOPSIE_HTTP_503 = 503
} TubaOopsie;
#define TUBA_OOPSIE tuba_oopsie_quark ()

struct _Block32Data {
	int _ref_count_;
	TubaDialogsProfileLists* self;
	gboolean added;
	GeeArrayList* in_list;
};

struct _TubaDialogsProfileListsFillArListData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaDialogsProfileLists* self;
	TubaRequestV2* req;
	TubaAccountStore* _tmp0_;
	TubaInstanceAccount* _tmp1_;
	TubaInstanceAccount* _tmp2_;
	TubaInstanceAccount* _tmp3_;
	TubaRequestV2* _tmp4_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp5_;
	GInputStream* _tmp6_;
	JsonParser* parser;
	GInputStream* _tmp7_;
	JsonParser* _tmp8_;
	JsonParser* _tmp9_;
	TubaRequestV2* list_req;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	TubaAccountStore* _tmp14_;
	TubaInstanceAccount* _tmp15_;
	TubaInstanceAccount* _tmp16_;
	TubaInstanceAccount* _tmp17_;
	TubaRequestV2* _tmp18_;
	TubaRequestV2* _tmp19_;
	Block32Data* _data32_;
	GInputStream* list_in_stream;
	TubaRequestV2* _tmp20_;
	GInputStream* _tmp21_;
	JsonParser* list_parser;
	GInputStream* _tmp22_;
	JsonParser* _tmp23_;
	GeeArrayList* _tmp24_;
	JsonParser* _tmp25_;
	JsonParser* _tmp26_;
	AdwPreferencesPage* _tmp27_;
	AdwPreferencesGroup* _tmp28_;
	AdwToastOverlay* _tmp29_;
	AdwPreferencesPage* _tmp30_;
	AdwToastOverlay* _tmp31_;
	AdwToastOverlay* _tmp32_;
	AdwStatusPage* _tmp33_;
	GError* e;
	GError* _tmp34_;
	GError* _tmp35_;
	const gchar* _tmp36_;
	AdwToastOverlay* _tmp37_;
	AdwStatusPage* _tmp38_;
	GError* _vala1_e;
	GError* _tmp39_;
	GError* _tmp40_;
	const gchar* _tmp41_;
	GError* _inner_error0_;
};

struct _TubaDialogsProfileListsARRow {
	AdwActionRow parent_instance;
	TubaDialogsProfileListsARRowPrivate * priv;
};

struct _TubaDialogsProfileListsARRowClass {
	AdwActionRowClass parent_class;
};

struct _TubaDialogsProfileListsARRowPrivate {
	gboolean _is_already_in_list;
	TubaAPIList* _list;
	GtkButton* add_button;
	gchar* profile_id;
	gchar* profile_handle;
};

struct _TubaDialogsProfileListsArRowHandleListEditData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaDialogsProfileListsARRow* self;
	JsonBuilder* builder;
	JsonBuilder* _tmp0_;
	JsonBuilder* _tmp1_;
	JsonBuilder* _tmp2_;
	JsonBuilder* _tmp3_;
	JsonBuilder* _tmp4_;
	const gchar* _tmp5_;
	JsonBuilder* _tmp6_;
	JsonBuilder* _tmp7_;
	gchar* endpoint;
	TubaAPIList* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	TubaRequestV2Method _tmp13_;
	gboolean _tmp14_;
	TubaRequestV2* req;
	const gchar* _tmp15_;
	TubaAccountStore* _tmp16_;
	TubaInstanceAccount* _tmp17_;
	TubaInstanceAccount* _tmp18_;
	TubaInstanceAccount* _tmp19_;
	TubaRequestV2* _tmp20_;
	JsonBuilder* _tmp21_;
	GInputStream* _tmp22_;
	GInputStream* _tmp23_;
	gchar* toast_msg;
	gchar* _tmp24_;
	gboolean _tmp25_;
	const gchar* _tmp26_;
	TubaAPIList* _tmp27_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	const gchar* _tmp31_;
	TubaAPIList* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	gchar* _tmp35_;
	gboolean _tmp36_;
	AdwToast* toasted;
	const gchar* _tmp37_;
	AdwToast* _tmp38_;
	AdwToast* _tmp39_;
	GError* e;
	GError* _tmp40_;
	GError* _inner_error0_;
};

static gint TubaDialogsProfileLists_private_offset;
static gpointer tuba_dialogs_profile_lists_parent_class = NULL;
VALA_EXTERN TubaAccountStore* tuba_accounts;
static gint TubaDialogsProfileListsARRow_private_offset;
static gpointer tuba_dialogs_profile_lists_ar_row_parent_class = NULL;

VALA_EXTERN GType tuba_dialogs_profile_lists_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsProfileLists, g_object_unref)
VALA_EXTERN TubaDialogsProfileLists* tuba_dialogs_profile_lists_new (const gchar* profile_id,
                                                         const gchar* profile_handle);
VALA_EXTERN TubaDialogsProfileLists* tuba_dialogs_profile_lists_construct (GType object_type,
                                                               const gchar* profile_id,
                                                               const gchar* profile_handle);
static void tuba_dialogs_profile_lists_fill_ar_list (TubaDialogsProfileLists* self,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
static void tuba_dialogs_profile_lists_fill_ar_list_finish (TubaDialogsProfileLists* self,
                                                     GAsyncResult* _res_);
static void tuba_dialogs_profile_lists_fill_ar_list_data_free (gpointer _data);
static gboolean tuba_dialogs_profile_lists_fill_ar_list_co (TubaDialogsProfileListsFillArListData* _data_);
VALA_EXTERN GType tuba_request_v2_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaRequestV2, g_object_unref)
VALA_EXTERN GType tuba_request_v2_method_get_type (void) G_GNUC_CONST ;
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 TubaRequestV2* tuba_request_v2_new (const gchar* url,
                                    TubaRequestV2Method method);
VALA_EXTERN TubaRequestV2* tuba_request_v2_construct (GType object_type,
                                          const gchar* url,
                                          TubaRequestV2Method method);
VALA_EXTERN void tuba_request_v2_set_account (TubaRequestV2* self,
                                  TubaInstanceAccount* value);
VALA_EXTERN void tuba_request_v2_set_ctx (TubaRequestV2* self,
                              GtkWidget* value);
VALA_EXTERN void tuba_request_v2_exec (TubaRequestV2* self,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_);
VALA_EXTERN GQuark tuba_oopsie_quark (void);
VALA_EXTERN GType tuba_oopsie_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GInputStream* tuba_request_v2_exec_finish (TubaRequestV2* self,
                                           GAsyncResult* _res_,
                                           SoupMessageHeaders** response_headers,
                                           GError** error);
static void tuba_dialogs_profile_lists_fill_ar_list_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_);
VALA_EXTERN void tuba_network_get_parser_from_inputstream_async (GInputStream* in_stream,
                                                     GCancellable* cancellable,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_);
VALA_EXTERN JsonParser* tuba_network_get_parser_from_inputstream_finish (GAsyncResult* _res_,
                                                             GError** error);
VALA_EXTERN guint tuba_network_get_array_size (JsonParser* parser);
static Block32Data* block32_data_ref (Block32Data* _data32_);
static void block32_data_unref (void * _userdata_);
VALA_EXTERN void tuba_network_parse_array (JsonParser* parser,
                               TubaNetworkNodeCallback cb,
                               gpointer cb_target,
                               GDestroyNotify cb_target_destroy_notify,
                               GError** error);
static void _____lambda155_ (Block32Data* _data32_,
                      JsonNode* node,
                      GError** error);
VALA_EXTERN GType tuba_api_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIList, g_object_unref)
VALA_EXTERN TubaAPIList* tuba_api_list_from (JsonNode* node,
                                 GError** error);
VALA_EXTERN const gchar* tuba_api_list_get_id (TubaAPIList* self);
static void ______lambda155__tuba_network_node_callback (JsonNode* node,
                                                  gpointer self,
                                                  GError** error);
static void _____lambda161_ (Block32Data* _data32_,
                      JsonNode* node,
                      GError** error);
VALA_EXTERN GType tuba_dialogs_profile_lists_ar_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsProfileListsARRow, g_object_unref)
VALA_EXTERN TubaDialogsProfileListsARRow* tuba_dialogs_profile_lists_ar_row_new (TubaAPIList* list,
                                                                     gboolean is_in_list,
                                                                     const gchar* profile_id,
                                                                     const gchar* profile_handle);
VALA_EXTERN TubaDialogsProfileListsARRow* tuba_dialogs_profile_lists_ar_row_construct (GType object_type,
                                                                           TubaAPIList* list,
                                                                           gboolean is_in_list,
                                                                           const gchar* profile_id,
                                                                           const gchar* profile_handle);
static void tuba_dialogs_profile_lists_on_row_toast (TubaDialogsProfileLists* self,
                                              AdwToast* toast);
static void _tuba_dialogs_profile_lists_on_row_toast_tuba_dialogs_profile_lists_ar_row_toast (TubaDialogsProfileListsARRow* _sender,
                                                                                       AdwToast* toast,
                                                                                       gpointer self);
static void tuba_dialogs_profile_lists_on_row_errored (TubaDialogsProfileLists* self,
                                                GError* e);
static void _tuba_dialogs_profile_lists_on_row_errored_tuba_dialogs_profile_lists_ar_row_errored (TubaDialogsProfileListsARRow* _sender,
                                                                                           GError* _error_,
                                                                                           gpointer self);
static void ______lambda161__tuba_network_node_callback (JsonNode* node,
                                                  gpointer self,
                                                  GError** error);
static void g_cclosure_user_marshal_VOID__INT_STRING (GClosure * closure,
                                               GValue * return_value,
                                               guint n_param_values,
                                               const GValue * param_values,
                                               gpointer invocation_hint,
                                               gpointer marshal_data);
static void tuba_dialogs_profile_lists_ar_row_set_list (TubaDialogsProfileListsARRow* self,
                                                 TubaAPIList* value);
VALA_EXTERN void tuba_dialogs_profile_lists_ar_row_set_is_already_in_list (TubaDialogsProfileListsARRow* self,
                                                               gboolean value);
VALA_EXTERN const gchar* tuba_api_list_get_title (TubaAPIList* self);
static void tuba_dialogs_profile_lists_ar_row_on_clicked (TubaDialogsProfileListsARRow* self);
static void _tuba_dialogs_profile_lists_ar_row_on_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self);
static void tuba_dialogs_profile_lists_ar_row_update_button_state (TubaDialogsProfileListsARRow* self);
static void tuba_dialogs_profile_lists_ar_row_handle_list_edit (TubaDialogsProfileListsARRow* self,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
static void tuba_dialogs_profile_lists_ar_row_handle_list_edit_finish (TubaDialogsProfileListsARRow* self,
                                                                GAsyncResult* _res_);
VALA_EXTERN gboolean tuba_dialogs_profile_lists_ar_row_get_is_already_in_list (TubaDialogsProfileListsARRow* self);
static TubaAPIList* tuba_dialogs_profile_lists_ar_row_get_list (TubaDialogsProfileListsARRow* self);
static void tuba_dialogs_profile_lists_ar_row_handle_list_edit_data_free (gpointer _data);
static gboolean tuba_dialogs_profile_lists_ar_row_handle_list_edit_co (TubaDialogsProfileListsArRowHandleListEditData* _data_);
VALA_EXTERN void tuba_request_v2_set_body_from_json (TubaRequestV2* self,
                                         JsonBuilder* json_builder);
static void tuba_dialogs_profile_lists_ar_row_handle_list_edit_ready (GObject* source_object,
                                                               GAsyncResult* _res_,
                                                               gpointer _user_data_);
static void tuba_dialogs_profile_lists_ar_row_finalize (GObject * obj);
static GType tuba_dialogs_profile_lists_ar_row_get_type_once (void);
static void _vala_tuba_dialogs_profile_lists_ar_row_get_property (GObject * object,
                                                           guint property_id,
                                                           GValue * value,
                                                           GParamSpec * pspec);
static void _vala_tuba_dialogs_profile_lists_ar_row_set_property (GObject * object,
                                                           guint property_id,
                                                           const GValue * value,
                                                           GParamSpec * pspec);
static void tuba_dialogs_profile_lists_finalize (GObject * obj);
static GType tuba_dialogs_profile_lists_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_dialogs_profile_lists_get_instance_private (TubaDialogsProfileLists* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsProfileLists_private_offset);
}

TubaDialogsProfileLists*
tuba_dialogs_profile_lists_construct (GType object_type,
                                      const gchar* profile_id,
                                      const gchar* profile_handle)
{
	TubaDialogsProfileLists * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	AdwSpinner* spinner = NULL;
	AdwSpinner* _tmp4_ = NULL;
	AdwToolbarView* toolbar_view = NULL;
	AdwToolbarView* _tmp5_;
	AdwHeaderBar* headerbar = NULL;
	AdwHeaderBar* _tmp6_;
	AdwToastOverlay* _tmp7_ = NULL;
	AdwToastOverlay* _tmp8_;
	AdwToastOverlay* _tmp9_;
	AdwPreferencesPage* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	AdwPreferencesGroup* _tmp13_ = NULL;
	gchar* _tmp14_;
	gchar* _tmp15_;
	AdwStatusPage* _tmp16_ = NULL;
	g_return_val_if_fail (profile_id != NULL, NULL);
	g_return_val_if_fail (profile_handle != NULL, NULL);
	self = (TubaDialogsProfileLists*) g_object_new (object_type, NULL);
	_tmp0_ = g_strdup_printf (_ ("Add or remove \"%s\" to or from a list"), profile_handle);
	_tmp1_ = _tmp0_;
	adw_dialog_set_title ((AdwDialog*) self, _tmp1_);
	_g_free0 (_tmp1_);
	adw_dialog_set_content_width ((AdwDialog*) self, 600);
	adw_dialog_set_content_height ((AdwDialog*) self, 550);
	_tmp2_ = g_strdup (profile_id);
	_g_free0 (self->priv->profile_id);
	self->priv->profile_id = _tmp2_;
	_tmp3_ = g_strdup (profile_handle);
	_g_free0 (self->priv->profile_handle);
	self->priv->profile_handle = _tmp3_;
	_tmp4_ = (AdwSpinner*) adw_spinner_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_CENTER);
	gtk_widget_set_valign ((GtkWidget*) _tmp4_, GTK_ALIGN_CENTER);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp4_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp4_, TRUE);
	g_object_set ((GtkWidget*) _tmp4_, "width-request", 32, NULL);
	g_object_set ((GtkWidget*) _tmp4_, "height-request", 32, NULL);
	g_object_ref_sink (_tmp4_);
	spinner = _tmp4_;
	_tmp5_ = (AdwToolbarView*) adw_toolbar_view_new ();
	g_object_ref_sink (_tmp5_);
	toolbar_view = _tmp5_;
	_tmp6_ = (AdwHeaderBar*) adw_header_bar_new ();
	g_object_ref_sink (_tmp6_);
	headerbar = _tmp6_;
	_tmp7_ = (AdwToastOverlay*) adw_toast_overlay_new ();
	gtk_widget_set_vexpand ((GtkWidget*) _tmp7_, TRUE);
	gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->toast_overlay);
	self->priv->toast_overlay = _tmp7_;
	_tmp8_ = self->priv->toast_overlay;
	adw_toast_overlay_set_child (_tmp8_, (GtkWidget*) spinner);
	adw_toolbar_view_add_top_bar (toolbar_view, (GtkWidget*) headerbar);
	_tmp9_ = self->priv->toast_overlay;
	adw_toolbar_view_set_content (toolbar_view, (GtkWidget*) _tmp9_);
	_tmp10_ = (AdwPreferencesPage*) adw_preferences_page_new ();
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->preferences_page);
	self->priv->preferences_page = _tmp10_;
	_tmp11_ = g_strdup (_ ("Lists"));
	_tmp12_ = g_strdup_printf (_ ("Select the list to add or remove \"%s\" to or from:"), profile_handle);
	_tmp13_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	adw_preferences_group_set_title (_tmp13_, _tmp11_);
	_g_free0 (_tmp11_);
	adw_preferences_group_set_description (_tmp13_, _tmp12_);
	_g_free0 (_tmp12_);
	g_object_ref_sink (_tmp13_);
	_g_object_unref0 (self->priv->preferences_group);
	self->priv->preferences_group = _tmp13_;
	_tmp14_ = g_strdup ("dialog-error-symbolic");
	_tmp15_ = g_strdup (_ ("You don't have any lists"));
	_tmp16_ = (AdwStatusPage*) adw_status_page_new ();
	adw_status_page_set_icon_name (_tmp16_, _tmp14_);
	_g_free0 (_tmp14_);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp16_, TRUE);
	adw_status_page_set_title (_tmp16_, _tmp15_);
	_g_free0 (_tmp15_);
	g_object_ref_sink (_tmp16_);
	_g_object_unref0 (self->priv->no_lists_page);
	self->priv->no_lists_page = _tmp16_;
	tuba_dialogs_profile_lists_fill_ar_list (self, NULL, NULL);
	adw_dialog_set_child ((AdwDialog*) self, (GtkWidget*) toolbar_view);
	_g_object_unref0 (headerbar);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (spinner);
	return self;
}

TubaDialogsProfileLists*
tuba_dialogs_profile_lists_new (const gchar* profile_id,
                                const gchar* profile_handle)
{
	return tuba_dialogs_profile_lists_construct (TUBA_DIALOGS_TYPE_PROFILE_LISTS, profile_id, profile_handle);
}

static void
tuba_dialogs_profile_lists_fill_ar_list_data_free (gpointer _data)
{
	TubaDialogsProfileListsFillArListData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaDialogsProfileListsFillArListData, _data_);
}

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

static void
tuba_dialogs_profile_lists_fill_ar_list (TubaDialogsProfileLists* self,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	TubaDialogsProfileListsFillArListData* _data_;
	TubaDialogsProfileLists* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaDialogsProfileListsFillArListData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_dialogs_profile_lists_fill_ar_list_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_dialogs_profile_lists_fill_ar_list_co (_data_);
}

static void
tuba_dialogs_profile_lists_fill_ar_list_finish (TubaDialogsProfileLists* self,
                                                GAsyncResult* _res_)
{
	TubaDialogsProfileListsFillArListData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_dialogs_profile_lists_fill_ar_list_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_)
{
	TubaDialogsProfileListsFillArListData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_dialogs_profile_lists_fill_ar_list_co (_data_);
}

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 Block32Data*
block32_data_ref (Block32Data* _data32_)
{
	g_atomic_int_inc (&_data32_->_ref_count_);
	return _data32_;
}

static void
block32_data_unref (void * _userdata_)
{
	Block32Data* _data32_;
	_data32_ = (Block32Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data32_->_ref_count_)) {
		TubaDialogsProfileLists* self;
		self = _data32_->self;
		_g_object_unref0 (_data32_->in_list);
		_g_object_unref0 (self);
		g_slice_free (Block32Data, _data32_);
	}
}

static void
_____lambda155_ (Block32Data* _data32_,
                 JsonNode* node,
                 GError** error)
{
	TubaDialogsProfileLists* self;
	TubaAPIList* list = NULL;
	TubaAPIList* _tmp0_;
	GeeArrayList* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GError* _inner_error0_ = NULL;
	self = _data32_->self;
	g_return_if_fail (node != NULL);
	_tmp0_ = tuba_api_list_from (node, &_inner_error0_);
	list = _tmp0_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	_tmp1_ = _data32_->in_list;
	_tmp2_ = tuba_api_list_get_id (list);
	_tmp3_ = _tmp2_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp1_, _tmp3_);
	_g_object_unref0 (list);
}

static void
______lambda155__tuba_network_node_callback (JsonNode* node,
                                             gpointer self,
                                             GError** error)
{
	_____lambda155_ (self, node, error);
}

static void
_tuba_dialogs_profile_lists_on_row_toast_tuba_dialogs_profile_lists_ar_row_toast (TubaDialogsProfileListsARRow* _sender,
                                                                                  AdwToast* toast,
                                                                                  gpointer self)
{
	tuba_dialogs_profile_lists_on_row_toast ((TubaDialogsProfileLists*) self, toast);
}

static void
_tuba_dialogs_profile_lists_on_row_errored_tuba_dialogs_profile_lists_ar_row_errored (TubaDialogsProfileListsARRow* _sender,
                                                                                      GError* _error_,
                                                                                      gpointer self)
{
	tuba_dialogs_profile_lists_on_row_errored ((TubaDialogsProfileLists*) self, _error_);
}

static void
_____lambda161_ (Block32Data* _data32_,
                 JsonNode* node,
                 GError** error)
{
	TubaDialogsProfileLists* self;
	TubaAPIList* list = NULL;
	TubaAPIList* _tmp0_;
	TubaDialogsProfileListsARRow* row = NULL;
	GeeArrayList* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	TubaDialogsProfileListsARRow* _tmp6_;
	TubaDialogsProfileListsARRow* _tmp7_;
	TubaDialogsProfileListsARRow* _tmp8_;
	AdwPreferencesGroup* _tmp9_;
	TubaDialogsProfileListsARRow* _tmp10_;
	GError* _inner_error0_ = NULL;
	self = _data32_->self;
	g_return_if_fail (node != NULL);
	_tmp0_ = tuba_api_list_from (node, &_inner_error0_);
	list = _tmp0_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	_tmp1_ = _data32_->in_list;
	_tmp2_ = tuba_api_list_get_id (list);
	_tmp3_ = _tmp2_;
	_tmp4_ = self->priv->profile_id;
	_tmp5_ = self->priv->profile_handle;
	_tmp6_ = tuba_dialogs_profile_lists_ar_row_new (list, gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp1_, _tmp3_), _tmp4_, _tmp5_);
	g_object_ref_sink (_tmp6_);
	row = _tmp6_;
	_tmp7_ = row;
	g_signal_connect_object (_tmp7_, "toast", (GCallback) _tuba_dialogs_profile_lists_on_row_toast_tuba_dialogs_profile_lists_ar_row_toast, self, 0);
	_tmp8_ = row;
	g_signal_connect_object (_tmp8_, "errored", (GCallback) _tuba_dialogs_profile_lists_on_row_errored_tuba_dialogs_profile_lists_ar_row_errored, self, 0);
	_tmp9_ = self->priv->preferences_group;
	_tmp10_ = row;
	adw_preferences_group_add (_tmp9_, (GtkWidget*) _tmp10_);
	_data32_->added = TRUE;
	_g_object_unref0 (row);
	_g_object_unref0 (list);
}

static void
______lambda161__tuba_network_node_callback (JsonNode* node,
                                             gpointer self,
                                             GError** error)
{
	_____lambda161_ (self, node, error);
}

static gboolean
tuba_dialogs_profile_lists_fill_ar_list_co (TubaDialogsProfileListsFillArListData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = tuba_accounts;
	_data_->_tmp1_ = tuba_account_store_get_active (_data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = _g_object_ref0 (_data_->_tmp2_);
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = tuba_request_v2_new ("/api/v1/lists/", TUBA_REQUEST_V2_METHOD_GET);
	tuba_request_v2_set_account (_data_->_tmp4_, _data_->_tmp3_);
	_g_object_unref0 (_data_->_tmp3_);
	tuba_request_v2_set_ctx (_data_->_tmp4_, (GtkWidget*) _data_->self);
	_data_->req = _data_->_tmp4_;
	{
		_data_->_tmp5_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp5_, tuba_dialogs_profile_lists_fill_ar_list_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp6_ = tuba_request_v2_exec_finish (_data_->_tmp5_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp6_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp7_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp7_, NULL, tuba_dialogs_profile_lists_fill_ar_list_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp8_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp8_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp9_ = _data_->parser;
		if (tuba_network_get_array_size (_data_->_tmp9_) > ((guint) 0)) {
			_data_->_tmp10_ = _data_->self->priv->profile_id;
			_data_->_tmp11_ = string_to_string (_data_->_tmp10_);
			_data_->_tmp12_ = g_strconcat ("/api/v1/accounts/", _data_->_tmp11_, "/lists", NULL);
			_data_->_tmp13_ = _data_->_tmp12_;
			_data_->_tmp14_ = tuba_accounts;
			_data_->_tmp15_ = tuba_account_store_get_active (_data_->_tmp14_);
			_data_->_tmp16_ = _data_->_tmp15_;
			_data_->_tmp17_ = _g_object_ref0 (_data_->_tmp16_);
			_data_->_tmp18_ = NULL;
			_data_->_tmp18_ = tuba_request_v2_new (_data_->_tmp13_, TUBA_REQUEST_V2_METHOD_GET);
			tuba_request_v2_set_account (_data_->_tmp18_, _data_->_tmp17_);
			_g_object_unref0 (_data_->_tmp17_);
			tuba_request_v2_set_ctx (_data_->_tmp18_, (GtkWidget*) _data_->self);
			_data_->_tmp19_ = _data_->_tmp18_;
			_g_free0 (_data_->_tmp13_);
			_data_->list_req = _data_->_tmp19_;
			{
				_data_->_data32_ = g_slice_new0 (Block32Data);
				_data_->_data32_->_ref_count_ = 1;
				_data_->_data32_->self = g_object_ref (_data_->self);
				_data_->_tmp20_ = _data_->list_req;
				_data_->_state_ = 3;
				tuba_request_v2_exec (_data_->_tmp20_, tuba_dialogs_profile_lists_fill_ar_list_ready, _data_);
				return FALSE;
				_state_3:
				_data_->_tmp21_ = tuba_request_v2_exec_finish (_data_->_tmp20_, _data_->_res_, NULL, &_data_->_inner_error0_);
				_data_->list_in_stream = _data_->_tmp21_;
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					block32_data_unref (_data_->_data32_);
					_data_->_data32_ = NULL;
					goto __catch1_g_error;
				}
				_data_->_tmp22_ = _data_->list_in_stream;
				_data_->_state_ = 4;
				tuba_network_get_parser_from_inputstream_async (_data_->_tmp22_, NULL, tuba_dialogs_profile_lists_fill_ar_list_ready, _data_);
				return FALSE;
				_state_4:
				_data_->_tmp23_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
				_data_->list_parser = _data_->_tmp23_;
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					_g_object_unref0 (_data_->list_in_stream);
					block32_data_unref (_data_->_data32_);
					_data_->_data32_ = NULL;
					goto __catch1_g_error;
				}
				_data_->_data32_->added = FALSE;
				_data_->_tmp24_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
				_data_->_data32_->in_list = _data_->_tmp24_;
				_data_->_tmp25_ = _data_->list_parser;
				tuba_network_parse_array (_data_->_tmp25_, ______lambda155__tuba_network_node_callback, block32_data_ref (_data_->_data32_), block32_data_unref, &_data_->_inner_error0_);
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					_g_object_unref0 (_data_->list_parser);
					_g_object_unref0 (_data_->list_in_stream);
					block32_data_unref (_data_->_data32_);
					_data_->_data32_ = NULL;
					goto __catch1_g_error;
				}
				_data_->_tmp26_ = _data_->parser;
				tuba_network_parse_array (_data_->_tmp26_, ______lambda161__tuba_network_node_callback, block32_data_ref (_data_->_data32_), block32_data_unref, &_data_->_inner_error0_);
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					_g_object_unref0 (_data_->list_parser);
					_g_object_unref0 (_data_->list_in_stream);
					block32_data_unref (_data_->_data32_);
					_data_->_data32_ = NULL;
					goto __catch1_g_error;
				}
				if (_data_->_data32_->added) {
					_data_->_tmp27_ = _data_->self->priv->preferences_page;
					_data_->_tmp28_ = _data_->self->priv->preferences_group;
					adw_preferences_page_add (_data_->_tmp27_, _data_->_tmp28_);
					_data_->_tmp29_ = _data_->self->priv->toast_overlay;
					_data_->_tmp30_ = _data_->self->priv->preferences_page;
					adw_toast_overlay_set_child (_data_->_tmp29_, (GtkWidget*) _data_->_tmp30_);
					_data_->_tmp31_ = _data_->self->priv->toast_overlay;
					gtk_widget_set_valign ((GtkWidget*) _data_->_tmp31_, GTK_ALIGN_FILL);
				} else {
					_data_->_tmp32_ = _data_->self->priv->toast_overlay;
					_data_->_tmp33_ = _data_->self->priv->no_lists_page;
					adw_toast_overlay_set_child (_data_->_tmp32_, (GtkWidget*) _data_->_tmp33_);
				}
				_g_object_unref0 (_data_->list_parser);
				_g_object_unref0 (_data_->list_in_stream);
				block32_data_unref (_data_->_data32_);
				_data_->_data32_ = NULL;
			}
			goto __finally1;
			__catch1_g_error:
			{
				_data_->e = _data_->_inner_error0_;
				_data_->_inner_error0_ = NULL;
				_data_->_tmp34_ = _data_->e;
				_data_->_tmp35_ = _data_->e;
				_data_->_tmp36_ = _data_->_tmp35_->message;
				g_signal_emit (_data_->self, tuba_dialogs_profile_lists_signals[TUBA_DIALOGS_PROFILE_LISTS_ERRORED_SIGNAL], 0, (gint32) _data_->_tmp34_->code, _data_->_tmp36_);
				_g_error_free0 (_data_->e);
			}
			__finally1:
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_object_unref0 (_data_->list_req);
				_g_object_unref0 (_data_->parser);
				_g_object_unref0 (_data_->in_stream);
				goto __catch0_g_error;
			}
			_g_object_unref0 (_data_->list_req);
		} else {
			_data_->_tmp37_ = _data_->self->priv->toast_overlay;
			_data_->_tmp38_ = _data_->self->priv->no_lists_page;
			adw_toast_overlay_set_child (_data_->_tmp37_, (GtkWidget*) _data_->_tmp38_);
		}
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_vala1_e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp39_ = _data_->_vala1_e;
		_data_->_tmp40_ = _data_->_vala1_e;
		_data_->_tmp41_ = _data_->_tmp40_->message;
		g_signal_emit (_data_->self, tuba_dialogs_profile_lists_signals[TUBA_DIALOGS_PROFILE_LISTS_ERRORED_SIGNAL], 0, (gint32) _data_->_tmp39_->code, _data_->_tmp41_);
		_g_error_free0 (_data_->_vala1_e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->req);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
tuba_dialogs_profile_lists_on_row_toast (TubaDialogsProfileLists* self,
                                         AdwToast* toast)
{
	AdwToastOverlay* _tmp0_;
	AdwToast* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (toast != NULL);
	_tmp0_ = self->priv->toast_overlay;
	_tmp1_ = _g_object_ref0 (toast);
	adw_toast_overlay_add_toast (_tmp0_, _tmp1_);
}

static void
tuba_dialogs_profile_lists_on_row_errored (TubaDialogsProfileLists* self,
                                           GError* e)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (e != NULL);
	_tmp0_ = e->message;
	g_signal_emit (self, tuba_dialogs_profile_lists_signals[TUBA_DIALOGS_PROFILE_LISTS_ERRORED_SIGNAL], 0, (gint32) e->code, _tmp0_);
}

static void
g_cclosure_user_marshal_VOID__INT_STRING (GClosure * closure,
                                          GValue * return_value,
                                          guint n_param_values,
                                          const GValue * param_values,
                                          gpointer invocation_hint,
                                          gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__INT_STRING) (gpointer data1, gint32 arg_1, const char* arg_2, gpointer data2);
	register GMarshalFunc_VOID__INT_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__INT_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_int (param_values + 1), g_value_get_string (param_values + 2), data2);
}

static inline gpointer
tuba_dialogs_profile_lists_ar_row_get_instance_private (TubaDialogsProfileListsARRow* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsProfileListsARRow_private_offset);
}

static void
_tuba_dialogs_profile_lists_ar_row_on_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                  gpointer self)
{
	tuba_dialogs_profile_lists_ar_row_on_clicked ((TubaDialogsProfileListsARRow*) self);
}

TubaDialogsProfileListsARRow*
tuba_dialogs_profile_lists_ar_row_construct (GType object_type,
                                             TubaAPIList* list,
                                             gboolean is_in_list,
                                             const gchar* profile_id,
                                             const gchar* profile_handle)
{
	TubaDialogsProfileListsARRow * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar** _tmp6_;
	GtkButton* _tmp7_ = NULL;
	GtkButton* _tmp8_;
	GtkButton* _tmp9_;
	g_return_val_if_fail (list != NULL, NULL);
	g_return_val_if_fail (profile_id != NULL, NULL);
	g_return_val_if_fail (profile_handle != NULL, NULL);
	self = (TubaDialogsProfileListsARRow*) g_object_new (object_type, NULL);
	tuba_dialogs_profile_lists_ar_row_set_list (self, list);
	tuba_dialogs_profile_lists_ar_row_set_is_already_in_list (self, is_in_list);
	adw_preferences_row_set_use_markup ((AdwPreferencesRow*) self, FALSE);
	_tmp0_ = tuba_api_list_get_title (list);
	_tmp1_ = _tmp0_;
	adw_preferences_row_set_title ((AdwPreferencesRow*) self, _tmp1_);
	_tmp2_ = g_strdup (profile_id);
	_g_free0 (self->priv->profile_id);
	self->priv->profile_id = _tmp2_;
	_tmp3_ = g_strdup (profile_handle);
	_g_free0 (self->priv->profile_handle);
	self->priv->profile_handle = _tmp3_;
	_tmp4_ = g_strdup ("flat");
	_tmp5_ = g_strdup ("circular");
	_tmp6_ = g_new0 (gchar*, 2 + 1);
	_tmp6_[0] = _tmp4_;
	_tmp6_[1] = _tmp5_;
	_tmp7_ = (GtkButton*) gtk_button_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp7_, GTK_ALIGN_CENTER);
	gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp7_, _tmp6_);
	_tmp6_ = (_vala_array_free (_tmp6_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->add_button);
	self->priv->add_button = _tmp7_;
	_tmp8_ = self->priv->add_button;
	g_signal_connect_object (_tmp8_, "clicked", (GCallback) _tuba_dialogs_profile_lists_ar_row_on_clicked_gtk_button_clicked, self, 0);
	tuba_dialogs_profile_lists_ar_row_update_button_state (self);
	_tmp9_ = self->priv->add_button;
	adw_action_row_add_suffix ((AdwActionRow*) self, (GtkWidget*) _tmp9_);
	return self;
}

TubaDialogsProfileListsARRow*
tuba_dialogs_profile_lists_ar_row_new (TubaAPIList* list,
                                       gboolean is_in_list,
                                       const gchar* profile_id,
                                       const gchar* profile_handle)
{
	return tuba_dialogs_profile_lists_ar_row_construct (TUBA_DIALOGS_PROFILE_LISTS_TYPE_AR_ROW, list, is_in_list, profile_id, profile_handle);
}

static void
tuba_dialogs_profile_lists_ar_row_on_clicked (TubaDialogsProfileListsARRow* self)
{
	g_return_if_fail (self != NULL);
	tuba_dialogs_profile_lists_ar_row_handle_list_edit (self, NULL, NULL);
}

static void
tuba_dialogs_profile_lists_ar_row_update_button_state (TubaDialogsProfileListsARRow* self)
{
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_is_already_in_list;
	if (!_tmp0_) {
		GtkButton* _tmp1_;
		GtkButton* _tmp2_;
		const gchar* _tmp3_;
		TubaAPIList* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		_tmp1_ = self->priv->add_button;
		gtk_button_set_icon_name (_tmp1_, "tuba-plus-large-symbolic");
		_tmp2_ = self->priv->add_button;
		_tmp3_ = self->priv->profile_handle;
		_tmp4_ = self->priv->_list;
		_tmp5_ = tuba_api_list_get_title (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = g_strdup_printf (_ ("Add \"%s\" to \"%s\""), _tmp3_, _tmp6_);
		_tmp8_ = _tmp7_;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp2_, _tmp8_);
		_g_free0 (_tmp8_);
	} else {
		GtkButton* _tmp9_;
		GtkButton* _tmp10_;
		const gchar* _tmp11_;
		TubaAPIList* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		_tmp9_ = self->priv->add_button;
		gtk_button_set_icon_name (_tmp9_, "tuba-minus-large-symbolic");
		_tmp10_ = self->priv->add_button;
		_tmp11_ = self->priv->profile_handle;
		_tmp12_ = self->priv->_list;
		_tmp13_ = tuba_api_list_get_title (_tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = g_strdup_printf (_ ("Remove \"%s\" from \"%s\""), _tmp11_, _tmp14_);
		_tmp16_ = _tmp15_;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp10_, _tmp16_);
		_g_free0 (_tmp16_);
	}
}

static void
tuba_dialogs_profile_lists_ar_row_handle_list_edit_data_free (gpointer _data)
{
	TubaDialogsProfileListsArRowHandleListEditData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaDialogsProfileListsArRowHandleListEditData, _data_);
}

static void
tuba_dialogs_profile_lists_ar_row_handle_list_edit (TubaDialogsProfileListsARRow* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	TubaDialogsProfileListsArRowHandleListEditData* _data_;
	TubaDialogsProfileListsARRow* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaDialogsProfileListsArRowHandleListEditData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_dialogs_profile_lists_ar_row_handle_list_edit_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_dialogs_profile_lists_ar_row_handle_list_edit_co (_data_);
}

static void
tuba_dialogs_profile_lists_ar_row_handle_list_edit_finish (TubaDialogsProfileListsARRow* self,
                                                           GAsyncResult* _res_)
{
	TubaDialogsProfileListsArRowHandleListEditData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_dialogs_profile_lists_ar_row_handle_list_edit_ready (GObject* source_object,
                                                          GAsyncResult* _res_,
                                                          gpointer _user_data_)
{
	TubaDialogsProfileListsArRowHandleListEditData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_dialogs_profile_lists_ar_row_handle_list_edit_co (_data_);
}

static gboolean
tuba_dialogs_profile_lists_ar_row_handle_list_edit_co (TubaDialogsProfileListsArRowHandleListEditData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	gtk_widget_set_sensitive ((GtkWidget*) _data_->self, FALSE);
	_data_->_tmp0_ = json_builder_new ();
	_data_->builder = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->builder;
	json_builder_begin_object (_data_->_tmp1_);
	_data_->_tmp2_ = _data_->builder;
	json_builder_set_member_name (_data_->_tmp2_, "account_ids");
	_data_->_tmp3_ = _data_->builder;
	json_builder_begin_array (_data_->_tmp3_);
	_data_->_tmp4_ = _data_->builder;
	_data_->_tmp5_ = _data_->self->priv->profile_id;
	json_builder_add_string_value (_data_->_tmp4_, _data_->_tmp5_);
	_data_->_tmp6_ = _data_->builder;
	json_builder_end_array (_data_->_tmp6_);
	_data_->_tmp7_ = _data_->builder;
	json_builder_end_object (_data_->_tmp7_);
	_data_->_tmp8_ = _data_->self->priv->_list;
	_data_->_tmp9_ = tuba_api_list_get_id (_data_->_tmp8_);
	_data_->_tmp10_ = _data_->_tmp9_;
	_data_->_tmp11_ = string_to_string (_data_->_tmp10_);
	_data_->_tmp12_ = g_strconcat ("/api/v1/lists/", _data_->_tmp11_, "/accounts", NULL);
	_data_->endpoint = _data_->_tmp12_;
	_data_->_tmp14_ = _data_->self->priv->_is_already_in_list;
	if (_data_->_tmp14_) {
		_data_->_tmp13_ = TUBA_REQUEST_V2_METHOD_DELETE;
	} else {
		_data_->_tmp13_ = TUBA_REQUEST_V2_METHOD_POST;
	}
	_data_->_tmp15_ = _data_->endpoint;
	_data_->_tmp16_ = tuba_accounts;
	_data_->_tmp17_ = tuba_account_store_get_active (_data_->_tmp16_);
	_data_->_tmp18_ = _data_->_tmp17_;
	_data_->_tmp19_ = _g_object_ref0 (_data_->_tmp18_);
	_data_->_tmp20_ = NULL;
	_data_->_tmp20_ = tuba_request_v2_new (_data_->_tmp15_, _data_->_tmp13_);
	tuba_request_v2_set_account (_data_->_tmp20_, _data_->_tmp19_);
	_g_object_unref0 (_data_->_tmp19_);
	tuba_request_v2_set_ctx (_data_->_tmp20_, (GtkWidget*) _data_->self);
	_data_->req = _data_->_tmp20_;
	_data_->_tmp21_ = _data_->builder;
	tuba_request_v2_set_body_from_json (_data_->req, _data_->_tmp21_);
	{
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->req, tuba_dialogs_profile_lists_ar_row_handle_list_edit_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp22_ = tuba_request_v2_exec_finish (_data_->req, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->_tmp23_ = _data_->_tmp22_;
		_g_object_unref0 (_data_->_tmp23_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp24_ = g_strdup ("");
		_data_->toast_msg = _data_->_tmp24_;
		_data_->_tmp25_ = _data_->self->priv->_is_already_in_list;
		if (_data_->_tmp25_) {
			_data_->_tmp26_ = _data_->self->priv->profile_handle;
			_data_->_tmp27_ = _data_->self->priv->_list;
			_data_->_tmp28_ = tuba_api_list_get_title (_data_->_tmp27_);
			_data_->_tmp29_ = _data_->_tmp28_;
			_data_->_tmp30_ = g_strdup_printf (_ ("User \"%s\" got removed from \"%s\""), _data_->_tmp26_, _data_->_tmp29_);
			_g_free0 (_data_->toast_msg);
			_data_->toast_msg = _data_->_tmp30_;
		} else {
			_data_->_tmp31_ = _data_->self->priv->profile_handle;
			_data_->_tmp32_ = _data_->self->priv->_list;
			_data_->_tmp33_ = tuba_api_list_get_title (_data_->_tmp32_);
			_data_->_tmp34_ = _data_->_tmp33_;
			_data_->_tmp35_ = g_strdup_printf (_ ("User \"%s\" got added to \"%s\""), _data_->_tmp31_, _data_->_tmp34_);
			_g_free0 (_data_->toast_msg);
			_data_->toast_msg = _data_->_tmp35_;
		}
		_data_->_tmp36_ = _data_->self->priv->_is_already_in_list;
		tuba_dialogs_profile_lists_ar_row_set_is_already_in_list (_data_->self, !_data_->_tmp36_);
		tuba_dialogs_profile_lists_ar_row_update_button_state (_data_->self);
		gtk_widget_set_sensitive ((GtkWidget*) _data_->self, TRUE);
		_data_->_tmp37_ = _data_->toast_msg;
		_data_->_tmp38_ = adw_toast_new (_data_->_tmp37_);
		_data_->toasted = _data_->_tmp38_;
		_data_->_tmp39_ = _data_->toasted;
		g_signal_emit (_data_->self, tuba_dialogs_profile_lists_ar_row_signals[TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_TOAST_SIGNAL], 0, _data_->_tmp39_);
		_g_object_unref0 (_data_->toasted);
		_g_free0 (_data_->toast_msg);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp40_ = _data_->e;
		g_signal_emit (_data_->self, tuba_dialogs_profile_lists_ar_row_signals[TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_ERRORED_SIGNAL], 0, _data_->_tmp40_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		_g_free0 (_data_->endpoint);
		_g_object_unref0 (_data_->builder);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->req);
	_g_free0 (_data_->endpoint);
	_g_object_unref0 (_data_->builder);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

gboolean
tuba_dialogs_profile_lists_ar_row_get_is_already_in_list (TubaDialogsProfileListsARRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_already_in_list;
	return result;
}

void
tuba_dialogs_profile_lists_ar_row_set_is_already_in_list (TubaDialogsProfileListsARRow* self,
                                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_profile_lists_ar_row_get_is_already_in_list (self);
	if (old_value != value) {
		self->priv->_is_already_in_list = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_profile_lists_ar_row_properties[TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_IS_ALREADY_IN_LIST_PROPERTY]);
	}
}

static TubaAPIList*
tuba_dialogs_profile_lists_ar_row_get_list (TubaDialogsProfileListsARRow* self)
{
	TubaAPIList* result;
	TubaAPIList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_list;
	result = _tmp0_;
	return result;
}

static void
tuba_dialogs_profile_lists_ar_row_set_list (TubaDialogsProfileListsARRow* self,
                                            TubaAPIList* value)
{
	TubaAPIList* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_list);
	self->priv->_list = _tmp0_;
}

static void
tuba_dialogs_profile_lists_ar_row_class_init (TubaDialogsProfileListsARRowClass * klass,
                                              gpointer klass_data)
{
	tuba_dialogs_profile_lists_ar_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsProfileListsARRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_dialogs_profile_lists_ar_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_dialogs_profile_lists_ar_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_profile_lists_ar_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_IS_ALREADY_IN_LIST_PROPERTY, tuba_dialogs_profile_lists_ar_row_properties[TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_IS_ALREADY_IN_LIST_PROPERTY] = g_param_spec_boolean ("is-already-in-list", "is-already-in-list", "is-already-in-list", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	tuba_dialogs_profile_lists_ar_row_signals[TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_ERRORED_SIGNAL] = g_signal_new ("errored", TUBA_DIALOGS_PROFILE_LISTS_TYPE_AR_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, G_TYPE_ERROR);
	tuba_dialogs_profile_lists_ar_row_signals[TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_TOAST_SIGNAL] = g_signal_new ("toast", TUBA_DIALOGS_PROFILE_LISTS_TYPE_AR_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, adw_toast_get_type ());
}

static void
tuba_dialogs_profile_lists_ar_row_instance_init (TubaDialogsProfileListsARRow * self,
                                                 gpointer klass)
{
	self->priv = tuba_dialogs_profile_lists_ar_row_get_instance_private (self);
	self->priv->_is_already_in_list = FALSE;
}

static void
tuba_dialogs_profile_lists_ar_row_finalize (GObject * obj)
{
	TubaDialogsProfileListsARRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_PROFILE_LISTS_TYPE_AR_ROW, TubaDialogsProfileListsARRow);
	_g_object_unref0 (self->priv->_list);
	_g_object_unref0 (self->priv->add_button);
	_g_free0 (self->priv->profile_id);
	_g_free0 (self->priv->profile_handle);
	G_OBJECT_CLASS (tuba_dialogs_profile_lists_ar_row_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_profile_lists_ar_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsProfileListsARRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_profile_lists_ar_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsProfileListsARRow), 0, (GInstanceInitFunc) tuba_dialogs_profile_lists_ar_row_instance_init, NULL };
	GType tuba_dialogs_profile_lists_ar_row_type_id;
	tuba_dialogs_profile_lists_ar_row_type_id = g_type_register_static (adw_action_row_get_type (), "TubaDialogsProfileListsARRow", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsProfileListsARRow_private_offset = g_type_add_instance_private (tuba_dialogs_profile_lists_ar_row_type_id, sizeof (TubaDialogsProfileListsARRowPrivate));
	return tuba_dialogs_profile_lists_ar_row_type_id;
}

GType
tuba_dialogs_profile_lists_ar_row_get_type (void)
{
	static GType tuba_dialogs_profile_lists_ar_row_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_profile_lists_ar_row_type_id__once)) {
		GType tuba_dialogs_profile_lists_ar_row_type_id;
		tuba_dialogs_profile_lists_ar_row_type_id = tuba_dialogs_profile_lists_ar_row_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_profile_lists_ar_row_type_id__once, tuba_dialogs_profile_lists_ar_row_type_id);
	}
	return tuba_dialogs_profile_lists_ar_row_type_id__once;
}

static void
_vala_tuba_dialogs_profile_lists_ar_row_get_property (GObject * object,
                                                      guint property_id,
                                                      GValue * value,
                                                      GParamSpec * pspec)
{
	TubaDialogsProfileListsARRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_PROFILE_LISTS_TYPE_AR_ROW, TubaDialogsProfileListsARRow);
	switch (property_id) {
		case TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_IS_ALREADY_IN_LIST_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_profile_lists_ar_row_get_is_already_in_list (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_dialogs_profile_lists_ar_row_set_property (GObject * object,
                                                      guint property_id,
                                                      const GValue * value,
                                                      GParamSpec * pspec)
{
	TubaDialogsProfileListsARRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_PROFILE_LISTS_TYPE_AR_ROW, TubaDialogsProfileListsARRow);
	switch (property_id) {
		case TUBA_DIALOGS_PROFILE_LISTS_AR_ROW_IS_ALREADY_IN_LIST_PROPERTY:
		tuba_dialogs_profile_lists_ar_row_set_is_already_in_list (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
tuba_dialogs_profile_lists_class_init (TubaDialogsProfileListsClass * klass,
                                       gpointer klass_data)
{
	tuba_dialogs_profile_lists_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsProfileLists_private_offset);
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_profile_lists_finalize;
	tuba_dialogs_profile_lists_signals[TUBA_DIALOGS_PROFILE_LISTS_ERRORED_SIGNAL] = g_signal_new ("errored", TUBA_DIALOGS_TYPE_PROFILE_LISTS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__INT_STRING, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_STRING);
}

static void
tuba_dialogs_profile_lists_instance_init (TubaDialogsProfileLists * self,
                                          gpointer klass)
{
	self->priv = tuba_dialogs_profile_lists_get_instance_private (self);
}

static void
tuba_dialogs_profile_lists_finalize (GObject * obj)
{
	TubaDialogsProfileLists * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_TYPE_PROFILE_LISTS, TubaDialogsProfileLists);
	_g_object_unref0 (self->priv->preferences_page);
	_g_object_unref0 (self->priv->preferences_group);
	_g_object_unref0 (self->priv->toast_overlay);
	_g_object_unref0 (self->priv->no_lists_page);
	_g_free0 (self->priv->profile_id);
	_g_free0 (self->priv->profile_handle);
	G_OBJECT_CLASS (tuba_dialogs_profile_lists_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_profile_lists_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsProfileListsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_profile_lists_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsProfileLists), 0, (GInstanceInitFunc) tuba_dialogs_profile_lists_instance_init, NULL };
	GType tuba_dialogs_profile_lists_type_id;
	tuba_dialogs_profile_lists_type_id = g_type_register_static (adw_dialog_get_type (), "TubaDialogsProfileLists", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsProfileLists_private_offset = g_type_add_instance_private (tuba_dialogs_profile_lists_type_id, sizeof (TubaDialogsProfileListsPrivate));
	return tuba_dialogs_profile_lists_type_id;
}

GType
tuba_dialogs_profile_lists_get_type (void)
{
	static GType tuba_dialogs_profile_lists_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_profile_lists_type_id__once)) {
		GType tuba_dialogs_profile_lists_type_id;
		tuba_dialogs_profile_lists_type_id = tuba_dialogs_profile_lists_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_profile_lists_type_id__once, tuba_dialogs_profile_lists_type_id);
	}
	return tuba_dialogs_profile_lists_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);
}

