/* ListEdit.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from ListEdit.vala, do not modify */

#include <adwaita.h>
#include <glib-object.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <libsoup/soup.h>
#include <json-glib/json-glib.h>
#include <glib/gi18n-lib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TUBA_DIALOGS_TYPE_LIST_EDIT (tuba_dialogs_list_edit_get_type ())
#define TUBA_DIALOGS_LIST_EDIT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_LIST_EDIT, TubaDialogsListEdit))
#define TUBA_DIALOGS_LIST_EDIT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_LIST_EDIT, TubaDialogsListEditClass))
#define TUBA_DIALOGS_IS_LIST_EDIT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_LIST_EDIT))
#define TUBA_DIALOGS_IS_LIST_EDIT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_LIST_EDIT))
#define TUBA_DIALOGS_LIST_EDIT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_LIST_EDIT, TubaDialogsListEditClass))

typedef struct _TubaDialogsListEdit TubaDialogsListEdit;
typedef struct _TubaDialogsListEditClass TubaDialogsListEditClass;
typedef struct _TubaDialogsListEditPrivate TubaDialogsListEditPrivate;

#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_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;
typedef enum  {
	TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_NONE,
	TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_LIST,
	TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_FOLLOWED
} TubaDialogsListEditRepliesPolicy;

#define TUBA_DIALOGS_LIST_EDIT_TYPE_REPLIES_POLICY (tuba_dialogs_list_edit_replies_policy_get_type ())
enum  {
	TUBA_DIALOGS_LIST_EDIT_0_PROPERTY,
	TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_ACTIVE_PROPERTY,
	TUBA_DIALOGS_LIST_EDIT_LIST_TITLE_PROPERTY,
	TUBA_DIALOGS_LIST_EDIT_IS_EXCLUSIVE_PROPERTY,
	TUBA_DIALOGS_LIST_EDIT_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_list_edit_properties[TUBA_DIALOGS_LIST_EDIT_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TUBA_TYPE_REQUEST (tuba_request_get_type ())
#define TUBA_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_REQUEST, TubaRequest))
#define TUBA_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_REQUEST, TubaRequestClass))
#define TUBA_IS_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_REQUEST))
#define TUBA_IS_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_REQUEST))
#define TUBA_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_REQUEST, TubaRequestClass))

typedef struct _TubaRequest TubaRequest;
typedef struct _TubaRequestClass TubaRequestClass;

#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_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;
typedef void (*TubaNetworkSuccessCallback) (GInputStream* in_stream, SoupMessageHeaders* response_headers, gpointer user_data, GError** error);
typedef void (*TubaNetworkNodeCallback) (JsonNode* node, gpointer user_data, GError** error);

#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_DIALOGS_LIST_EDIT_TYPE_MEMBER_CHECK_BUTTON (tuba_dialogs_list_edit_member_check_button_get_type ())
#define TUBA_DIALOGS_LIST_EDIT_MEMBER_CHECK_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_LIST_EDIT_TYPE_MEMBER_CHECK_BUTTON, TubaDialogsListEditMemberCheckButton))
#define TUBA_DIALOGS_LIST_EDIT_MEMBER_CHECK_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_LIST_EDIT_TYPE_MEMBER_CHECK_BUTTON, TubaDialogsListEditMemberCheckButtonClass))
#define TUBA_DIALOGS_LIST_EDIT_IS_MEMBER_CHECK_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_LIST_EDIT_TYPE_MEMBER_CHECK_BUTTON))
#define TUBA_DIALOGS_LIST_EDIT_IS_MEMBER_CHECK_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_LIST_EDIT_TYPE_MEMBER_CHECK_BUTTON))
#define TUBA_DIALOGS_LIST_EDIT_MEMBER_CHECK_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_LIST_EDIT_TYPE_MEMBER_CHECK_BUTTON, TubaDialogsListEditMemberCheckButtonClass))

typedef struct _TubaDialogsListEditMemberCheckButton TubaDialogsListEditMemberCheckButton;
typedef struct _TubaDialogsListEditMemberCheckButtonClass TubaDialogsListEditMemberCheckButtonClass;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block23Data Block23Data;
typedef struct _Block24Data Block24Data;
typedef struct _TubaDialogsListEditMemberCheckButtonPrivate TubaDialogsListEditMemberCheckButtonPrivate;
enum  {
	TUBA_DIALOGS_LIST_EDIT_MEMBER_CHECK_BUTTON_0_PROPERTY,
	TUBA_DIALOGS_LIST_EDIT_MEMBER_CHECK_BUTTON_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_list_edit_member_check_button_properties[TUBA_DIALOGS_LIST_EDIT_MEMBER_CHECK_BUTTON_NUM_PROPERTIES];
enum  {
	TUBA_DIALOGS_LIST_EDIT_MEMBER_CHECK_BUTTON_CHANGED_SIGNAL,
	TUBA_DIALOGS_LIST_EDIT_MEMBER_CHECK_BUTTON_NUM_SIGNALS
};
static guint tuba_dialogs_list_edit_member_check_button_signals[TUBA_DIALOGS_LIST_EDIT_MEMBER_CHECK_BUTTON_NUM_SIGNALS] = {0};

struct _TubaDialogsListEdit {
	AdwPreferencesDialog parent_instance;
	TubaDialogsListEditPrivate * priv;
};

struct _TubaDialogsListEditClass {
	AdwPreferencesDialogClass parent_class;
};

struct _TubaDialogsListEditPrivate {
	TubaAPIList* _list;
	GeeArrayList* _memebers_to_be_removed;
	TubaDialogsListEditRepliesPolicy _replies_policy_active;
	AdwEntryRow* title_row;
	AdwSwitchRow* hide_from_home_row;
	GtkCheckButton* none_radio;
	GtkCheckButton* list_radio;
	GtkCheckButton* followed_radio;
	AdwPreferencesPage* members_page;
	AdwPreferencesGroup* members_group;
};

struct _Block23Data {
	int _ref_count_;
	TubaDialogsListEdit* self;
	gchar* replies_policy_string;
};

struct _Block24Data {
	int _ref_count_;
	TubaDialogsListEdit* self;
	JsonBuilder* ids_builder;
};

struct _TubaDialogsListEditMemberCheckButton {
	GtkCheckButton parent_instance;
	TubaDialogsListEditMemberCheckButtonPrivate * priv;
};

struct _TubaDialogsListEditMemberCheckButtonClass {
	GtkCheckButtonClass parent_class;
};

struct _TubaDialogsListEditMemberCheckButtonPrivate {
	gchar* _member_id;
};

static gint TubaDialogsListEdit_private_offset;
static gpointer tuba_dialogs_list_edit_parent_class = NULL;
VALA_EXTERN TubaAccountStore* tuba_accounts;
static gint TubaDialogsListEditMemberCheckButton_private_offset;
static gpointer tuba_dialogs_list_edit_member_check_button_parent_class = NULL;

VALA_EXTERN GType tuba_dialogs_list_edit_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsListEdit, 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_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIList, g_object_unref)
VALA_EXTERN GType tuba_dialogs_list_edit_replies_policy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gchar* tuba_dialogs_list_edit_replies_policy_to_string (TubaDialogsListEditRepliesPolicy self);
VALA_EXTERN TubaDialogsListEditRepliesPolicy tuba_dialogs_list_edit_replies_policy_from_string (const gchar* policy);
VALA_EXTERN TubaDialogsListEdit* tuba_dialogs_list_edit_new (TubaAPIList* t_list);
VALA_EXTERN TubaDialogsListEdit* tuba_dialogs_list_edit_construct (GType object_type,
                                                       TubaAPIList* t_list);
static void tuba_dialogs_list_edit_set_list (TubaDialogsListEdit* self,
                                      TubaAPIList* value);
VALA_EXTERN const gchar* tuba_api_list_get_title (TubaAPIList* self);
VALA_EXTERN gboolean tuba_api_list_get_exclusive (TubaAPIList* self);
static void tuba_dialogs_list_edit_update_active_radio_button (TubaDialogsListEdit* self,
                                                        TubaDialogsListEditRepliesPolicy replies_policy);
VALA_EXTERN const gchar* tuba_api_list_get_replies_policy (TubaAPIList* self);
static void tuba_dialogs_list_edit_update_members (TubaDialogsListEdit* self);
static void tuba_dialogs_list_edit_on_radio_toggled (TubaDialogsListEdit* self);
static void tuba_dialogs_list_edit_set_replies_policy_active (TubaDialogsListEdit* self,
                                                       TubaDialogsListEditRepliesPolicy value);
static void _tuba_dialogs_list_edit_on_radio_toggled_gtk_check_button_toggled (GtkCheckButton* _sender,
                                                                        gpointer self);
static TubaAPIList* tuba_dialogs_list_edit_get_list (TubaDialogsListEdit* self);
VALA_EXTERN const gchar* tuba_api_list_get_id (TubaAPIList* self);
VALA_EXTERN TubaRequest* tuba_request_new_GET (const gchar* url);
VALA_EXTERN TubaRequest* tuba_request_construct_GET (GType object_type,
                                         const gchar* url);
VALA_EXTERN GType tuba_request_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaRequest, 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 TubaRequest* tuba_request_with_account (TubaRequest* self,
                                        TubaInstanceAccount* account);
VALA_EXTERN GType tuba_account_store_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAccountStore, g_object_unref)
VALA_EXTERN TubaInstanceAccount* tuba_account_store_get_active (TubaAccountStore* self);
VALA_EXTERN TubaRequest* tuba_request_then (TubaRequest* self,
                                TubaNetworkSuccessCallback cb,
                                gpointer cb_target,
                                GDestroyNotify cb_target_destroy_notify);
static void __lambda175_ (TubaDialogsListEdit* self,
                   GInputStream* in_stream,
                   GError** error);
VALA_EXTERN JsonParser* tuba_network_get_parser_from_inputstream (GInputStream* in_stream,
                                                      GError** error);
VALA_EXTERN guint tuba_network_get_array_size (JsonParser* parser);
VALA_EXTERN void tuba_network_parse_array (JsonParser* parser,
                               TubaNetworkNodeCallback cb,
                               gpointer cb_target,
                               GDestroyNotify cb_target_destroy_notify,
                               GError** error);
static void ___lambda176_ (TubaDialogsListEdit* self,
                    JsonNode* node,
                    GError** error);
VALA_EXTERN TubaAPIAccount* tuba_api_account_from (JsonNode* node,
                                       GError** error);
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_account (TubaWidgetsAvatar* self,
                                      TubaAPIAccount* value);
VALA_EXTERN void tuba_widgets_avatar_set_size (TubaWidgetsAvatar* self,
                                   gint value);
static GType tuba_dialogs_list_edit_member_check_button_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsListEditMemberCheckButton, g_object_unref)
VALA_EXTERN const gchar* tuba_api_account_get_id (TubaAPIAccount* self);
static TubaDialogsListEditMemberCheckButton* tuba_dialogs_list_edit_member_check_button_new (const gchar* member_id);
static TubaDialogsListEditMemberCheckButton* tuba_dialogs_list_edit_member_check_button_construct (GType object_type,
                                                                                            const gchar* member_id);
