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

#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.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_VIEWS_ADMIN_PAGE_TYPE_BASE (tuba_views_admin_page_base_get_type ())
#define TUBA_VIEWS_ADMIN_PAGE_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_ADMIN_PAGE_TYPE_BASE, TubaViewsAdminPageBase))
#define TUBA_VIEWS_ADMIN_PAGE_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_ADMIN_PAGE_TYPE_BASE, TubaViewsAdminPageBaseClass))
#define TUBA_VIEWS_ADMIN_PAGE_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_ADMIN_PAGE_TYPE_BASE))
#define TUBA_VIEWS_ADMIN_PAGE_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_ADMIN_PAGE_TYPE_BASE))
#define TUBA_VIEWS_ADMIN_PAGE_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_ADMIN_PAGE_TYPE_BASE, TubaViewsAdminPageBaseClass))

typedef struct _TubaViewsAdminPageBase TubaViewsAdminPageBase;
typedef struct _TubaViewsAdminPageBaseClass TubaViewsAdminPageBaseClass;
typedef struct _TubaViewsAdminPageBasePrivate TubaViewsAdminPageBasePrivate;

#define TUBA_VIEWS_ADMIN_PAGE_TYPE_REPORTS (tuba_views_admin_page_reports_get_type ())
#define TUBA_VIEWS_ADMIN_PAGE_REPORTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_ADMIN_PAGE_TYPE_REPORTS, TubaViewsAdminPageReports))
#define TUBA_VIEWS_ADMIN_PAGE_REPORTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_ADMIN_PAGE_TYPE_REPORTS, TubaViewsAdminPageReportsClass))
#define TUBA_VIEWS_ADMIN_PAGE_IS_REPORTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_ADMIN_PAGE_TYPE_REPORTS))
#define TUBA_VIEWS_ADMIN_PAGE_IS_REPORTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_ADMIN_PAGE_TYPE_REPORTS))
#define TUBA_VIEWS_ADMIN_PAGE_REPORTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_ADMIN_PAGE_TYPE_REPORTS, TubaViewsAdminPageReportsClass))

typedef struct _TubaViewsAdminPageReports TubaViewsAdminPageReports;
typedef struct _TubaViewsAdminPageReportsClass TubaViewsAdminPageReportsClass;
typedef struct _TubaViewsAdminPageReportsPrivate TubaViewsAdminPageReportsPrivate;

#define TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE (tuba_views_admin_timeline_pagination_timeline_get_type ())
#define TUBA_VIEWS_ADMIN_TIMELINE_PAGINATION_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE, TubaViewsAdminTimelinePaginationTimeline))
#define TUBA_VIEWS_ADMIN_TIMELINE_PAGINATION_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE, TubaViewsAdminTimelinePaginationTimelineClass))
#define TUBA_VIEWS_ADMIN_TIMELINE_IS_PAGINATION_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE))
#define TUBA_VIEWS_ADMIN_TIMELINE_IS_PAGINATION_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE))
#define TUBA_VIEWS_ADMIN_TIMELINE_PAGINATION_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE, TubaViewsAdminTimelinePaginationTimelineClass))

typedef struct _TubaViewsAdminTimelinePaginationTimeline TubaViewsAdminTimelinePaginationTimeline;
typedef struct _TubaViewsAdminTimelinePaginationTimelineClass TubaViewsAdminTimelinePaginationTimelineClass;

#define TUBA_VIEWS_ADMIN_TIMELINE_TYPE_REPORTS (tuba_views_admin_timeline_reports_get_type ())
#define TUBA_VIEWS_ADMIN_TIMELINE_REPORTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_REPORTS, TubaViewsAdminTimelineReports))
#define TUBA_VIEWS_ADMIN_TIMELINE_REPORTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_REPORTS, TubaViewsAdminTimelineReportsClass))
#define TUBA_VIEWS_ADMIN_TIMELINE_IS_REPORTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_REPORTS))
#define TUBA_VIEWS_ADMIN_TIMELINE_IS_REPORTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_REPORTS))
#define TUBA_VIEWS_ADMIN_TIMELINE_REPORTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_REPORTS, TubaViewsAdminTimelineReportsClass))

