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

#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <libsoup/soup.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_ADMIN_TYPE_BASE (tuba_dialogs_admin_base_get_type ())
#define TUBA_DIALOGS_ADMIN_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_ADMIN_TYPE_BASE, TubaDialogsAdminBase))
#define TUBA_DIALOGS_ADMIN_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_ADMIN_TYPE_BASE, TubaDialogsAdminBaseClass))
#define TUBA_DIALOGS_ADMIN_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_ADMIN_TYPE_BASE))
#define TUBA_DIALOGS_ADMIN_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_ADMIN_TYPE_BASE))
#define TUBA_DIALOGS_ADMIN_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_ADMIN_TYPE_BASE, TubaDialogsAdminBaseClass))

typedef struct _TubaDialogsAdminBase TubaDialogsAdminBase;
typedef struct _TubaDialogsAdminBaseClass TubaDialogsAdminBaseClass;
typedef struct _TubaDialogsAdminBasePrivate TubaDialogsAdminBasePrivate;

#define TUBA_DIALOGS_ADMIN_TYPE_TAKE_ACTION (tuba_dialogs_admin_take_action_get_type ())
#define TUBA_DIALOGS_ADMIN_TAKE_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_ADMIN_TYPE_TAKE_ACTION, TubaDialogsAdminTakeAction))
#define TUBA_DIALOGS_ADMIN_TAKE_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_ADMIN_TYPE_TAKE_ACTION, TubaDialogsAdminTakeActionClass))
#define TUBA_DIALOGS_ADMIN_IS_TAKE_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_ADMIN_TYPE_TAKE_ACTION))
#define TUBA_DIALOGS_ADMIN_IS_TAKE_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_ADMIN_TYPE_TAKE_ACTION))
#define TUBA_DIALOGS_ADMIN_TAKE_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_ADMIN_TYPE_TAKE_ACTION, TubaDialogsAdminTakeActionClass))

typedef struct _TubaDialogsAdminTakeAction TubaDialogsAdminTakeAction;
typedef struct _TubaDialogsAdminTakeActionClass TubaDialogsAdminTakeActionClass;
typedef struct _TubaDialogsAdminTakeActionPrivate TubaDialogsAdminTakeActionPrivate;
enum  {
	TUBA_DIALOGS_ADMIN_TAKE_ACTION_0_PROPERTY,
	TUBA_DIALOGS_ADMIN_TAKE_ACTION_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_admin_take_action_properties[TUBA_DIALOGS_ADMIN_TAKE_ACTION_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 ())
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _TubaDialogsAdminTakeActionOnTakeActionRealData TubaDialogsAdminTakeActionOnTakeActionRealData;
enum  {
	TUBA_DIALOGS_ADMIN_TAKE_ACTION_TOOK_ACTION_SIGNAL,
	TUBA_DIALOGS_ADMIN_TAKE_ACTION_NUM_SIGNALS
};
static guint tuba_dialogs_admin_take_action_signals[TUBA_DIALOGS_ADMIN_TAKE_ACTION_NUM_SIGNALS] = {0};

struct _TubaDialogsAdminBase {
	AdwDialog parent_instance;
	TubaDialogsAdminBasePrivate * priv;
};

struct _TubaDialogsAdminBaseClass {
	AdwDialogClass parent_class;
};

struct _TubaDialogsAdminTakeAction {
	TubaDialogsAdminBase parent_instance;
	TubaDialogsAdminTakeActionPrivate * priv;
};

struct _TubaDialogsAdminTakeActionClass {
	TubaDialogsAdminBaseClass parent_class;
};

struct _TubaDialogsAdminTakeActionPrivate {
	GtkButton* take_action_button;
	GtkCheckButton* action_warning;
	GtkCheckButton* action_freeze;
	GtkCheckButton* action_sensitive;
	GtkCheckButton* action_limit;
	GtkCheckButton* action_suspend;
	GtkCheckButton* send_email;
	AdwEntryRow* comment_row;
	gchar* account_id;
	gchar* account_handle;
	gchar* report_id;
};

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 _TubaDialogsAdminTakeActionOnTakeActionRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaDialogsAdminTakeAction* self;
	AdwAlertDialog* dlg;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	AdwAlertDialog* _tmp3_;
	AdwAlertDialog* _tmp4_;
	AdwAlertDialog* _tmp5_;
	AdwAlertDialog* _tmp6_;
	AdwAlertDialog* _tmp7_;
	AdwAlertDialog* _tmp8_;
	AdwAlertDialog* _tmp9_;
	const gchar* _tmp10_;
	gchar* kind;
	gchar* _tmp11_;
	GtkCheckButton* _tmp12_;
	gboolean _tmp13_;
	gboolean _tmp14_;
	gchar* _tmp15_;
	GtkCheckButton* _tmp16_;
	gboolean _tmp17_;
	gboolean _tmp18_;
	gchar* _tmp19_;
	GtkCheckButton* _tmp20_;
	gboolean _tmp21_;
	gboolean _tmp22_;
	gchar* _tmp23_;
	GtkCheckButton* _tmp24_;
	gboolean _tmp25_;
	gboolean _tmp26_;
	gchar* _tmp27_;
	TubaRequestV2* req;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	TubaAccountStore* _tmp32_;
	TubaInstanceAccount* _tmp33_;
	TubaInstanceAccount* _tmp34_;
	TubaInstanceAccount* _tmp35_;
	TubaRequestV2* _tmp36_;
	TubaRequestV2* _tmp37_;
	TubaRequestV2* _tmp38_;
	const gchar* _tmp39_;
	TubaRequestV2* _tmp40_;
	AdwEntryRow* _tmp41_;
	const gchar* _tmp42_;
	const gchar* _tmp43_;
	TubaRequestV2* _tmp44_;
	GtkCheckButton* _tmp45_;
	gboolean _tmp46_;
	gboolean _tmp47_;
	gchar* _tmp48_;
	gchar* _tmp49_;
	const gchar* _tmp50_;
	TubaRequestV2* _tmp51_;
	const gchar* _tmp52_;
	TubaRequestV2* _tmp53_;
	GInputStream* _tmp54_;
	GInputStream* _tmp55_;
	GError* e;
	const gchar* _tmp56_;
	const gchar* _tmp57_;
	GError* _tmp58_;
	gchar* _tmp59_;
	gchar* _tmp60_;
	GError* _tmp61_;
	const gchar* _tmp62_;
	const gchar* _tmp63_;
	gchar* _tmp64_;
	gchar* _tmp65_;
	GError* _tmp66_;
	const gchar* _tmp67_;
	const gchar* _tmp68_;
	GError* _tmp69_;
	gchar* _tmp70_;
	gchar* _tmp71_;
	gchar* _tmp72_;
	gchar* _tmp73_;
	GError* _inner_error0_;
};