static void tuba_dialogs_list_edit_on_member_remove_changed (TubaDialogsListEdit* self,
                                                      const gchar* member_id,
                                                      gboolean active);
static void _tuba_dialogs_list_edit_on_member_remove_changed_tuba_dialogs_list_edit_member_check_button_changed (TubaDialogsListEditMemberCheckButton* _sender,
                                                                                                          const gchar* member_id,
                                                                                                          gboolean active,
                                                                                                          gpointer self);
VALA_EXTERN gchar* tuba_api_account_get_full_handle (TubaAPIAccount* self);
static void ____lambda176__tuba_network_node_callback (JsonNode* node,
                                                gpointer self,
                                                GError** error);
static void ___lambda175__tuba_network_success_callback (GInputStream* in_stream,
                                                  SoupMessageHeaders* response_headers,
                                                  gpointer self,
                                                  GError** error);
VALA_EXTERN TubaRequest* tuba_request_exec (TubaRequest* self);
static GeeArrayList* tuba_dialogs_list_edit_get_memebers_to_be_removed (TubaDialogsListEdit* self);
static void tuba_dialogs_list_edit_on_close (TubaDialogsListEdit* self);
static void tuba_dialogs_list_edit_on_apply (TubaDialogsListEdit* self);
static void _tuba_dialogs_list_edit_on_close_adw_dialog_closed (AdwDialog* _sender,
                                                         gpointer self);
VALA_EXTERN const gchar* tuba_dialogs_list_edit_get_list_title (TubaDialogsListEdit* self);
VALA_EXTERN TubaDialogsListEditRepliesPolicy tuba_dialogs_list_edit_get_replies_policy_active (TubaDialogsListEdit* self);
VALA_EXTERN gboolean tuba_dialogs_list_edit_get_is_exclusive (TubaDialogsListEdit* self);
static Block23Data* block23_data_ref (Block23Data* _data23_);
static void block23_data_unref (void * _userdata_);
VALA_EXTERN TubaRequest* tuba_request_new_PUT (const gchar* url);
VALA_EXTERN TubaRequest* tuba_request_construct_PUT (GType object_type,
                                         const gchar* url);
VALA_EXTERN TubaRequest* tuba_request_body_json (TubaRequest* self,
                                     JsonBuilder* t_builder);
static void ___lambda177_ (Block23Data* _data23_,
                    GError** error);
VALA_EXTERN void tuba_api_list_set_title (TubaAPIList* self,
                              const gchar* value);
VALA_EXTERN void tuba_api_list_set_replies_policy (TubaAPIList* self,
                                       const gchar* value);
VALA_EXTERN void tuba_api_list_set_exclusive (TubaAPIList* self,
                                  gboolean value);
static void ____lambda177__tuba_network_success_callback (GInputStream* in_stream,
                                                   SoupMessageHeaders* response_headers,
                                                   gpointer self,
                                                   GError** error);