typedef struct _TubaViewsAdminTimelineReports TubaViewsAdminTimelineReports;
typedef struct _TubaViewsAdminTimelineReportsClass TubaViewsAdminTimelineReportsClass;
enum  {
	TUBA_VIEWS_ADMIN_PAGE_REPORTS_0_PROPERTY,
	TUBA_VIEWS_ADMIN_PAGE_REPORTS_NUM_PROPERTIES
};
static GParamSpec* tuba_views_admin_page_reports_properties[TUBA_VIEWS_ADMIN_PAGE_REPORTS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#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_ADMIN_TYPE_REPORT (tuba_api_admin_report_get_type ())
#define TUBA_API_ADMIN_REPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_ADMIN_TYPE_REPORT, TubaAPIAdminReport))
#define TUBA_API_ADMIN_REPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_ADMIN_TYPE_REPORT, TubaAPIAdminReportClass))
#define TUBA_API_ADMIN_IS_REPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_ADMIN_TYPE_REPORT))
#define TUBA_API_ADMIN_IS_REPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_ADMIN_TYPE_REPORT))
#define TUBA_API_ADMIN_REPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_ADMIN_TYPE_REPORT, TubaAPIAdminReportClass))

typedef struct _TubaAPIAdminReport TubaAPIAdminReport;
typedef struct _TubaAPIAdminReportClass TubaAPIAdminReportClass;

#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;

#define TUBA_DIALOGS_ADMIN_TYPE_REPORT (tuba_dialogs_admin_report_get_type ())
#define TUBA_DIALOGS_ADMIN_REPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_ADMIN_TYPE_REPORT, TubaDialogsAdminReport))
#define TUBA_DIALOGS_ADMIN_REPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_ADMIN_TYPE_REPORT, TubaDialogsAdminReportClass))
#define TUBA_DIALOGS_ADMIN_IS_REPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_ADMIN_TYPE_REPORT))
#define TUBA_DIALOGS_ADMIN_IS_REPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_ADMIN_TYPE_REPORT))
#define TUBA_DIALOGS_ADMIN_REPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_ADMIN_TYPE_REPORT, TubaDialogsAdminReportClass))

typedef struct _TubaDialogsAdminReport TubaDialogsAdminReport;
typedef struct _TubaDialogsAdminReportClass TubaDialogsAdminReportClass;

#define TUBA_DIALOGS_ADMIN_TYPE_WINDOW (tuba_dialogs_admin_window_get_type ())
#define TUBA_DIALOGS_ADMIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_ADMIN_TYPE_WINDOW, TubaDialogsAdminWindow))
#define TUBA_DIALOGS_ADMIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_ADMIN_TYPE_WINDOW, TubaDialogsAdminWindowClass))
#define TUBA_DIALOGS_ADMIN_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_ADMIN_TYPE_WINDOW))
#define TUBA_DIALOGS_ADMIN_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_ADMIN_TYPE_WINDOW))
#define TUBA_DIALOGS_ADMIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_ADMIN_TYPE_WINDOW, TubaDialogsAdminWindowClass))

typedef struct _TubaDialogsAdminWindow TubaDialogsAdminWindow;
typedef struct _TubaDialogsAdminWindowClass TubaDialogsAdminWindowClass;
#define _g_free0(var) (var = (g_free (var), NULL))

struct _TubaViewsAdminPageBase {
	AdwNavigationPage parent_instance;
	TubaViewsAdminPageBasePrivate * priv;
	AdwHeaderBar* headerbar;
	AdwToolbarView* toolbar_view;
};

struct _TubaViewsAdminPageBaseClass {
	AdwNavigationPageClass parent_class;
	void (*add_to_page) (TubaViewsAdminPageBase* self, AdwPreferencesGroup* group);
};

struct _TubaViewsAdminPageReports {
	TubaViewsAdminPageBase parent_instance;
	TubaViewsAdminPageReportsPrivate * priv;
};

struct _TubaViewsAdminPageReportsClass {
	TubaViewsAdminPageBaseClass parent_class;
};

struct _TubaViewsAdminPageReportsPrivate {
	TubaViewsAdminTimelineReports* pagination_timeline;
	GtkToggleButton* resolved_button;
};

static gint TubaViewsAdminPageReports_private_offset;
static gpointer tuba_views_admin_page_reports_parent_class = NULL;

VALA_EXTERN GType tuba_views_admin_page_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsAdminPageBase, g_object_unref)
VALA_EXTERN GType tuba_views_admin_page_reports_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsAdminPageReports, g_object_unref)
VALA_EXTERN GType tuba_views_admin_timeline_pagination_timeline_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsAdminTimelinePaginationTimeline, g_object_unref)
VALA_EXTERN GType tuba_views_admin_timeline_reports_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsAdminTimelineReports, g_object_unref)
static void tuba_views_admin_page_reports_on_resolved_toggled (TubaViewsAdminPageReports* self);
VALA_EXTERN void tuba_views_admin_timeline_pagination_timeline_reset (TubaViewsAdminTimelinePaginationTimeline* self,
                                                          const gchar* new_url);