static gint TubaDialogsAdminTakeAction_private_offset;
static gpointer tuba_dialogs_admin_take_action_parent_class = NULL;
VALA_EXTERN TubaAccountStore* tuba_accounts;

VALA_EXTERN GType tuba_dialogs_admin_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsAdminBase, g_object_unref)
VALA_EXTERN GType tuba_dialogs_admin_take_action_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsAdminTakeAction, g_object_unref)
VALA_EXTERN TubaDialogsAdminTakeAction* tuba_dialogs_admin_take_action_new (const gchar* account_id,
                                                                const gchar* account_handle,
                                                                const gchar* report_id);
VALA_EXTERN TubaDialogsAdminTakeAction* tuba_dialogs_admin_take_action_construct (GType object_type,
                                                                      const gchar* account_id,
                                                                      const gchar* account_handle,
                                                                      const gchar* report_id);
VALA_EXTERN TubaDialogsAdminBase* tuba_dialogs_admin_base_new (void);
VALA_EXTERN TubaDialogsAdminBase* tuba_dialogs_admin_base_construct (GType object_type);
static void tuba_dialogs_admin_take_action_on_cancel (TubaDialogsAdminTakeAction* self);
static void tuba_dialogs_admin_take_action_on_take_action (TubaDialogsAdminTakeAction* self);
static void tuba_dialogs_admin_take_action_on_take_action_real (TubaDialogsAdminTakeAction* self,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
static void tuba_dialogs_admin_take_action_on_take_action_real_finish (TubaDialogsAdminTakeAction* self,
                                                                GAsyncResult* _res_);
static void tuba_dialogs_admin_take_action_on_take_action_real_data_free (gpointer _data);
static gboolean tuba_dialogs_admin_take_action_on_take_action_real_co (TubaDialogsAdminTakeActionOnTakeActionRealData* _data_);
static void tuba_dialogs_admin_take_action_on_take_action_real_ready (GObject* source_object,
                                                               GAsyncResult* _res_,
                                                               gpointer _user_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_add_form_data (TubaRequestV2* self,
                                    const gchar* name,
                                    const gchar* val);
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);
VALA_EXTERN void tuba_dialogs_admin_base_add_toast (TubaDialogsAdminBase* self,
                                        const gchar* content);
static GObject * tuba_dialogs_admin_take_action_constructor (GType type,
                                                      guint n_construct_properties,
                                                      GObjectConstructParam * construct_properties);
static void _tuba_dialogs_admin_take_action_on_cancel_gtk_button_clicked (GtkButton* _sender,
                                                                   gpointer self);
static void _tuba_dialogs_admin_take_action_on_take_action_gtk_button_clicked (GtkButton* _sender,
                                                                        gpointer self);
VALA_EXTERN AdwHeaderBar* tuba_dialogs_admin_base_get_headerbar (TubaDialogsAdminBase* self);
VALA_EXTERN AdwPreferencesPage* tuba_dialogs_admin_base_get_page (TubaDialogsAdminBase* self);
static void tuba_dialogs_admin_take_action_finalize (GObject * obj);
static GType tuba_dialogs_admin_take_action_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_admin_take_action_get_instance_private (TubaDialogsAdminTakeAction* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsAdminTakeAction_private_offset);
}

TubaDialogsAdminTakeAction*
tuba_dialogs_admin_take_action_construct (GType object_type,
                                          const gchar* account_id,
                                          const gchar* account_handle,
                                          const gchar* report_id)
{
	TubaDialogsAdminTakeAction * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_val_if_fail (account_id != NULL, NULL);
	g_return_val_if_fail (account_handle != NULL, NULL);
	self = (TubaDialogsAdminTakeAction*) tuba_dialogs_admin_base_construct (object_type);
	_tmp0_ = g_strdup (account_id);
	_g_free0 (self->priv->account_id);
	self->priv->account_id = _tmp0_;
	_tmp1_ = g_strdup (report_id);
	_g_free0 (self->priv->report_id);
	self->priv->report_id = _tmp1_;
	_tmp2_ = g_strdup (account_handle);
	_g_free0 (self->priv->account_handle);
	self->priv->account_handle = _tmp2_;
	return self;
}

TubaDialogsAdminTakeAction*
tuba_dialogs_admin_take_action_new (const gchar* account_id,
                                    const gchar* account_handle,
                                    const gchar* report_id)
{
	return tuba_dialogs_admin_take_action_construct (TUBA_DIALOGS_ADMIN_TYPE_TAKE_ACTION, account_id, account_handle, report_id);
}