static Block24Data* block24_data_ref (Block24Data* _data24_);
static void block24_data_unref (void * _userdata_);
static gboolean ___lambda178_ (Block24Data* _data24_,
                        gchar* e);
static gboolean ____lambda178__gee_forall_func (gpointer g,
                                         gpointer self);
VALA_EXTERN TubaRequest* tuba_request_new_DELETE (const gchar* url);
VALA_EXTERN TubaRequest* tuba_request_construct_DELETE (GType object_type,
                                            const gchar* url);
static void tuba_dialogs_list_edit_member_check_button_set_member_id (TubaDialogsListEditMemberCheckButton* self,
                                                               const gchar* value);
static void tuba_dialogs_list_edit_member_check_button_on_toggled (TubaDialogsListEditMemberCheckButton* self);
static void _tuba_dialogs_list_edit_member_check_button_on_toggled_gtk_check_button_toggled (GtkCheckButton* _sender,
                                                                                      gpointer self);
static const gchar* tuba_dialogs_list_edit_member_check_button_get_member_id (TubaDialogsListEditMemberCheckButton* self);
static void g_cclosure_user_marshal_VOID__STRING_BOOLEAN (GClosure * closure,
                                                   GValue * return_value,
                                                   guint n_param_values,
                                                   const GValue * param_values,
                                                   gpointer invocation_hint,
                                                   gpointer marshal_data);
static void tuba_dialogs_list_edit_member_check_button_finalize (GObject * obj);
static GType tuba_dialogs_list_edit_member_check_button_get_type_once (void);
static void _vala_tuba_dialogs_list_edit_member_check_button_get_property (GObject * object,
                                                                    guint property_id,
                                                                    GValue * value,
                                                                    GParamSpec * pspec);
static void _vala_tuba_dialogs_list_edit_member_check_button_set_property (GObject * object,
                                                                    guint property_id,
                                                                    const GValue * value,
                                                                    GParamSpec * pspec);
static void tuba_dialogs_list_edit_finalize (GObject * obj);
static GType tuba_dialogs_list_edit_get_type_once (void);
static void _vala_tuba_dialogs_list_edit_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_tuba_dialogs_list_edit_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_dialogs_list_edit_get_instance_private (TubaDialogsListEdit* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsListEdit_private_offset);
}

gchar*
tuba_dialogs_list_edit_replies_policy_to_string (TubaDialogsListEditRepliesPolicy self)
{
	gchar* result;
	switch (self) {
		case TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_LIST:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("list");
			result = _tmp0_;
			return result;
		}
		case TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_FOLLOWED:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("followed");
			result = _tmp1_;
			return result;
		}
		default:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("none");
			result = _tmp2_;
			return result;
		}
	}
}

TubaDialogsListEditRepliesPolicy
tuba_dialogs_list_edit_replies_policy_from_string (const gchar* policy)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	TubaDialogsListEditRepliesPolicy result;
	_tmp0_ = policy;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("list")))) {
		switch (0) {
			default:
			{
				result = TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_LIST;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("followed")))) {
		switch (0) {
			default:
			{
				result = TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_FOLLOWED;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_NONE;
				return result;
			}
		}
	}
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_list_edit_replies_policy_get_type_once (void)
{
	static const GEnumValue values[] = {{TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_NONE, "TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_NONE", "none"}, {TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_LIST, "TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_LIST", "list"}, {TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_FOLLOWED, "TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_FOLLOWED", "followed"}, {0, NULL, NULL}};
	GType tuba_dialogs_list_edit_replies_policy_type_id;
	tuba_dialogs_list_edit_replies_policy_type_id = g_enum_register_static ("TubaDialogsListEditRepliesPolicy", values);
	return tuba_dialogs_list_edit_replies_policy_type_id;
}

GType
tuba_dialogs_list_edit_replies_policy_get_type (void)
{
	static gsize tuba_dialogs_list_edit_replies_policy_type_id__once = 0;
	if (g_once_init_enter (&tuba_dialogs_list_edit_replies_policy_type_id__once)) {
		GType tuba_dialogs_list_edit_replies_policy_type_id;
		tuba_dialogs_list_edit_replies_policy_type_id = tuba_dialogs_list_edit_replies_policy_get_type_once ();
		g_once_init_leave (&tuba_dialogs_list_edit_replies_policy_type_id__once, tuba_dialogs_list_edit_replies_policy_type_id);
	}
	return tuba_dialogs_list_edit_replies_policy_type_id__once;
}

TubaDialogsListEdit*
tuba_dialogs_list_edit_construct (GType object_type,
                                  TubaAPIList* t_list)
{
	TubaDialogsListEdit * self = NULL;
	AdwEntryRow* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	AdwSwitchRow* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	g_return_val_if_fail (t_list != NULL, NULL);
	self = (TubaDialogsListEdit*) g_object_new (object_type, NULL);
	tuba_dialogs_list_edit_set_list (self, t_list);
	_tmp0_ = self->priv->title_row;
	_tmp1_ = tuba_api_list_get_title (t_list);
	_tmp2_ = _tmp1_;
	gtk_editable_set_text ((GtkEditable*) _tmp0_, _tmp2_);
	_tmp3_ = self->priv->hide_from_home_row;
	_tmp4_ = tuba_api_list_get_exclusive (t_list);
	_tmp5_ = _tmp4_;
	adw_switch_row_set_active (_tmp3_, _tmp5_);
	_tmp6_ = tuba_api_list_get_replies_policy (t_list);
	_tmp7_ = _tmp6_;
	tuba_dialogs_list_edit_update_active_radio_button (self, tuba_dialogs_list_edit_replies_policy_from_string (_tmp7_));
	tuba_dialogs_list_edit_update_members (self);
	return self;
}

TubaDialogsListEdit*
tuba_dialogs_list_edit_new (TubaAPIList* t_list)
{
	return tuba_dialogs_list_edit_construct (TUBA_DIALOGS_TYPE_LIST_EDIT, t_list);
}

static void
tuba_dialogs_list_edit_on_radio_toggled (TubaDialogsListEdit* self)
{
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GtkCheckButton* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	GtkCheckButton* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->none_radio;
	_tmp1_ = gtk_check_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		tuba_dialogs_list_edit_set_replies_policy_active (self, TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_NONE);
		return;
	}
	_tmp3_ = self->priv->list_radio;
	_tmp4_ = gtk_check_button_get_active (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_) {
		tuba_dialogs_list_edit_set_replies_policy_active (self, TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_LIST);
		return;
	}
	_tmp6_ = self->priv->followed_radio;
	_tmp7_ = gtk_check_button_get_active (_tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp8_) {
		tuba_dialogs_list_edit_set_replies_policy_active (self, TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_FOLLOWED);
		return;
	}
}

static void
_tuba_dialogs_list_edit_on_radio_toggled_gtk_check_button_toggled (GtkCheckButton* _sender,
                                                                   gpointer self)
{
	tuba_dialogs_list_edit_on_radio_toggled ((TubaDialogsListEdit*) self);
}