static void tuba_views_admin_page_reports_refresh (TubaViewsAdminPageReports* self);
VALA_EXTERN void tuba_views_admin_timeline_pagination_timeline_request (TubaViewsAdminTimelinePaginationTimeline* self,
                                                            GAsyncReadyCallback _callback_,
                                                            gpointer _user_data_);
VALA_EXTERN void tuba_views_admin_timeline_pagination_timeline_request_finish (TubaViewsAdminTimelinePaginationTimeline* self,
                                                                   GAsyncResult* _res_);
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_admin_report_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAdminReport, g_object_unref)
static void tuba_views_admin_page_reports_open_report_dialog (TubaViewsAdminPageReports* self,
                                                       TubaAPIAdminReport* report);
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_report_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsAdminReport, g_object_unref)
VALA_EXTERN TubaDialogsAdminReport* tuba_dialogs_admin_report_new (TubaAPIAdminReport* report);
VALA_EXTERN TubaDialogsAdminReport* tuba_dialogs_admin_report_construct (GType object_type,
                                                             TubaAPIAdminReport* report);
static void _tuba_views_admin_page_reports_refresh_tuba_dialogs_admin_report_refresh (TubaDialogsAdminReport* _sender,
                                                                               gpointer self);
VALA_EXTERN GType tuba_dialogs_admin_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsAdminWindow, g_object_unref)
VALA_EXTERN TubaDialogsAdminWindow* tuba_views_admin_page_base_get_admin_window (TubaViewsAdminPageBase* self);
VALA_EXTERN TubaViewsAdminPageReports* tuba_views_admin_page_reports_new (void);
VALA_EXTERN TubaViewsAdminPageReports* tuba_views_admin_page_reports_construct (GType object_type);
VALA_EXTERN TubaViewsAdminPageBase* tuba_views_admin_page_base_new (void);
VALA_EXTERN TubaViewsAdminPageBase* tuba_views_admin_page_base_construct (GType object_type);
static GObject * tuba_views_admin_page_reports_constructor (GType type,
                                                     guint n_construct_properties,
                                                     GObjectConstructParam * construct_properties);
static void _tuba_views_admin_page_reports_on_resolved_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                   gpointer self);
VALA_EXTERN TubaViewsAdminTimelineReports* tuba_views_admin_timeline_reports_new (void);
VALA_EXTERN TubaViewsAdminTimelineReports* tuba_views_admin_timeline_reports_construct (GType object_type);
static void _tuba_views_admin_page_reports_open_report_dialog_tuba_views_admin_timeline_reports_on_open_report_dialog (TubaViewsAdminTimelineReports* _sender,
                                                                                                                TubaAPIAdminReport* report,
                                                                                                                gpointer self);
VALA_EXTERN void tuba_views_admin_page_base_on_error (TubaViewsAdminPageBase* self,
                                          gint code,
                                          const gchar* message);
static void _tuba_views_admin_page_base_on_error_tuba_views_admin_timeline_pagination_timeline_on_error (TubaViewsAdminTimelinePaginationTimeline* _sender,
                                                                                                  gint code,
                                                                                                  const gchar* message,
                                                                                                  gpointer self);
VALA_EXTERN void tuba_views_admin_page_base_set_page (TubaViewsAdminPageBase* self,
                                          GtkWidget* value);
static void tuba_views_admin_page_reports_finalize (GObject * obj);
static GType tuba_views_admin_page_reports_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_views_admin_page_reports_get_instance_private (TubaViewsAdminPageReports* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsAdminPageReports_private_offset);
}

static void
tuba_views_admin_page_reports_on_resolved_toggled (TubaViewsAdminPageReports* self)
{
	const gchar* _tmp0_ = NULL;
	GtkToggleButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	TubaViewsAdminTimelineReports* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->resolved_button;
	_tmp2_ = gtk_toggle_button_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		_tmp0_ = "/api/v1/admin/reports?resolved=true";
	} else {
		_tmp0_ = "/api/v1/admin/reports";
	}
	_tmp4_ = self->priv->pagination_timeline;
	tuba_views_admin_timeline_pagination_timeline_reset ((TubaViewsAdminTimelinePaginationTimeline*) _tmp4_, _tmp0_);
}