static void
tuba_dialogs_admin_take_action_on_cancel (TubaDialogsAdminTakeAction* self)
{
	g_return_if_fail (self != NULL);
	adw_dialog_force_close ((AdwDialog*) self);
}

static void
tuba_dialogs_admin_take_action_on_take_action (TubaDialogsAdminTakeAction* self)
{
	g_return_if_fail (self != NULL);
	tuba_dialogs_admin_take_action_on_take_action_real (self, NULL, NULL);
}

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

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

static void
tuba_dialogs_admin_take_action_on_take_action_real (TubaDialogsAdminTakeAction* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	TubaDialogsAdminTakeActionOnTakeActionRealData* _data_;
	TubaDialogsAdminTakeAction* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaDialogsAdminTakeActionOnTakeActionRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_dialogs_admin_take_action_on_take_action_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_dialogs_admin_take_action_on_take_action_real_co (_data_);
}

static void
tuba_dialogs_admin_take_action_on_take_action_real_finish (TubaDialogsAdminTakeAction* self,
                                                           GAsyncResult* _res_)
{
	TubaDialogsAdminTakeActionOnTakeActionRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_dialogs_admin_take_action_on_take_action_real_ready (GObject* source_object,
                                                          GAsyncResult* _res_,
                                                          gpointer _user_data_)
{
	TubaDialogsAdminTakeActionOnTakeActionRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_dialogs_admin_take_action_on_take_action_real_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 gchar*
bool_to_string (gboolean self)
{
	gchar* result;
	if (self) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("true");
		result = _tmp0_;
		return result;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("false");
		result = _tmp1_;
		return result;
	}
}

static gboolean
tuba_dialogs_admin_take_action_on_take_action_real_co (TubaDialogsAdminTakeActionOnTakeActionRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->account_handle;
	_data_->_tmp1_ = g_strdup_printf (_ ("Take Action Against %s?"), _data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = (AdwAlertDialog*) adw_alert_dialog_new (_data_->_tmp2_, NULL);
	g_object_ref_sink (_data_->_tmp3_);
	_data_->_tmp4_ = _data_->_tmp3_;
	_g_free0 (_data_->_tmp2_);
	_data_->dlg = _data_->_tmp4_;
	_data_->_tmp5_ = _data_->dlg;
	adw_alert_dialog_add_response (_data_->_tmp5_, "no", _ ("Cancel"));
	_data_->_tmp6_ = _data_->dlg;
	adw_alert_dialog_set_response_appearance (_data_->_tmp6_, "no", ADW_RESPONSE_DEFAULT);
	_data_->_tmp7_ = _data_->dlg;
	adw_alert_dialog_add_response (_data_->_tmp7_, "yes", _ ("Take Action"));
	_data_->_tmp8_ = _data_->dlg;
	adw_alert_dialog_set_response_appearance (_data_->_tmp8_, "yes", ADW_RESPONSE_DESTRUCTIVE);
	_data_->_tmp9_ = _data_->dlg;
	_data_->_state_ = 1;
	adw_alert_dialog_choose (_data_->_tmp9_, (GtkWidget*) _data_->self, NULL, tuba_dialogs_admin_take_action_on_take_action_real_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp10_ = adw_alert_dialog_choose_finish (_data_->_tmp9_, _data_->_res_);
	if (g_strcmp0 (_data_->_tmp10_, "yes") == 0) {
		gtk_widget_set_sensitive ((GtkWidget*) _data_->self, FALSE);
		_data_->_tmp11_ = g_strdup ("none");
		_data_->kind = _data_->_tmp11_;
		_data_->_tmp12_ = _data_->self->priv->action_freeze;
		_data_->_tmp13_ = gtk_check_button_get_active (_data_->_tmp12_);
		_data_->_tmp14_ = _data_->_tmp13_;
		if (_data_->_tmp14_) {
			_data_->_tmp15_ = g_strdup ("disable");
			_g_free0 (_data_->kind);
			_data_->kind = _data_->_tmp15_;
		} else {
			_data_->_tmp16_ = _data_->self->priv->action_sensitive;
			_data_->_tmp17_ = gtk_check_button_get_active (_data_->_tmp16_);
			_data_->_tmp18_ = _data_->_tmp17_;
			if (_data_->_tmp18_) {
				_data_->_tmp19_ = g_strdup ("sensitive");
				_g_free0 (_data_->kind);
				_data_->kind = _data_->_tmp19_;
			} else {
				_data_->_tmp20_ = _data_->self->priv->action_limit;
				_data_->_tmp21_ = gtk_check_button_get_active (_data_->_tmp20_);
				_data_->_tmp22_ = _data_->_tmp21_;
				if (_data_->_tmp22_) {
					_data_->_tmp23_ = g_strdup ("silence");
					_g_free0 (_data_->kind);
					_data_->kind = _data_->_tmp23_;
				} else {
					_data_->_tmp24_ = _data_->self->priv->action_suspend;
					_data_->_tmp25_ = gtk_check_button_get_active (_data_->_tmp24_);
					_data_->_tmp26_ = _data_->_tmp25_;
					if (_data_->_tmp26_) {
						_data_->_tmp27_ = g_strdup ("suspend");
						_g_free0 (_data_->kind);
						_data_->kind = _data_->_tmp27_;
					}
				}
			}
		}
		_data_->_tmp28_ = _data_->self->priv->account_id;
		_data_->_tmp29_ = string_to_string (_data_->_tmp28_);
		_data_->_tmp30_ = g_strconcat ("/api/v1/admin/accounts/", _data_->_tmp29_, "/action", NULL);
		_data_->_tmp31_ = _data_->_tmp30_;
		_data_->_tmp32_ = tuba_accounts;
		_data_->_tmp33_ = tuba_account_store_get_active (_data_->_tmp32_);
		_data_->_tmp34_ = _data_->_tmp33_;
		_data_->_tmp35_ = _g_object_ref0 (_data_->_tmp34_);
		_data_->_tmp36_ = NULL;
		_data_->_tmp36_ = tuba_request_v2_new (_data_->_tmp31_, TUBA_REQUEST_V2_METHOD_POST);
		tuba_request_v2_set_account (_data_->_tmp36_, _data_->_tmp35_);
		_g_object_unref0 (_data_->_tmp35_);
		_data_->_tmp37_ = _data_->_tmp36_;
		_g_free0 (_data_->_tmp31_);
		_data_->req = _data_->_tmp37_;
		_data_->_tmp38_ = _data_->req;
		_data_->_tmp39_ = _data_->kind;
		tuba_request_v2_add_form_data (_data_->_tmp38_, "type", _data_->_tmp39_);
		_data_->_tmp40_ = _data_->req;
		_data_->_tmp41_ = _data_->self->priv->comment_row;
		_data_->_tmp42_ = gtk_editable_get_text ((GtkEditable*) _data_->_tmp41_);
		_data_->_tmp43_ = _data_->_tmp42_;
		tuba_request_v2_add_form_data (_data_->_tmp40_, "text", _data_->_tmp43_);
		_data_->_tmp44_ = _data_->req;
		_data_->_tmp45_ = _data_->self->priv->send_email;
		_data_->_tmp46_ = gtk_check_button_get_active (_data_->_tmp45_);
		_data_->_tmp47_ = _data_->_tmp46_;
		_data_->_tmp48_ = bool_to_string (_data_->_tmp47_);
		_data_->_tmp49_ = _data_->_tmp48_;
		tuba_request_v2_add_form_data (_data_->_tmp44_, "send_email_notification", _data_->_tmp49_);
		_g_free0 (_data_->_tmp49_);
		_data_->_tmp50_ = _data_->self->priv->report_id;
		if (_data_->_tmp50_ != NULL) {
			_data_->_tmp51_ = _data_->req;
			_data_->_tmp52_ = _data_->self->priv->report_id;
			tuba_request_v2_add_form_data (_data_->_tmp51_, "report_id", _data_->_tmp52_);
		}
		{
			_data_->_tmp53_ = _data_->req;
			_data_->_state_ = 2;
			tuba_request_v2_exec (_data_->_tmp53_, tuba_dialogs_admin_take_action_on_take_action_real_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp54_ = tuba_request_v2_exec_finish (_data_->_tmp53_, _data_->_res_, NULL, &_data_->_inner_error0_);
			_data_->_tmp55_ = _data_->_tmp54_;
			_g_object_unref0 (_data_->_tmp55_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			tuba_dialogs_admin_take_action_on_cancel (_data_->self);
			g_signal_emit (_data_->self, tuba_dialogs_admin_take_action_signals[TUBA_DIALOGS_ADMIN_TAKE_ACTION_TOOK_ACTION_SIGNAL], 0);
		}
		goto __finally0;
		__catch0_g_error:
		{
			_data_->e = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			gtk_widget_set_sensitive ((GtkWidget*) _data_->self, TRUE);
			_data_->_tmp56_ = _data_->kind;
			_data_->_tmp57_ = string_to_string (_data_->_tmp56_);
			_data_->_tmp58_ = _data_->e;
			_data_->_tmp59_ = g_strdup_printf ("%i", _data_->_tmp58_->code);
			_data_->_tmp60_ = _data_->_tmp59_;
			_data_->_tmp61_ = _data_->e;
			_data_->_tmp62_ = _data_->_tmp61_->message;
			_data_->_tmp63_ = string_to_string (_data_->_tmp62_);
			_data_->_tmp64_ = g_strconcat ("Couldn't perform action ", _data_->_tmp57_, ": ", _data_->_tmp60_, " ", _data_->_tmp63_, NULL);
			_data_->_tmp65_ = _data_->_tmp64_;
			g_warning ("TakeAction.vala:183: %s", _data_->_tmp65_);
			_g_free0 (_data_->_tmp65_);
			_g_free0 (_data_->_tmp60_);
			_data_->_tmp66_ = _data_->e;
			_data_->_tmp67_ = _data_->_tmp66_->message;
			_data_->_tmp68_ = string_to_string (_data_->_tmp67_);
			_data_->_tmp69_ = _data_->e;
			_data_->_tmp70_ = g_strdup_printf ("%i", _data_->_tmp69_->code);
			_data_->_tmp71_ = _data_->_tmp70_;
			_data_->_tmp72_ = g_strconcat (_data_->_tmp68_, " ", _data_->_tmp71_, NULL);
			_data_->_tmp73_ = _data_->_tmp72_;
			tuba_dialogs_admin_base_add_toast ((TubaDialogsAdminBase*) _data_->self, _data_->_tmp73_);
			_g_free0 (_data_->_tmp73_);
			_g_free0 (_data_->_tmp71_);
			_g_error_free0 (_data_->e);
		}
		__finally0:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->req);
			_g_free0 (_data_->kind);
			_g_object_unref0 (_data_->dlg);
			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_->kind);
	}
	_g_object_unref0 (_data_->dlg);
	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_admin_take_action_on_cancel_gtk_button_clicked (GtkButton* _sender,
                                                              gpointer self)
{
	tuba_dialogs_admin_take_action_on_cancel ((TubaDialogsAdminTakeAction*) self);
}

static void
_tuba_dialogs_admin_take_action_on_take_action_gtk_button_clicked (GtkButton* _sender,
                                                                   gpointer self)
{
	tuba_dialogs_admin_take_action_on_take_action ((TubaDialogsAdminTakeAction*) self);
}

static GObject *
tuba_dialogs_admin_take_action_constructor (GType type,
                                            guint n_construct_properties,
                                            GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaDialogsAdminTakeAction * self;
	GtkButton* cancel_button = NULL;
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	GtkButton* _tmp4_ = NULL;
	GtkButton* _tmp5_;
	AdwHeaderBar* _tmp6_;
	AdwHeaderBar* _tmp7_;
	AdwHeaderBar* _tmp8_;
	AdwHeaderBar* _tmp9_;
	AdwHeaderBar* _tmp10_;
	AdwHeaderBar* _tmp11_;
	GtkButton* _tmp12_;
	AdwHeaderBar* _tmp13_;
	AdwHeaderBar* _tmp14_;
	GtkButton* _tmp15_;
	AdwPreferencesGroup* action_group = NULL;
	AdwPreferencesGroup* _tmp16_;
	gchar* _tmp17_;
	gchar** _tmp18_;
	GtkCheckButton* _tmp19_ = NULL;
	GtkCheckButton* _tmp20_;
	GtkCheckButton* _tmp21_;
	gchar* _tmp22_;
	gchar** _tmp23_;
	GtkCheckButton* _tmp24_ = NULL;
	GtkCheckButton* _tmp25_;
	GtkCheckButton* _tmp26_;
	gchar* _tmp27_;
	gchar** _tmp28_;
	GtkCheckButton* _tmp29_ = NULL;
	GtkCheckButton* _tmp30_;
	GtkCheckButton* _tmp31_;
	gchar* _tmp32_;
	gchar** _tmp33_;
	GtkCheckButton* _tmp34_ = NULL;
	GtkCheckButton* _tmp35_;
	GtkCheckButton* _tmp36_;
	gchar* _tmp37_;
	gchar** _tmp38_;
	GtkCheckButton* _tmp39_ = NULL;
	AdwActionRow* action_row = NULL;
	gchar* _tmp40_;
	gchar* _tmp41_;
	GtkCheckButton* _tmp42_;
	GtkWidget* _tmp43_;
	AdwActionRow* _tmp44_ = NULL;
	AdwActionRow* _tmp45_;
	GtkCheckButton* _tmp46_;
	AdwPreferencesGroup* _tmp47_;
	AdwActionRow* _tmp48_;
	gchar* _tmp49_;
	gchar* _tmp50_;
	GtkCheckButton* _tmp51_;
	GtkWidget* _tmp52_;
	AdwActionRow* _tmp53_ = NULL;
	AdwActionRow* _tmp54_;
	GtkCheckButton* _tmp55_;
	AdwPreferencesGroup* _tmp56_;
	AdwActionRow* _tmp57_;
	gchar* _tmp58_;
	gchar* _tmp59_;
	GtkCheckButton* _tmp60_;
	GtkWidget* _tmp61_;
	AdwActionRow* _tmp62_ = NULL;
	AdwActionRow* _tmp63_;
	GtkCheckButton* _tmp64_;
	AdwPreferencesGroup* _tmp65_;
	AdwActionRow* _tmp66_;
	gchar* _tmp67_;
	gchar* _tmp68_;
	GtkCheckButton* _tmp69_;
	GtkWidget* _tmp70_;
	AdwActionRow* _tmp71_ = NULL;
	AdwActionRow* _tmp72_;
	GtkCheckButton* _tmp73_;
	AdwPreferencesGroup* _tmp74_;
	AdwActionRow* _tmp75_;
	gchar* _tmp76_;
	gchar* _tmp77_;
	GtkCheckButton* _tmp78_;
	GtkWidget* _tmp79_;
	AdwActionRow* _tmp80_ = NULL;
	AdwActionRow* _tmp81_;
	GtkCheckButton* _tmp82_;
	AdwPreferencesGroup* _tmp83_;
	AdwActionRow* _tmp84_;
	gchar* _tmp85_;
	AdwEntryRow* _tmp86_ = NULL;
	AdwPreferencesGroup* _tmp87_;
	AdwEntryRow* _tmp88_;
	gchar* _tmp89_;
	gchar** _tmp90_;
	GtkCheckButton* _tmp91_ = NULL;
	gchar* _tmp92_;
	gchar* _tmp93_;
	GtkCheckButton* _tmp94_;
	GtkWidget* _tmp95_;
	AdwActionRow* _tmp96_ = NULL;
	AdwActionRow* _tmp97_;
	GtkCheckButton* _tmp98_;
	AdwPreferencesGroup* _tmp99_;
	AdwActionRow* _tmp100_;
	AdwPreferencesPage* _tmp101_;
	AdwPreferencesPage* _tmp102_;
	AdwPreferencesGroup* _tmp103_;
	parent_class = G_OBJECT_CLASS (tuba_dialogs_admin_take_action_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_ADMIN_TYPE_TAKE_ACTION, TubaDialogsAdminTakeAction);
	adw_dialog_set_title ((AdwDialog*) self, _ ("Take Action"));
	adw_dialog_set_content_width ((AdwDialog*) self, 460);
	adw_dialog_set_content_height ((AdwDialog*) self, 500);
	_tmp0_ = (GtkButton*) gtk_button_new_with_label (_ ("Cancel"));
	g_object_ref_sink (_tmp0_);
	cancel_button = _tmp0_;
	_tmp1_ = cancel_button;
	g_signal_connect_object (_tmp1_, "clicked", (GCallback) _tuba_dialogs_admin_take_action_on_cancel_gtk_button_clicked, self, 0);
	_tmp2_ = g_strdup ("destructive-action");
	_tmp3_ = g_new0 (gchar*, 1 + 1);
	_tmp3_[0] = _tmp2_;
	_tmp4_ = (GtkButton*) gtk_button_new_with_label (_ ("Submit"));
	gtk_widget_set_css_classes ((GtkWidget*) _tmp4_, _tmp3_);
	_tmp3_ = (_vala_array_free (_tmp3_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->take_action_button);
	self->priv->take_action_button = _tmp4_;
	_tmp5_ = self->priv->take_action_button;
	g_signal_connect_object (_tmp5_, "clicked", (GCallback) _tuba_dialogs_admin_take_action_on_take_action_gtk_button_clicked, self, 0);
	_tmp6_ = tuba_dialogs_admin_base_get_headerbar ((TubaDialogsAdminBase*) self);
	_tmp7_ = _tmp6_;
	adw_header_bar_set_show_end_title_buttons (_tmp7_, FALSE);
	_tmp8_ = tuba_dialogs_admin_base_get_headerbar ((TubaDialogsAdminBase*) self);
	_tmp9_ = _tmp8_;
	adw_header_bar_set_show_start_title_buttons (_tmp9_, FALSE);
	_tmp10_ = tuba_dialogs_admin_base_get_headerbar ((TubaDialogsAdminBase*) self);
	_tmp11_ = _tmp10_;
	_tmp12_ = cancel_button;
	adw_header_bar_pack_start (_tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = tuba_dialogs_admin_base_get_headerbar ((TubaDialogsAdminBase*) self);
	_tmp14_ = _tmp13_;
	_tmp15_ = self->priv->take_action_button;
	adw_header_bar_pack_end (_tmp14_, (GtkWidget*) _tmp15_);
	_tmp16_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	g_object_ref_sink (_tmp16_);
	action_group = _tmp16_;
	_tmp17_ = g_strdup ("selection-mode");
	_tmp18_ = g_new0 (gchar*, 1 + 1);
	_tmp18_[0] = _tmp17_;
	_tmp19_ = (GtkCheckButton*) gtk_check_button_new ();
	gtk_check_button_set_active (_tmp19_, TRUE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp19_, _tmp18_);
	_tmp18_ = (_vala_array_free (_tmp18_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp19_);
	_g_object_unref0 (self->priv->action_warning);
	self->priv->action_warning = _tmp19_;
	_tmp20_ = self->priv->action_warning;
	_tmp21_ = _g_object_ref0 (_tmp20_);
	_tmp22_ = g_strdup ("selection-mode");
	_tmp23_ = g_new0 (gchar*, 1 + 1);
	_tmp23_[0] = _tmp22_;
	_tmp24_ = (GtkCheckButton*) gtk_check_button_new ();
	gtk_check_button_set_group (_tmp24_, _tmp21_);
	_g_object_unref0 (_tmp21_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp24_, _tmp23_);
	_tmp23_ = (_vala_array_free (_tmp23_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp24_);
	_g_object_unref0 (self->priv->action_freeze);
	self->priv->action_freeze = _tmp24_;
	_tmp25_ = self->priv->action_warning;
	_tmp26_ = _g_object_ref0 (_tmp25_);
	_tmp27_ = g_strdup ("selection-mode");
	_tmp28_ = g_new0 (gchar*, 1 + 1);
	_tmp28_[0] = _tmp27_;
	_tmp29_ = (GtkCheckButton*) gtk_check_button_new ();
	gtk_check_button_set_group (_tmp29_, _tmp26_);
	_g_object_unref0 (_tmp26_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp29_, _tmp28_);
	_tmp28_ = (_vala_array_free (_tmp28_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp29_);
	_g_object_unref0 (self->priv->action_sensitive);
	self->priv->action_sensitive = _tmp29_;
	_tmp30_ = self->priv->action_warning;
	_tmp31_ = _g_object_ref0 (_tmp30_);
	_tmp32_ = g_strdup ("selection-mode");
	_tmp33_ = g_new0 (gchar*, 1 + 1);
	_tmp33_[0] = _tmp32_;
	_tmp34_ = (GtkCheckButton*) gtk_check_button_new ();
	gtk_check_button_set_group (_tmp34_, _tmp31_);
	_g_object_unref0 (_tmp31_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp34_, _tmp33_);
	_tmp33_ = (_vala_array_free (_tmp33_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp34_);
	_g_object_unref0 (self->priv->action_limit);
	self->priv->action_limit = _tmp34_;
	_tmp35_ = self->priv->action_warning;
	_tmp36_ = _g_object_ref0 (_tmp35_);
	_tmp37_ = g_strdup ("selection-mode");
	_tmp38_ = g_new0 (gchar*, 1 + 1);
	_tmp38_[0] = _tmp37_;
	_tmp39_ = (GtkCheckButton*) gtk_check_button_new ();
	gtk_check_button_set_group (_tmp39_, _tmp36_);
	_g_object_unref0 (_tmp36_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp39_, _tmp38_);
	_tmp38_ = (_vala_array_free (_tmp38_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp39_);
	_g_object_unref0 (self->priv->action_suspend);
	self->priv->action_suspend = _tmp39_;
	_tmp40_ = g_strdup (_ ("Warning"));
	_tmp41_ = g_strdup (_ ("Use this to send a warning to the user, without triggering any other a" \
"ction"));
	_tmp42_ = self->priv->action_warning;
	_tmp43_ = _g_object_ref0 ((GtkWidget*) _tmp42_);
	_tmp44_ = (AdwActionRow*) adw_action_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp44_, _tmp40_);
	_g_free0 (_tmp40_);
	adw_action_row_set_subtitle (_tmp44_, _tmp41_);
	_g_free0 (_tmp41_);
	adw_action_row_set_activatable_widget (_tmp44_, _tmp43_);
	_g_object_unref0 (_tmp43_);
	g_object_ref_sink (_tmp44_);
	action_row = _tmp44_;
	_tmp45_ = action_row;
	_tmp46_ = self->priv->action_warning;
	adw_action_row_add_prefix (_tmp45_, (GtkWidget*) _tmp46_);
	_tmp47_ = action_group;
	_tmp48_ = action_row;
	adw_preferences_group_add (_tmp47_, (GtkWidget*) _tmp48_);
	_tmp49_ = g_strdup (_ ("Freeze"));
	_tmp50_ = g_strdup (_ ("Prevent the user from using their account, but do not delete or hide t" \
"heir contents"));
	_tmp51_ = self->priv->action_freeze;
	_tmp52_ = _g_object_ref0 ((GtkWidget*) _tmp51_);
	_tmp53_ = (AdwActionRow*) adw_action_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp53_, _tmp49_);
	_g_free0 (_tmp49_);
	adw_action_row_set_subtitle (_tmp53_, _tmp50_);
	_g_free0 (_tmp50_);
	adw_action_row_set_activatable_widget (_tmp53_, _tmp52_);
	_g_object_unref0 (_tmp52_);
	g_object_ref_sink (_tmp53_);
	_g_object_unref0 (action_row);
	action_row = _tmp53_;
	_tmp54_ = action_row;
	_tmp55_ = self->priv->action_freeze;
	adw_action_row_add_prefix (_tmp54_, (GtkWidget*) _tmp55_);
	_tmp56_ = action_group;
	_tmp57_ = action_row;
	adw_preferences_group_add (_tmp56_, (GtkWidget*) _tmp57_);
	_tmp58_ = g_strdup (_ ("Sensitive"));
	_tmp59_ = g_strdup (_ ("Force all this user's media attachments to be flagged as sensitive"));
	_tmp60_ = self->priv->action_sensitive;
	_tmp61_ = _g_object_ref0 ((GtkWidget*) _tmp60_);
	_tmp62_ = (AdwActionRow*) adw_action_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp62_, _tmp58_);
	_g_free0 (_tmp58_);
	adw_action_row_set_subtitle (_tmp62_, _tmp59_);
	_g_free0 (_tmp59_);
	adw_action_row_set_activatable_widget (_tmp62_, _tmp61_);
	_g_object_unref0 (_tmp61_);
	g_object_ref_sink (_tmp62_);
	_g_object_unref0 (action_row);
	action_row = _tmp62_;
	_tmp63_ = action_row;
	_tmp64_ = self->priv->action_sensitive;
	adw_action_row_add_prefix (_tmp63_, (GtkWidget*) _tmp64_);
	_tmp65_ = action_group;
	_tmp66_ = action_row;
	adw_preferences_group_add (_tmp65_, (GtkWidget*) _tmp66_);
	_tmp67_ = g_strdup (_ ("Limit"));
	_tmp68_ = g_strdup (_ ("Prevent the user from being able to post with public visibility, hide " \
"their posts and notifications from people not following them. Closes a" \
"ll reports against this account"));
	_tmp69_ = self->priv->action_limit;
	_tmp70_ = _g_object_ref0 ((GtkWidget*) _tmp69_);
	_tmp71_ = (AdwActionRow*) adw_action_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp71_, _tmp67_);
	_g_free0 (_tmp67_);
	adw_action_row_set_subtitle (_tmp71_, _tmp68_);
	_g_free0 (_tmp68_);
	adw_action_row_set_activatable_widget (_tmp71_, _tmp70_);
	_g_object_unref0 (_tmp70_);
	g_object_ref_sink (_tmp71_);
	_g_object_unref0 (action_row);
	action_row = _tmp71_;
	_tmp72_ = action_row;
	_tmp73_ = self->priv->action_limit;
	adw_action_row_add_prefix (_tmp72_, (GtkWidget*) _tmp73_);
	_tmp74_ = action_group;
	_tmp75_ = action_row;
	adw_preferences_group_add (_tmp74_, (GtkWidget*) _tmp75_);
	_tmp76_ = g_strdup (_ ("Suspend"));
	_tmp77_ = g_strdup (_ ("Prevent any interaction from or to this account and delete its content" \
"s. Revertible within 30 days. Closes all reports against this account"));
	_tmp78_ = self->priv->action_suspend;
	_tmp79_ = _g_object_ref0 ((GtkWidget*) _tmp78_);
	_tmp80_ = (AdwActionRow*) adw_action_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp80_, _tmp76_);
	_g_free0 (_tmp76_);
	adw_action_row_set_subtitle (_tmp80_, _tmp77_);
	_g_free0 (_tmp77_);
	adw_action_row_set_activatable_widget (_tmp80_, _tmp79_);
	_g_object_unref0 (_tmp79_);
	g_object_ref_sink (_tmp80_);
	_g_object_unref0 (action_row);
	action_row = _tmp80_;
	_tmp81_ = action_row;
	_tmp82_ = self->priv->action_suspend;
	adw_action_row_add_prefix (_tmp81_, (GtkWidget*) _tmp82_);
	_tmp83_ = action_group;
	_tmp84_ = action_row;
	adw_preferences_group_add (_tmp83_, (GtkWidget*) _tmp84_);
	_tmp85_ = g_strdup (_ ("Comment"));
	_tmp86_ = (AdwEntryRow*) adw_entry_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp86_, _tmp85_);
	_g_free0 (_tmp85_);
	g_object_ref_sink (_tmp86_);
	_g_object_unref0 (self->priv->comment_row);
	self->priv->comment_row = _tmp86_;
	_tmp87_ = action_group;
	_tmp88_ = self->priv->comment_row;
	adw_preferences_group_add (_tmp87_, (GtkWidget*) _tmp88_);
	_tmp89_ = g_strdup ("selection-mode");
	_tmp90_ = g_new0 (gchar*, 1 + 1);
	_tmp90_[0] = _tmp89_;
	_tmp91_ = (GtkCheckButton*) gtk_check_button_new ();
	gtk_check_button_set_active (_tmp91_, TRUE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp91_, _tmp90_);
	_tmp90_ = (_vala_array_free (_tmp90_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp91_);
	_g_object_unref0 (self->priv->send_email);
	self->priv->send_email = _tmp91_;
	_tmp92_ = g_strdup (_ ("Notify the user per e-mail"));
	_tmp93_ = g_strdup (_ ("The user will receive an explanation of what happened with their accou" \
"nt"));
	_tmp94_ = self->priv->send_email;
	_tmp95_ = _g_object_ref0 ((GtkWidget*) _tmp94_);
	_tmp96_ = (AdwActionRow*) adw_action_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp96_, _tmp92_);
	_g_free0 (_tmp92_);
	adw_action_row_set_subtitle (_tmp96_, _tmp93_);
	_g_free0 (_tmp93_);
	adw_action_row_set_activatable_widget (_tmp96_, _tmp95_);
	_g_object_unref0 (_tmp95_);
	g_object_ref_sink (_tmp96_);
	_g_object_unref0 (action_row);
	action_row = _tmp96_;
	_tmp97_ = action_row;
	_tmp98_ = self->priv->send_email;
	adw_action_row_add_prefix (_tmp97_, (GtkWidget*) _tmp98_);
	_tmp99_ = action_group;
	_tmp100_ = action_row;
	adw_preferences_group_add (_tmp99_, (GtkWidget*) _tmp100_);
	_tmp101_ = tuba_dialogs_admin_base_get_page ((TubaDialogsAdminBase*) self);
	_tmp102_ = _tmp101_;
	_tmp103_ = action_group;
	adw_preferences_page_add (_tmp102_, _tmp103_);
	_g_object_unref0 (action_row);
	_g_object_unref0 (action_group);
	_g_object_unref0 (cancel_button);
	return obj;
}

static void
tuba_dialogs_admin_take_action_class_init (TubaDialogsAdminTakeActionClass * klass,
                                           gpointer klass_data)
{
	tuba_dialogs_admin_take_action_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsAdminTakeAction_private_offset);
	G_OBJECT_CLASS (klass)->constructor = tuba_dialogs_admin_take_action_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_admin_take_action_finalize;
	tuba_dialogs_admin_take_action_signals[TUBA_DIALOGS_ADMIN_TAKE_ACTION_TOOK_ACTION_SIGNAL] = g_signal_new ("took-action", TUBA_DIALOGS_ADMIN_TYPE_TAKE_ACTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
tuba_dialogs_admin_take_action_instance_init (TubaDialogsAdminTakeAction * self,
                                              gpointer klass)
{
	self->priv = tuba_dialogs_admin_take_action_get_instance_private (self);
	self->priv->report_id = NULL;
}

static void
tuba_dialogs_admin_take_action_finalize (GObject * obj)
{
	TubaDialogsAdminTakeAction * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_ADMIN_TYPE_TAKE_ACTION, TubaDialogsAdminTakeAction);
	g_debug ("TakeAction.vala:5: Destroying TakeAction");
	_g_object_unref0 (self->priv->take_action_button);
	_g_object_unref0 (self->priv->action_warning);
	_g_object_unref0 (self->priv->action_freeze);
	_g_object_unref0 (self->priv->action_sensitive);
	_g_object_unref0 (self->priv->action_limit);
	_g_object_unref0 (self->priv->action_suspend);
	_g_object_unref0 (self->priv->send_email);
	_g_object_unref0 (self->priv->comment_row);
	_g_free0 (self->priv->account_id);
	_g_free0 (self->priv->account_handle);
	_g_free0 (self->priv->report_id);
	G_OBJECT_CLASS (tuba_dialogs_admin_take_action_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_admin_take_action_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsAdminTakeActionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_admin_take_action_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsAdminTakeAction), 0, (GInstanceInitFunc) tuba_dialogs_admin_take_action_instance_init, NULL };
	GType tuba_dialogs_admin_take_action_type_id;
	tuba_dialogs_admin_take_action_type_id = g_type_register_static (TUBA_DIALOGS_ADMIN_TYPE_BASE, "TubaDialogsAdminTakeAction", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsAdminTakeAction_private_offset = g_type_add_instance_private (tuba_dialogs_admin_take_action_type_id, sizeof (TubaDialogsAdminTakeActionPrivate));
	return tuba_dialogs_admin_take_action_type_id;
}

GType
tuba_dialogs_admin_take_action_get_type (void)
{
	static GType tuba_dialogs_admin_take_action_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_admin_take_action_type_id__once)) {
		GType tuba_dialogs_admin_take_action_type_id;
		tuba_dialogs_admin_take_action_type_id = tuba_dialogs_admin_take_action_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_admin_take_action_type_id__once, tuba_dialogs_admin_take_action_type_id);
	}
	return tuba_dialogs_admin_take_action_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);
}