static void
tuba_dialogs_list_edit_update_active_radio_button (TubaDialogsListEdit* self,
                                                   TubaDialogsListEditRepliesPolicy replies_policy)
{
	g_return_if_fail (self != NULL);
	switch (replies_policy) {
		case TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_LIST:
		{
			GtkCheckButton* _tmp0_;
			_tmp0_ = self->priv->list_radio;
			gtk_check_button_set_active (_tmp0_, TRUE);
			break;
		}
		case TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_FOLLOWED:
		{
			GtkCheckButton* _tmp1_;
			_tmp1_ = self->priv->followed_radio;
			gtk_check_button_set_active (_tmp1_, TRUE);
			break;
		}
		default:
		{
			GtkCheckButton* _tmp2_;
			_tmp2_ = self->priv->none_radio;
			gtk_check_button_set_active (_tmp2_, TRUE);
			break;
		}
	}
	tuba_dialogs_list_edit_on_radio_toggled (self);
}

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 gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
_tuba_dialogs_list_edit_on_member_remove_changed_tuba_dialogs_list_edit_member_check_button_changed (TubaDialogsListEditMemberCheckButton* _sender,
                                                                                                     const gchar* member_id,
                                                                                                     gboolean active,
                                                                                                     gpointer self)
{
	tuba_dialogs_list_edit_on_member_remove_changed ((TubaDialogsListEdit*) self, member_id, active);
}

static void
___lambda176_ (TubaDialogsListEdit* self,
               JsonNode* node,
               GError** error)
{
	TubaAPIAccount* member = NULL;
	TubaAPIAccount* _tmp0_;
	TubaWidgetsAvatar* avi = NULL;
	TubaAPIAccount* _tmp1_;
	TubaWidgetsAvatar* _tmp2_ = NULL;
	TubaDialogsListEditMemberCheckButton* remove_button = NULL;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	TubaDialogsListEditMemberCheckButton* _tmp5_ = NULL;
	TubaDialogsListEditMemberCheckButton* _tmp6_;
	AdwActionRow* member_row = NULL;
	gchar* _tmp7_;
	gchar* _tmp8_;
	AdwActionRow* _tmp9_ = NULL;
	AdwActionRow* _tmp10_;
	TubaWidgetsAvatar* _tmp11_;
	AdwActionRow* _tmp12_;
	TubaDialogsListEditMemberCheckButton* _tmp13_;
	AdwPreferencesGroup* _tmp14_;
	AdwActionRow* _tmp15_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (node != NULL);
	_tmp0_ = tuba_api_account_from (node, &_inner_error0_);
	member = _tmp0_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	_tmp1_ = _g_object_ref0 (member);
	_tmp2_ = tuba_widgets_avatar_new ();
	tuba_widgets_avatar_set_account (_tmp2_, _tmp1_);
	_g_object_unref0 (_tmp1_);
	tuba_widgets_avatar_set_size (_tmp2_, 32);
	g_object_ref_sink (_tmp2_);
	avi = _tmp2_;
	_tmp3_ = tuba_api_account_get_id (member);
	_tmp4_ = _tmp3_;
	_tmp5_ = tuba_dialogs_list_edit_member_check_button_new (_tmp4_);
	gtk_check_button_set_active ((GtkCheckButton*) _tmp5_, FALSE);
	gtk_widget_set_valign ((GtkWidget*) _tmp5_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp5_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp5_);
	remove_button = _tmp5_;
	_tmp6_ = remove_button;
	g_signal_connect_object (_tmp6_, "changed", (GCallback) _tuba_dialogs_list_edit_on_member_remove_changed_tuba_dialogs_list_edit_member_check_button_changed, self, 0);
	_tmp7_ = tuba_api_account_get_full_handle (member);
	_tmp8_ = _tmp7_;
	_tmp9_ = (AdwActionRow*) adw_action_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp9_, _tmp8_);
	_g_free0 (_tmp8_);
	g_object_ref_sink (_tmp9_);
	member_row = _tmp9_;
	_tmp10_ = member_row;
	_tmp11_ = avi;
	adw_action_row_add_prefix (_tmp10_, (GtkWidget*) _tmp11_);
	_tmp12_ = member_row;
	_tmp13_ = remove_button;
	adw_action_row_add_suffix (_tmp12_, (GtkWidget*) _tmp13_);
	_tmp14_ = self->priv->members_group;
	_tmp15_ = member_row;
	adw_preferences_group_add (_tmp14_, (GtkWidget*) _tmp15_);
	_g_object_unref0 (member_row);
	_g_object_unref0 (remove_button);
	_g_object_unref0 (avi);
	_g_object_unref0 (member);
}

static void
____lambda176__tuba_network_node_callback (JsonNode* node,
                                           gpointer self,
                                           GError** error)
{
	___lambda176_ ((TubaDialogsListEdit*) self, node, error);
}

static void
__lambda175_ (TubaDialogsListEdit* self,
              GInputStream* in_stream,
              GError** error)
{
	JsonParser* parser = NULL;
	JsonParser* _tmp0_;
	JsonParser* _tmp1_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (in_stream != NULL);
	_tmp0_ = tuba_network_get_parser_from_inputstream (in_stream, &_inner_error0_);
	parser = _tmp0_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	_tmp1_ = parser;
	if (tuba_network_get_array_size (_tmp1_) > ((guint) 0)) {
		AdwPreferencesPage* _tmp2_;
		JsonParser* _tmp3_;
		_tmp2_ = self->priv->members_page;
		adw_preferences_dialog_add ((AdwPreferencesDialog*) self, _tmp2_);
		_tmp3_ = parser;
		tuba_network_parse_array (_tmp3_, ____lambda176__tuba_network_node_callback, g_object_ref (self), g_object_unref, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_propagate_error (error, _inner_error0_);
			_g_object_unref0 (parser);
			return;
		}
	}
	_g_object_unref0 (parser);
}

static void
___lambda175__tuba_network_success_callback (GInputStream* in_stream,
                                             SoupMessageHeaders* response_headers,
                                             gpointer self,
                                             GError** error)
{
	__lambda175_ ((TubaDialogsListEdit*) self, in_stream, error);
}