static void
tuba_views_admin_page_reports_refresh (TubaViewsAdminPageReports* self)
{
	TubaViewsAdminTimelineReports* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->pagination_timeline;
	tuba_views_admin_timeline_pagination_timeline_request ((TubaViewsAdminTimelinePaginationTimeline*) _tmp0_, NULL, NULL);
}

static void
_tuba_views_admin_page_reports_refresh_tuba_dialogs_admin_report_refresh (TubaDialogsAdminReport* _sender,
                                                                          gpointer self)
{
	tuba_views_admin_page_reports_refresh ((TubaViewsAdminPageReports*) self);
}

static void
tuba_views_admin_page_reports_open_report_dialog (TubaViewsAdminPageReports* self,
                                                  TubaAPIAdminReport* report)
{
	TubaDialogsAdminReport* report_dialog = NULL;
	TubaDialogsAdminReport* _tmp0_;
	TubaDialogsAdminWindow* _tmp1_;
	TubaDialogsAdminWindow* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (report != NULL);
	_tmp0_ = tuba_dialogs_admin_report_new (report);
	g_object_ref_sink (_tmp0_);
	report_dialog = _tmp0_;
	g_signal_connect_object (report_dialog, "refresh", (GCallback) _tuba_views_admin_page_reports_refresh_tuba_dialogs_admin_report_refresh, self, 0);
	_tmp1_ = tuba_views_admin_page_base_get_admin_window ((TubaViewsAdminPageBase*) self);
	_tmp2_ = _tmp1_;
	adw_dialog_present ((AdwDialog*) report_dialog, (GtkWidget*) _tmp2_);
	_g_object_unref0 (report_dialog);
}

TubaViewsAdminPageReports*
tuba_views_admin_page_reports_construct (GType object_type)
{
	TubaViewsAdminPageReports * self = NULL;
	self = (TubaViewsAdminPageReports*) tuba_views_admin_page_base_construct (object_type);
	return self;
}

TubaViewsAdminPageReports*
tuba_views_admin_page_reports_new (void)
{
	return tuba_views_admin_page_reports_construct (TUBA_VIEWS_ADMIN_PAGE_TYPE_REPORTS);
}

static void
_tuba_views_admin_page_reports_on_resolved_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                              gpointer self)
{
	tuba_views_admin_page_reports_on_resolved_toggled ((TubaViewsAdminPageReports*) self);
}

static void
_tuba_views_admin_page_reports_open_report_dialog_tuba_views_admin_timeline_reports_on_open_report_dialog (TubaViewsAdminTimelineReports* _sender,
                                                                                                           TubaAPIAdminReport* report,
                                                                                                           gpointer self)
{
	tuba_views_admin_page_reports_open_report_dialog ((TubaViewsAdminPageReports*) self, report);
}

static void
_tuba_views_admin_page_base_on_error_tuba_views_admin_timeline_pagination_timeline_on_error (TubaViewsAdminTimelinePaginationTimeline* _sender,
                                                                                             gint code,
                                                                                             const gchar* message,
                                                                                             gpointer self)
{
	tuba_views_admin_page_base_on_error ((TubaViewsAdminPageBase*) self, code, message);
}