static void
tuba_dialogs_list_edit_update_members (TubaDialogsListEdit* self)
{
	TubaAPIList* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	TubaRequest* _tmp6_;
	TubaRequest* _tmp7_;
	TubaAccountStore* _tmp8_;
	TubaInstanceAccount* _tmp9_;
	TubaInstanceAccount* _tmp10_;
	TubaRequest* _tmp11_;
	TubaRequest* _tmp12_;
	TubaRequest* _tmp13_;
	TubaRequest* _tmp14_;
	TubaRequest* _tmp15_;
	TubaRequest* _tmp16_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_list;
	_tmp1_ = tuba_api_list_get_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = string_to_string (_tmp2_);
	_tmp4_ = g_strconcat ("/api/v1/lists/", _tmp3_, "/accounts", NULL);
	_tmp5_ = _tmp4_;
	_tmp6_ = tuba_request_new_GET (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = tuba_accounts;
	_tmp9_ = tuba_account_store_get_active (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = tuba_request_with_account (_tmp7_, _tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = tuba_request_then (_tmp12_, ___lambda175__tuba_network_success_callback, g_object_ref (self), g_object_unref);
	_tmp14_ = _tmp13_;
	_tmp15_ = tuba_request_exec (_tmp14_);
	_tmp16_ = _tmp15_;
	_g_object_unref0 (_tmp16_);
	_g_object_unref0 (_tmp14_);
	_g_object_unref0 (_tmp12_);
	_g_object_unref0 (_tmp7_);
	_g_free0 (_tmp5_);
}

static void
tuba_dialogs_list_edit_on_member_remove_changed (TubaDialogsListEdit* self,
                                                 const gchar* member_id,
                                                 gboolean active)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (member_id != NULL);
	if (active) {
		GeeArrayList* _tmp0_;
		_tmp0_ = self->priv->_memebers_to_be_removed;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, member_id);
	} else {
		GeeArrayList* _tmp1_;
		_tmp1_ = self->priv->_memebers_to_be_removed;
		if (gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp1_, member_id)) {
			GeeArrayList* _tmp2_;
			_tmp2_ = self->priv->_memebers_to_be_removed;
			gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp2_, member_id);
		}
	}
}

static void
tuba_dialogs_list_edit_on_close (TubaDialogsListEdit* self)
{
	g_return_if_fail (self != NULL);
	tuba_dialogs_list_edit_on_apply (self);
	adw_dialog_force_close ((AdwDialog*) self);
}

static void
_tuba_dialogs_list_edit_on_close_adw_dialog_closed (AdwDialog* _sender,
                                                    gpointer self)
{
	tuba_dialogs_list_edit_on_close ((TubaDialogsListEdit*) self);
}

static Block23Data*
block23_data_ref (Block23Data* _data23_)
{
	g_atomic_int_inc (&_data23_->_ref_count_);
	return _data23_;
}

static void
block23_data_unref (void * _userdata_)
{
	Block23Data* _data23_;
	_data23_ = (Block23Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data23_->_ref_count_)) {
		TubaDialogsListEdit* self;
		self = _data23_->self;
		_g_free0 (_data23_->replies_policy_string);
		_g_object_unref0 (self);
		g_slice_free (Block23Data, _data23_);
	}
}

static void
___lambda177_ (Block23Data* _data23_,
               GError** error)
{
	TubaDialogsListEdit* self;
	TubaAPIList* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	TubaAPIList* _tmp3_;
	const gchar* _tmp4_;
	TubaAPIList* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	self = _data23_->self;
	_tmp0_ = self->priv->_list;
	_tmp1_ = tuba_dialogs_list_edit_get_list_title (self);
	_tmp2_ = _tmp1_;
	tuba_api_list_set_title (_tmp0_, _tmp2_);
	_tmp3_ = self->priv->_list;
	_tmp4_ = _data23_->replies_policy_string;
	tuba_api_list_set_replies_policy (_tmp3_, _tmp4_);
	_tmp5_ = self->priv->_list;
	_tmp6_ = tuba_dialogs_list_edit_get_is_exclusive (self);
	_tmp7_ = _tmp6_;
	tuba_api_list_set_exclusive (_tmp5_, _tmp7_);
}

static void
____lambda177__tuba_network_success_callback (GInputStream* in_stream,
                                              SoupMessageHeaders* response_headers,
                                              gpointer self,
                                              GError** error)
{
	___lambda177_ (self, error);
}

static Block24Data*
block24_data_ref (Block24Data* _data24_)
{
	g_atomic_int_inc (&_data24_->_ref_count_);
	return _data24_;
}

static void
block24_data_unref (void * _userdata_)
{
	Block24Data* _data24_;
	_data24_ = (Block24Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data24_->_ref_count_)) {
		TubaDialogsListEdit* self;
		self = _data24_->self;
		_g_object_unref0 (_data24_->ids_builder);
		_g_object_unref0 (self);
		g_slice_free (Block24Data, _data24_);
	}
}

static gboolean
___lambda178_ (Block24Data* _data24_,
               gchar* e)
{
	TubaDialogsListEdit* self;
	JsonBuilder* _tmp0_;
	gboolean result;
	self = _data24_->self;
	g_return_val_if_fail (e != NULL, FALSE);
	_tmp0_ = _data24_->ids_builder;
	json_builder_add_string_value (_tmp0_, e);
	result = TRUE;
	_g_free0 (e);
	return result;
}

static gboolean
____lambda178__gee_forall_func (gpointer g,
                                gpointer self)
{
	gboolean result;
	result = ___lambda178_ (self, (gchar*) g);
	return result;
}

static void
tuba_dialogs_list_edit_on_apply (TubaDialogsListEdit* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	TubaAPIList* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	GeeArrayList* _tmp52_;
	gint _tmp53_;
	gint _tmp54_;
	g_return_if_fail (self != NULL);
	_tmp2_ = self->priv->_list;
	_tmp3_ = tuba_api_list_get_title (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = tuba_dialogs_list_edit_get_list_title (self);
	_tmp6_ = _tmp5_;
	if (g_strcmp0 (_tmp4_, _tmp6_) != 0) {
		_tmp1_ = TRUE;
	} else {
		TubaAPIList* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		TubaDialogsListEditRepliesPolicy _tmp10_;
		_tmp7_ = self->priv->_list;
		_tmp8_ = tuba_api_list_get_replies_policy (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = self->priv->_replies_policy_active;
		_tmp1_ = tuba_dialogs_list_edit_replies_policy_from_string (_tmp9_) != _tmp10_;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		TubaAPIList* _tmp11_;
		gboolean _tmp12_;
		gboolean _tmp13_;
		gboolean _tmp14_;
		gboolean _tmp15_;
		_tmp11_ = self->priv->_list;
		_tmp12_ = tuba_api_list_get_exclusive (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = tuba_dialogs_list_edit_get_is_exclusive (self);
		_tmp15_ = _tmp14_;
		_tmp0_ = _tmp13_ != _tmp15_;
	}
	if (_tmp0_) {
		Block23Data* _data23_;
		TubaDialogsListEditRepliesPolicy _tmp16_;
		gchar* _tmp17_;
		JsonBuilder* builder = NULL;
		JsonBuilder* _tmp18_;
		JsonBuilder* _tmp19_;
		JsonBuilder* _tmp20_;
		JsonBuilder* _tmp21_;
		const gchar* _tmp22_;
		const gchar* _tmp23_;
		JsonBuilder* _tmp24_;
		JsonBuilder* _tmp25_;
		const gchar* _tmp26_;
		JsonBuilder* _tmp27_;
		JsonBuilder* _tmp28_;
		gboolean _tmp29_;
		gboolean _tmp30_;
		JsonBuilder* _tmp31_;
		TubaAPIList* _tmp32_;
		const gchar* _tmp33_;
		const gchar* _tmp34_;
		const gchar* _tmp35_;
		gchar* _tmp36_;
		gchar* _tmp37_;
		TubaRequest* _tmp38_;
		TubaRequest* _tmp39_;
		TubaAccountStore* _tmp40_;
		TubaInstanceAccount* _tmp41_;
		TubaInstanceAccount* _tmp42_;
		TubaRequest* _tmp43_;
		TubaRequest* _tmp44_;
		JsonBuilder* _tmp45_;
		TubaRequest* _tmp46_;
		TubaRequest* _tmp47_;
		TubaRequest* _tmp48_;
		TubaRequest* _tmp49_;
		TubaRequest* _tmp50_;
		TubaRequest* _tmp51_;
		_data23_ = g_slice_new0 (Block23Data);
		_data23_->_ref_count_ = 1;
		_data23_->self = g_object_ref (self);
		_tmp16_ = self->priv->_replies_policy_active;
		_tmp17_ = tuba_dialogs_list_edit_replies_policy_to_string (_tmp16_);
		_data23_->replies_policy_string = _tmp17_;
		_tmp18_ = json_builder_new ();
		builder = _tmp18_;
		_tmp19_ = builder;
		json_builder_begin_object (_tmp19_);
		_tmp20_ = builder;
		json_builder_set_member_name (_tmp20_, "title");
		_tmp21_ = builder;
		_tmp22_ = tuba_dialogs_list_edit_get_list_title (self);
		_tmp23_ = _tmp22_;
		json_builder_add_string_value (_tmp21_, _tmp23_);
		_tmp24_ = builder;
		json_builder_set_member_name (_tmp24_, "replies_policy");
		_tmp25_ = builder;
		_tmp26_ = _data23_->replies_policy_string;
		json_builder_add_string_value (_tmp25_, _tmp26_);
		_tmp27_ = builder;
		json_builder_set_member_name (_tmp27_, "exclusive");
		_tmp28_ = builder;
		_tmp29_ = tuba_dialogs_list_edit_get_is_exclusive (self);
		_tmp30_ = _tmp29_;
		json_builder_add_boolean_value (_tmp28_, _tmp30_);
		_tmp31_ = builder;
		json_builder_end_object (_tmp31_);
		_tmp32_ = self->priv->_list;
		_tmp33_ = tuba_api_list_get_id (_tmp32_);
		_tmp34_ = _tmp33_;
		_tmp35_ = string_to_string (_tmp34_);
		_tmp36_ = g_strconcat ("/api/v1/lists/", _tmp35_, NULL);
		_tmp37_ = _tmp36_;
		_tmp38_ = tuba_request_new_PUT (_tmp37_);
		_tmp39_ = _tmp38_;
		_tmp40_ = tuba_accounts;
		_tmp41_ = tuba_account_store_get_active (_tmp40_);
		_tmp42_ = _tmp41_;
		_tmp43_ = tuba_request_with_account (_tmp39_, _tmp42_);
		_tmp44_ = _tmp43_;
		_tmp45_ = builder;
		_tmp46_ = tuba_request_body_json (_tmp44_, _tmp45_);
		_tmp47_ = _tmp46_;
		_tmp48_ = tuba_request_then (_tmp47_, ____lambda177__tuba_network_success_callback, block23_data_ref (_data23_), block23_data_unref);
		_tmp49_ = _tmp48_;
		_tmp50_ = tuba_request_exec (_tmp49_);
		_tmp51_ = _tmp50_;
		_g_object_unref0 (_tmp51_);
		_g_object_unref0 (_tmp49_);
		_g_object_unref0 (_tmp47_);
		_g_object_unref0 (_tmp44_);
		_g_object_unref0 (_tmp39_);
		_g_free0 (_tmp37_);
		_g_object_unref0 (builder);
		block23_data_unref (_data23_);
		_data23_ = NULL;
	}
	_tmp52_ = self->priv->_memebers_to_be_removed;
	_tmp53_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp52_);
	_tmp54_ = _tmp53_;
	if (_tmp54_ > 0) {
		Block24Data* _data24_;
		JsonBuilder* _tmp55_;
		JsonBuilder* _tmp56_;
		JsonBuilder* _tmp57_;
		JsonBuilder* _tmp58_;
		GeeArrayList* _tmp59_;
		JsonBuilder* _tmp60_;
		JsonBuilder* _tmp61_;
		TubaAPIList* _tmp62_;
		const gchar* _tmp63_;
		const gchar* _tmp64_;
		const gchar* _tmp65_;
		gchar* _tmp66_;
		gchar* _tmp67_;
		TubaRequest* _tmp68_;
		TubaRequest* _tmp69_;
		TubaAccountStore* _tmp70_;
		TubaInstanceAccount* _tmp71_;
		TubaInstanceAccount* _tmp72_;
		TubaRequest* _tmp73_;
		TubaRequest* _tmp74_;
		JsonBuilder* _tmp75_;
		TubaRequest* _tmp76_;
		TubaRequest* _tmp77_;
		TubaRequest* _tmp78_;
		TubaRequest* _tmp79_;
		_data24_ = g_slice_new0 (Block24Data);
		_data24_->_ref_count_ = 1;
		_data24_->self = g_object_ref (self);
		_tmp55_ = json_builder_new ();
		_data24_->ids_builder = _tmp55_;
		_tmp56_ = _data24_->ids_builder;
		json_builder_begin_object (_tmp56_);
		_tmp57_ = _data24_->ids_builder;
		json_builder_set_member_name (_tmp57_, "account_ids");
		_tmp58_ = _data24_->ids_builder;
		json_builder_begin_array (_tmp58_);
		_tmp59_ = self->priv->_memebers_to_be_removed;
		gee_abstract_collection_foreach ((GeeAbstractCollection*) _tmp59_, ____lambda178__gee_forall_func, _data24_);
		_tmp60_ = _data24_->ids_builder;
		json_builder_end_array (_tmp60_);
		_tmp61_ = _data24_->ids_builder;
		json_builder_end_object (_tmp61_);
		_tmp62_ = self->priv->_list;
		_tmp63_ = tuba_api_list_get_id (_tmp62_);
		_tmp64_ = _tmp63_;
		_tmp65_ = string_to_string (_tmp64_);
		_tmp66_ = g_strconcat ("/api/v1/lists/", _tmp65_, "/accounts", NULL);
		_tmp67_ = _tmp66_;
		_tmp68_ = tuba_request_new_DELETE (_tmp67_);
		_tmp69_ = _tmp68_;
		_tmp70_ = tuba_accounts;
		_tmp71_ = tuba_account_store_get_active (_tmp70_);
		_tmp72_ = _tmp71_;
		_tmp73_ = tuba_request_with_account (_tmp69_, _tmp72_);
		_tmp74_ = _tmp73_;
		_tmp75_ = _data24_->ids_builder;
		_tmp76_ = tuba_request_body_json (_tmp74_, _tmp75_);
		_tmp77_ = _tmp76_;
		_tmp78_ = tuba_request_exec (_tmp77_);
		_tmp79_ = _tmp78_;
		_g_object_unref0 (_tmp79_);
		_g_object_unref0 (_tmp77_);
		_g_object_unref0 (_tmp74_);
		_g_object_unref0 (_tmp69_);
		_g_free0 (_tmp67_);
		block24_data_unref (_data24_);
		_data24_ = NULL;
	}
}

static TubaAPIList*
tuba_dialogs_list_edit_get_list (TubaDialogsListEdit* 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_list_edit_set_list (TubaDialogsListEdit* 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 GeeArrayList*
tuba_dialogs_list_edit_get_memebers_to_be_removed (TubaDialogsListEdit* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_memebers_to_be_removed;
	result = _tmp0_;
	return result;
}

TubaDialogsListEditRepliesPolicy
tuba_dialogs_list_edit_get_replies_policy_active (TubaDialogsListEdit* self)
{
	TubaDialogsListEditRepliesPolicy result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_replies_policy_active;
	return result;
}

static void
tuba_dialogs_list_edit_set_replies_policy_active (TubaDialogsListEdit* self,
                                                  TubaDialogsListEditRepliesPolicy value)
{
	TubaDialogsListEditRepliesPolicy old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_list_edit_get_replies_policy_active (self);
	if (old_value != value) {
		self->priv->_replies_policy_active = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_list_edit_properties[TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_ACTIVE_PROPERTY]);
	}
}

const gchar*
tuba_dialogs_list_edit_get_list_title (TubaDialogsListEdit* self)
{
	const gchar* result;
	AdwEntryRow* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->title_row;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

gboolean
tuba_dialogs_list_edit_get_is_exclusive (TubaDialogsListEdit* self)
{
	gboolean result;
	AdwSwitchRow* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->hide_from_home_row;
	_tmp1_ = adw_switch_row_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

static inline gpointer
tuba_dialogs_list_edit_member_check_button_get_instance_private (TubaDialogsListEditMemberCheckButton* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsListEditMemberCheckButton_private_offset);
}

static void
_tuba_dialogs_list_edit_member_check_button_on_toggled_gtk_check_button_toggled (GtkCheckButton* _sender,
                                                                                 gpointer self)
{
	tuba_dialogs_list_edit_member_check_button_on_toggled ((TubaDialogsListEditMemberCheckButton*) self);
}

static TubaDialogsListEditMemberCheckButton*
tuba_dialogs_list_edit_member_check_button_construct (GType object_type,
                                                      const gchar* member_id)
{
	TubaDialogsListEditMemberCheckButton * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar** _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	g_return_val_if_fail (member_id != NULL, NULL);
	self = (TubaDialogsListEditMemberCheckButton*) g_object_new (object_type, NULL);
	tuba_dialogs_list_edit_member_check_button_set_member_id (self, member_id);
	_tmp0_ = g_strdup ("selection-mode");
	_tmp1_ = g_strdup ("error");
	_tmp2_ = g_new0 (gchar*, 2 + 1);
	_tmp2_[0] = _tmp0_;
	_tmp2_[1] = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp3__length1 = 2;
	gtk_widget_set_css_classes ((GtkWidget*) self, _tmp3_);
	_tmp3_ = (_vala_array_free (_tmp3_, _tmp3__length1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) self, _ ("Remove"));
	g_signal_connect_object ((GtkCheckButton*) self, "toggled", (GCallback) _tuba_dialogs_list_edit_member_check_button_on_toggled_gtk_check_button_toggled, self, 0);
	return self;
}

static TubaDialogsListEditMemberCheckButton*
tuba_dialogs_list_edit_member_check_button_new (const gchar* member_id)
{
	return tuba_dialogs_list_edit_member_check_button_construct (TUBA_DIALOGS_LIST_EDIT_TYPE_MEMBER_CHECK_BUTTON, member_id);
}

static void
tuba_dialogs_list_edit_member_check_button_on_toggled (TubaDialogsListEditMemberCheckButton* self)
{
	const gchar* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_member_id;
	_tmp1_ = gtk_check_button_get_active ((GtkCheckButton*) self);
	_tmp2_ = _tmp1_;
	g_signal_emit (self, tuba_dialogs_list_edit_member_check_button_signals[TUBA_DIALOGS_LIST_EDIT_MEMBER_CHECK_BUTTON_CHANGED_SIGNAL], 0, _tmp0_, _tmp2_);
}

static const gchar*
tuba_dialogs_list_edit_member_check_button_get_member_id (TubaDialogsListEditMemberCheckButton* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_member_id;
	result = _tmp0_;
	return result;
}

static void
tuba_dialogs_list_edit_member_check_button_set_member_id (TubaDialogsListEditMemberCheckButton* self,
                                                          const gchar* value)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_member_id);
	self->priv->_member_id = _tmp0_;
}

static void
g_cclosure_user_marshal_VOID__STRING_BOOLEAN (GClosure * closure,
                                              GValue * return_value,
                                              guint n_param_values,
                                              const GValue * param_values,
                                              gpointer invocation_hint,
                                              gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_BOOLEAN) (gpointer data1, const char* arg_1, gboolean arg_2, gpointer data2);
	register GMarshalFunc_VOID__STRING_BOOLEAN 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__STRING_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_boolean (param_values + 2), data2);
}