static GObject *
tuba_views_admin_page_reports_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsAdminPageReports * self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar** _tmp2_;
	gchar* _tmp3_;
	GtkToggleButton* _tmp4_ = NULL;
	GtkToggleButton* _tmp5_;
	AdwHeaderBar* _tmp6_;
	GtkToggleButton* _tmp7_;
	TubaViewsAdminTimelineReports* _tmp8_;
	TubaViewsAdminTimelineReports* _tmp9_;
	TubaViewsAdminTimelineReports* _tmp10_;
	TubaViewsAdminTimelineReports* _tmp11_;
	TubaViewsAdminTimelineReports* _tmp12_;
	GtkToggleButton* _tmp13_;
	TubaViewsAdminTimelineReports* _tmp14_;
	parent_class = G_OBJECT_CLASS (tuba_views_admin_page_reports_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_ADMIN_PAGE_TYPE_REPORTS, TubaViewsAdminPageReports);
	adw_navigation_page_set_title ((AdwNavigationPage*) self, _ ("Reports"));
	_tmp0_ = g_strdup (_ ("Show Resolved Reports"));
	_tmp1_ = g_strdup ("flat");
	_tmp2_ = g_new0 (gchar*, 1 + 1);
	_tmp2_[0] = _tmp1_;
	_tmp3_ = g_strdup ("tuba-check-round-outline-symbolic");
	_tmp4_ = (GtkToggleButton*) gtk_toggle_button_new ();
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp4_, _tmp0_);
	_g_free0 (_tmp0_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp4_, _tmp2_);
	_tmp2_ = (_vala_array_free (_tmp2_, 1, (GDestroyNotify) g_free), NULL);
	gtk_button_set_icon_name ((GtkButton*) _tmp4_, _tmp3_);
	_g_free0 (_tmp3_);
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->resolved_button);
	self->priv->resolved_button = _tmp4_;
	_tmp5_ = self->priv->resolved_button;
	g_signal_connect_object (_tmp5_, "toggled", (GCallback) _tuba_views_admin_page_reports_on_resolved_toggled_gtk_toggle_button_toggled, self, 0);
	_tmp6_ = ((TubaViewsAdminPageBase*) self)->headerbar;
	_tmp7_ = self->priv->resolved_button;
	adw_header_bar_pack_end (_tmp6_, (GtkWidget*) _tmp7_);
	_tmp8_ = tuba_views_admin_timeline_reports_new ();
	g_object_ref_sink (_tmp8_);
	_g_object_unref0 (self->priv->pagination_timeline);
	self->priv->pagination_timeline = _tmp8_;
	_tmp9_ = self->priv->pagination_timeline;
	g_signal_connect_object (_tmp9_, "on-open-report-dialog", (GCallback) _tuba_views_admin_page_reports_open_report_dialog_tuba_views_admin_timeline_reports_on_open_report_dialog, self, 0);
	_tmp10_ = self->priv->pagination_timeline;
	g_signal_connect_object ((TubaViewsAdminTimelinePaginationTimeline*) _tmp10_, "on-error", (GCallback) _tuba_views_admin_page_base_on_error_tuba_views_admin_timeline_pagination_timeline_on_error, (TubaViewsAdminPageBase*) self, 0);
	_tmp11_ = self->priv->pagination_timeline;
	g_object_bind_property_with_closures ((GObject*) _tmp11_, "working", (GObject*) self, "spinning", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp12_ = self->priv->pagination_timeline;
	_tmp13_ = self->priv->resolved_button;
	g_object_bind_property_with_closures ((GObject*) _tmp12_, "working", (GObject*) _tmp13_, "sensitive", G_BINDING_SYNC_CREATE | G_BINDING_INVERT_BOOLEAN, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp14_ = self->priv->pagination_timeline;
	tuba_views_admin_page_base_set_page ((TubaViewsAdminPageBase*) self, (GtkWidget*) _tmp14_);
	tuba_views_admin_page_reports_refresh (self);
	return obj;
}

static void
tuba_views_admin_page_reports_class_init (TubaViewsAdminPageReportsClass * klass,
                                          gpointer klass_data)
{
	tuba_views_admin_page_reports_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsAdminPageReports_private_offset);
	G_OBJECT_CLASS (klass)->constructor = tuba_views_admin_page_reports_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_admin_page_reports_finalize;
}

static void
tuba_views_admin_page_reports_instance_init (TubaViewsAdminPageReports * self,
                                             gpointer klass)
{
	self->priv = tuba_views_admin_page_reports_get_instance_private (self);
}

static void
tuba_views_admin_page_reports_finalize (GObject * obj)
{
	TubaViewsAdminPageReports * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_ADMIN_PAGE_TYPE_REPORTS, TubaViewsAdminPageReports);
	_g_object_unref0 (self->priv->pagination_timeline);
	_g_object_unref0 (self->priv->resolved_button);
	G_OBJECT_CLASS (tuba_views_admin_page_reports_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_admin_page_reports_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsAdminPageReportsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_admin_page_reports_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsAdminPageReports), 0, (GInstanceInitFunc) tuba_views_admin_page_reports_instance_init, NULL };
	GType tuba_views_admin_page_reports_type_id;
	tuba_views_admin_page_reports_type_id = g_type_register_static (TUBA_VIEWS_ADMIN_PAGE_TYPE_BASE, "TubaViewsAdminPageReports", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsAdminPageReports_private_offset = g_type_add_instance_private (tuba_views_admin_page_reports_type_id, sizeof (TubaViewsAdminPageReportsPrivate));
	return tuba_views_admin_page_reports_type_id;
}

GType
tuba_views_admin_page_reports_get_type (void)
{
	static GType tuba_views_admin_page_reports_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_admin_page_reports_type_id__once)) {
		GType tuba_views_admin_page_reports_type_id;
		tuba_views_admin_page_reports_type_id = tuba_views_admin_page_reports_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_admin_page_reports_type_id__once, tuba_views_admin_page_reports_type_id);
	}
	return tuba_views_admin_page_reports_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);
}