static void
tuba_dialogs_list_edit_member_check_button_class_init (TubaDialogsListEditMemberCheckButtonClass * klass,
                                                       gpointer klass_data)
{
	tuba_dialogs_list_edit_member_check_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsListEditMemberCheckButton_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_dialogs_list_edit_member_check_button_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_dialogs_list_edit_member_check_button_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_list_edit_member_check_button_finalize;
	tuba_dialogs_list_edit_member_check_button_signals[TUBA_DIALOGS_LIST_EDIT_MEMBER_CHECK_BUTTON_CHANGED_SIGNAL] = g_signal_new ("changed", TUBA_DIALOGS_LIST_EDIT_TYPE_MEMBER_CHECK_BUTTON, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_BOOLEAN, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_BOOLEAN);
}

static void
tuba_dialogs_list_edit_member_check_button_instance_init (TubaDialogsListEditMemberCheckButton * self,
                                                          gpointer klass)
{
	self->priv = tuba_dialogs_list_edit_member_check_button_get_instance_private (self);
}

static void
tuba_dialogs_list_edit_member_check_button_finalize (GObject * obj)
{
	TubaDialogsListEditMemberCheckButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_LIST_EDIT_TYPE_MEMBER_CHECK_BUTTON, TubaDialogsListEditMemberCheckButton);
	_g_free0 (self->priv->_member_id);
	G_OBJECT_CLASS (tuba_dialogs_list_edit_member_check_button_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_list_edit_member_check_button_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsListEditMemberCheckButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_list_edit_member_check_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsListEditMemberCheckButton), 0, (GInstanceInitFunc) tuba_dialogs_list_edit_member_check_button_instance_init, NULL };
	GType tuba_dialogs_list_edit_member_check_button_type_id;
	tuba_dialogs_list_edit_member_check_button_type_id = g_type_register_static (gtk_check_button_get_type (), "TubaDialogsListEditMemberCheckButton", &g_define_type_info, 0);
	TubaDialogsListEditMemberCheckButton_private_offset = g_type_add_instance_private (tuba_dialogs_list_edit_member_check_button_type_id, sizeof (TubaDialogsListEditMemberCheckButtonPrivate));
	return tuba_dialogs_list_edit_member_check_button_type_id;
}

static GType
tuba_dialogs_list_edit_member_check_button_get_type (void)
{
	static gsize tuba_dialogs_list_edit_member_check_button_type_id__once = 0;
	if (g_once_init_enter (&tuba_dialogs_list_edit_member_check_button_type_id__once)) {
		GType tuba_dialogs_list_edit_member_check_button_type_id;
		tuba_dialogs_list_edit_member_check_button_type_id = tuba_dialogs_list_edit_member_check_button_get_type_once ();
		g_once_init_leave (&tuba_dialogs_list_edit_member_check_button_type_id__once, tuba_dialogs_list_edit_member_check_button_type_id);
	}
	return tuba_dialogs_list_edit_member_check_button_type_id__once;
}

static void
_vala_tuba_dialogs_list_edit_member_check_button_get_property (GObject * object,
                                                               guint property_id,
                                                               GValue * value,
                                                               GParamSpec * pspec)
{
	TubaDialogsListEditMemberCheckButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_LIST_EDIT_TYPE_MEMBER_CHECK_BUTTON, TubaDialogsListEditMemberCheckButton);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_dialogs_list_edit_member_check_button_set_property (GObject * object,
                                                               guint property_id,
                                                               const GValue * value,
                                                               GParamSpec * pspec)
{
	TubaDialogsListEditMemberCheckButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_LIST_EDIT_TYPE_MEMBER_CHECK_BUTTON, TubaDialogsListEditMemberCheckButton);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
tuba_dialogs_list_edit_class_init (TubaDialogsListEditClass * klass,
                                   gpointer klass_data)
{
	tuba_dialogs_list_edit_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsListEdit_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_dialogs_list_edit_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_dialogs_list_edit_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_list_edit_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_ACTIVE_PROPERTY, tuba_dialogs_list_edit_properties[TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_ACTIVE_PROPERTY] = g_param_spec_enum ("replies-policy-active", "replies-policy-active", "replies-policy-active", TUBA_DIALOGS_LIST_EDIT_TYPE_REPLIES_POLICY, TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_LIST_EDIT_LIST_TITLE_PROPERTY, tuba_dialogs_list_edit_properties[TUBA_DIALOGS_LIST_EDIT_LIST_TITLE_PROPERTY] = g_param_spec_string ("list-title", "list-title", "list-title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_LIST_EDIT_IS_EXCLUSIVE_PROPERTY, tuba_dialogs_list_edit_properties[TUBA_DIALOGS_LIST_EDIT_IS_EXCLUSIVE_PROPERTY] = g_param_spec_boolean ("is-exclusive", "is-exclusive", "is-exclusive", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/dev/geopjr/Tuba/ui/dialogs/list_edit.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "title_row", FALSE, TubaDialogsListEdit_private_offset + G_STRUCT_OFFSET (TubaDialogsListEditPrivate, title_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "hide_from_home_row", FALSE, TubaDialogsListEdit_private_offset + G_STRUCT_OFFSET (TubaDialogsListEditPrivate, hide_from_home_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "none_radio", FALSE, TubaDialogsListEdit_private_offset + G_STRUCT_OFFSET (TubaDialogsListEditPrivate, none_radio));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "list_radio", FALSE, TubaDialogsListEdit_private_offset + G_STRUCT_OFFSET (TubaDialogsListEditPrivate, list_radio));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "followed_radio", FALSE, TubaDialogsListEdit_private_offset + G_STRUCT_OFFSET (TubaDialogsListEditPrivate, followed_radio));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "members_page", FALSE, TubaDialogsListEdit_private_offset + G_STRUCT_OFFSET (TubaDialogsListEditPrivate, members_page));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "members_group", FALSE, TubaDialogsListEdit_private_offset + G_STRUCT_OFFSET (TubaDialogsListEditPrivate, members_group));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_radio_toggled", G_CALLBACK(_tuba_dialogs_list_edit_on_radio_toggled_gtk_check_button_toggled));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_close", G_CALLBACK(_tuba_dialogs_list_edit_on_close_adw_dialog_closed));
}

static void
tuba_dialogs_list_edit_instance_init (TubaDialogsListEdit * self,
                                      gpointer klass)
{
	GeeArrayList* _tmp0_;
	self->priv = tuba_dialogs_list_edit_get_instance_private (self);
	_tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	self->priv->_memebers_to_be_removed = _tmp0_;
	self->priv->_replies_policy_active = TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_NONE;
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
tuba_dialogs_list_edit_finalize (GObject * obj)
{
	TubaDialogsListEdit * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_TYPE_LIST_EDIT, TubaDialogsListEdit);
	g_debug ("ListEdit.vala:4: Destroying ListEdit");
	_g_object_unref0 (self->priv->_list);
	_g_object_unref0 (self->priv->_memebers_to_be_removed);
	G_OBJECT_CLASS (tuba_dialogs_list_edit_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_list_edit_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsListEditClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_list_edit_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsListEdit), 0, (GInstanceInitFunc) tuba_dialogs_list_edit_instance_init, NULL };
	GType tuba_dialogs_list_edit_type_id;
	tuba_dialogs_list_edit_type_id = g_type_register_static (adw_preferences_dialog_get_type (), "TubaDialogsListEdit", &g_define_type_info, 0);
	TubaDialogsListEdit_private_offset = g_type_add_instance_private (tuba_dialogs_list_edit_type_id, sizeof (TubaDialogsListEditPrivate));
	return tuba_dialogs_list_edit_type_id;
}

GType
tuba_dialogs_list_edit_get_type (void)
{
	static gsize tuba_dialogs_list_edit_type_id__once = 0;
	if (g_once_init_enter (&tuba_dialogs_list_edit_type_id__once)) {
		GType tuba_dialogs_list_edit_type_id;
		tuba_dialogs_list_edit_type_id = tuba_dialogs_list_edit_get_type_once ();
		g_once_init_leave (&tuba_dialogs_list_edit_type_id__once, tuba_dialogs_list_edit_type_id);
	}
	return tuba_dialogs_list_edit_type_id__once;
}

static void
_vala_tuba_dialogs_list_edit_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	TubaDialogsListEdit * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_TYPE_LIST_EDIT, TubaDialogsListEdit);
	switch (property_id) {
		case TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_ACTIVE_PROPERTY:
		g_value_set_enum (value, tuba_dialogs_list_edit_get_replies_policy_active (self));
		break;
		case TUBA_DIALOGS_LIST_EDIT_LIST_TITLE_PROPERTY:
		g_value_set_string (value, tuba_dialogs_list_edit_get_list_title (self));
		break;
		case TUBA_DIALOGS_LIST_EDIT_IS_EXCLUSIVE_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_list_edit_get_is_exclusive (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_dialogs_list_edit_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	TubaDialogsListEdit * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_TYPE_LIST_EDIT, TubaDialogsListEdit);
	switch (property_id) {
		case TUBA_DIALOGS_LIST_EDIT_REPLIES_POLICY_ACTIVE_PROPERTY:
		tuba_dialogs_list_edit_set_replies_policy_active (self, g_value_get_enum (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);
}

