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

#include <adwaita.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.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_TYPE_BASE (tuba_views_base_get_type ())
#define TUBA_VIEWS_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_BASE, TubaViewsBase))
#define TUBA_VIEWS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_BASE, TubaViewsBaseClass))
#define TUBA_VIEWS_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_BASE))
#define TUBA_VIEWS_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_BASE))
#define TUBA_VIEWS_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_BASE, TubaViewsBaseClass))

typedef struct _TubaViewsBase TubaViewsBase;
typedef struct _TubaViewsBaseClass TubaViewsBaseClass;
typedef struct _TubaViewsBasePrivate TubaViewsBasePrivate;

#define TUBA_VIEWS_TYPE_TABBED_BASE (tuba_views_tabbed_base_get_type ())
#define TUBA_VIEWS_TABBED_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_TABBED_BASE, TubaViewsTabbedBase))
#define TUBA_VIEWS_TABBED_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_TABBED_BASE, TubaViewsTabbedBaseClass))
#define TUBA_VIEWS_IS_TABBED_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_TABBED_BASE))
#define TUBA_VIEWS_IS_TABBED_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_TABBED_BASE))
#define TUBA_VIEWS_TABBED_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_TABBED_BASE, TubaViewsTabbedBaseClass))

typedef struct _TubaViewsTabbedBase TubaViewsTabbedBase;
typedef struct _TubaViewsTabbedBaseClass TubaViewsTabbedBaseClass;
typedef struct _TubaViewsTabbedBasePrivate TubaViewsTabbedBasePrivate;

#define TUBA_VIEWS_TYPE_STATUS_STATS (tuba_views_status_stats_get_type ())
#define TUBA_VIEWS_STATUS_STATS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_STATUS_STATS, TubaViewsStatusStats))
#define TUBA_VIEWS_STATUS_STATS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_STATUS_STATS, TubaViewsStatusStatsClass))
#define TUBA_VIEWS_IS_STATUS_STATS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_STATUS_STATS))
#define TUBA_VIEWS_IS_STATUS_STATS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_STATUS_STATS))
#define TUBA_VIEWS_STATUS_STATS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_STATUS_STATS, TubaViewsStatusStatsClass))

typedef struct _TubaViewsStatusStats TubaViewsStatusStats;
typedef struct _TubaViewsStatusStatsClass TubaViewsStatusStatsClass;
typedef struct _TubaViewsStatusStatsPrivate TubaViewsStatusStatsPrivate;

#define TUBA_VIEWS_TYPE_CONTENT_BASE (tuba_views_content_base_get_type ())
#define TUBA_VIEWS_CONTENT_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBase))
#define TUBA_VIEWS_CONTENT_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBaseClass))
#define TUBA_VIEWS_IS_CONTENT_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE))
#define TUBA_VIEWS_IS_CONTENT_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_CONTENT_BASE))
#define TUBA_VIEWS_CONTENT_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBaseClass))

typedef struct _TubaViewsContentBase TubaViewsContentBase;
typedef struct _TubaViewsContentBaseClass TubaViewsContentBaseClass;
enum  {
	TUBA_VIEWS_STATUS_STATS_0_PROPERTY,
	TUBA_VIEWS_STATUS_STATS_NUM_PROPERTIES
};
static GParamSpec* tuba_views_status_stats_properties[TUBA_VIEWS_STATUS_STATS_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_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 _g_free0(var) (var = (g_free (var), NULL))
typedef enum  {
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_NONE = 1 << 0,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_QUOTE = 1 << 1,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_EMOJI_REACTIONS = 1 << 2,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_BUBBLE = 1 << 3,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GROUP_NOTIFICATIONS = 1 << 4,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_FEATURE_TAGS = 1 << 5,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ENDORSE_USERS = 1 << 6,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_MUTUALS = 1 << 7,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_TRANSLATION = 1 << 8,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ICESHRIMP = 1 << 9,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GLITCH = 1 << 10,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_LOCAL_ONLY = 1 << 11,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GOTOSOCIAL = 1 << 12
} TubaInstanceAccountInstanceFeatures;

#define TUBA_INSTANCE_ACCOUNT_TYPE_INSTANCE_FEATURES (tuba_instance_account_instance_features_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_INSTANCE_ACCOUNT (tuba_instance_account_get_type ())
#define TUBA_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccount))
#define TUBA_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))
#define TUBA_IS_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_IS_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_INSTANCE_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))

typedef struct _TubaInstanceAccount TubaInstanceAccount;
typedef struct _TubaInstanceAccountClass TubaInstanceAccountClass;

#define TUBA_API_TYPE_STATUS (tuba_api_status_get_type ())
#define TUBA_API_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_STATUS, TubaAPIStatus))
#define TUBA_API_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_STATUS, TubaAPIStatusClass))
#define TUBA_API_IS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_STATUS))
#define TUBA_API_IS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_STATUS))
#define TUBA_API_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_STATUS, TubaAPIStatusClass))

typedef struct _TubaAPIStatus TubaAPIStatus;
typedef struct _TubaAPIStatusClass TubaAPIStatusClass;

#define TUBA_API_TYPE_INSTANCE (tuba_api_instance_get_type ())
#define TUBA_API_INSTANCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_INSTANCE, TubaAPIInstance))
#define TUBA_API_INSTANCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_INSTANCE, TubaAPIInstanceClass))
#define TUBA_API_IS_INSTANCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_INSTANCE))
#define TUBA_API_IS_INSTANCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_INSTANCE))
#define TUBA_API_INSTANCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_INSTANCE, TubaAPIInstanceClass))

typedef struct _TubaAPIInstance TubaAPIInstance;
typedef struct _TubaAPIInstanceClass TubaAPIInstanceClass;

#define TUBA_API_PLEROMA_TYPE_INSTANCE (tuba_api_pleroma_instance_get_type ())
#define TUBA_API_PLEROMA_INSTANCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_PLEROMA_TYPE_INSTANCE, TubaAPIPleromaInstance))
#define TUBA_API_PLEROMA_INSTANCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_PLEROMA_TYPE_INSTANCE, TubaAPIPleromaInstanceClass))
#define TUBA_API_PLEROMA_IS_INSTANCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_PLEROMA_TYPE_INSTANCE))
#define TUBA_API_PLEROMA_IS_INSTANCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_PLEROMA_TYPE_INSTANCE))
#define TUBA_API_PLEROMA_INSTANCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_PLEROMA_TYPE_INSTANCE, TubaAPIPleromaInstanceClass))

typedef struct _TubaAPIPleromaInstance TubaAPIPleromaInstance;
typedef struct _TubaAPIPleromaInstanceClass TubaAPIPleromaInstanceClass;

#define TUBA_API_TYPE_EMOJI_REACTION (tuba_api_emoji_reaction_get_type ())
#define TUBA_API_EMOJI_REACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_EMOJI_REACTION, TubaAPIEmojiReaction))
#define TUBA_API_EMOJI_REACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_EMOJI_REACTION, TubaAPIEmojiReactionClass))
#define TUBA_API_IS_EMOJI_REACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_EMOJI_REACTION))
#define TUBA_API_IS_EMOJI_REACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_EMOJI_REACTION))
#define TUBA_API_EMOJI_REACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_EMOJI_REACTION, TubaAPIEmojiReactionClass))

typedef struct _TubaAPIEmojiReaction TubaAPIEmojiReaction;
typedef struct _TubaAPIEmojiReactionClass TubaAPIEmojiReactionClass;

struct _TubaViewsBase {
	AdwBreakpointBin parent_instance;
	TubaViewsBasePrivate * priv;
	AdwHeaderBar* header;
	AdwToolbarView* toolbar_view;
	GtkScrolledWindow* scrolled;
	GtkOverlay* scrolled_overlay;
	GtkRevealer* scroll_to_top_rev;
	GtkButton* scroll_to_top;
	GtkStack* states;
	AdwClamp* content_box;
	GtkButton* status_button;
};

struct _TubaViewsBaseClass {
	AdwBreakpointBinClass parent_class;
	void (*scroll_page) (TubaViewsBase* self, gboolean up);
	void (*unbind_listboxes) (TubaViewsBase* self);
	void (*build_actions) (TubaViewsBase* self);
	void (*build_header) (TubaViewsBase* self);
	void (*clear) (TubaViewsBase* self);
	void (*on_shown) (TubaViewsBase* self);
	void (*on_hidden) (TubaViewsBase* self);
	void (*on_content_changed) (TubaViewsBase* self);
	void (*on_error) (TubaViewsBase* self, gint32 code, const gchar* reason);
};

struct _TubaViewsTabbedBase {
	TubaViewsBase parent_instance;
	TubaViewsTabbedBasePrivate * priv;
	AdwViewSwitcher* switcher;
	AdwViewSwitcherBar* switcher_bar;
	AdwViewStack* stack;
	GtkStack* title_stack;
};

struct _TubaViewsTabbedBaseClass {
	TubaViewsBaseClass parent_class;
	void (*change_tab_alt) (TubaViewsTabbedBase* self, gint id);
	void (*on_view_switched) (TubaViewsTabbedBase* self);
	gboolean (*get_title_stack_page_visible) (TubaViewsTabbedBase* self);
	void (*set_title_stack_page_visible) (TubaViewsTabbedBase* self, gboolean value);
};

struct _TubaViewsStatusStats {
	TubaViewsTabbedBase parent_instance;
	TubaViewsStatusStatsPrivate * priv;
};

struct _TubaViewsStatusStatsClass {
	TubaViewsTabbedBaseClass parent_class;
};

struct _TubaViewsStatusStatsPrivate {
	TubaViewsContentBase* favorited;
	TubaViewsContentBase* boosted;
	TubaViewsContentBase* reacted;
	TubaViewsContentBase* quoted;
};

static gint TubaViewsStatusStats_private_offset;
static gpointer tuba_views_status_stats_parent_class = NULL;
VALA_EXTERN TubaAccountStore* tuba_accounts;

VALA_EXTERN GType tuba_views_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsBase, g_object_unref)
VALA_EXTERN GType tuba_views_tabbed_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsTabbedBase, g_object_unref)
VALA_EXTERN GType tuba_views_status_stats_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsStatusStats, g_object_unref)
VALA_EXTERN GType tuba_views_content_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsContentBase, g_object_unref)
VALA_EXTERN TubaViewsStatusStats* tuba_views_status_stats_new (const gchar* status_id,
                                                   gboolean has_reactors);
VALA_EXTERN TubaViewsStatusStats* tuba_views_status_stats_construct (GType object_type,
                                                         const gchar* status_id,
                                                         gboolean has_reactors);
VALA_EXTERN TubaViewsTabbedBase* tuba_views_tabbed_base_new (void);
VALA_EXTERN TubaViewsTabbedBase* tuba_views_tabbed_base_construct (GType object_type);
VALA_EXTERN TubaViewsContentBase* tuba_views_tabbed_base_add_timeline_tab (TubaViewsTabbedBase* self,
                                                               const gchar* label,
                                                               const gchar* icon,
                                                               const gchar* url,
                                                               GType accepts,
                                                               const gchar* empty_state_title,
                                                               const gchar* empty_state_icon,
                                                               gboolean use_rows);
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_instance_features_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_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 TubaInstanceAccountInstanceFeatures tuba_instance_account_get_tuba_instance_features (TubaInstanceAccount* self);
VALA_EXTERN GType tuba_api_status_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIStatus, g_object_unref)
VALA_EXTERN GType tuba_api_instance_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIInstance, g_object_unref)
VALA_EXTERN TubaAPIInstance* tuba_instance_account_get_instance_info (TubaInstanceAccount* self);
VALA_EXTERN GType tuba_api_pleroma_instance_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIPleromaInstance, g_object_unref)
VALA_EXTERN TubaAPIPleromaInstance* tuba_api_instance_get_pleroma (TubaAPIInstance* self);
VALA_EXTERN GType tuba_api_emoji_reaction_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIEmojiReaction, g_object_unref)
static GObject * tuba_views_status_stats_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties);
VALA_EXTERN void tuba_views_base_set_label (TubaViewsBase* self,
                                const gchar* value);
static void tuba_views_status_stats_finalize (GObject * obj);
static GType tuba_views_status_stats_get_type_once (void);

static inline gpointer
tuba_views_status_stats_get_instance_private (TubaViewsStatusStats* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsStatusStats_private_offset);
}

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

TubaViewsStatusStats*
tuba_views_status_stats_construct (GType object_type,
                                   const gchar* status_id,
                                   gboolean has_reactors)
{
	TubaViewsStatusStats * self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	TubaViewsContentBase* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	TubaViewsContentBase* _tmp7_;
	TubaAccountStore* _tmp8_;
	TubaInstanceAccount* _tmp9_;
	TubaInstanceAccount* _tmp10_;
	TubaInstanceAccountInstanceFeatures _tmp11_;
	TubaInstanceAccountInstanceFeatures _tmp12_;
	gboolean _tmp17_ = FALSE;
	gboolean _tmp18_ = FALSE;
	g_return_val_if_fail (status_id != NULL, NULL);
	self = (TubaViewsStatusStats*) tuba_views_tabbed_base_construct (object_type);
	_tmp0_ = string_to_string (status_id);
	_tmp1_ = g_strconcat ("/api/v1/statuses/", _tmp0_, "/reblogged_by", NULL);
	_tmp2_ = _tmp1_;
	_tmp3_ = tuba_views_tabbed_base_add_timeline_tab ((TubaViewsTabbedBase*) self, _ ("Boosted By"), "tuba-media-playlist-repeat-symbolic", _tmp2_, TUBA_API_TYPE_ACCOUNT, _ ("No Boosts"), "tuba-heart-broken-symbolic", TRUE);
	_g_object_unref0 (self->priv->boosted);
	self->priv->boosted = _tmp3_;
	_g_free0 (_tmp2_);
	_tmp4_ = string_to_string (status_id);
	_tmp5_ = g_strconcat ("/api/v1/statuses/", _tmp4_, "/favourited_by", NULL);
	_tmp6_ = _tmp5_;
	_tmp7_ = tuba_views_tabbed_base_add_timeline_tab ((TubaViewsTabbedBase*) self, _ ("Favorited By"), "tuba-starred-symbolic", _tmp6_, TUBA_API_TYPE_ACCOUNT, _ ("No Favorites"), "tuba-heart-broken-symbolic", TRUE);
	_g_object_unref0 (self->priv->favorited);
	self->priv->favorited = _tmp7_;
	_g_free0 (_tmp6_);
	_tmp8_ = tuba_accounts;
	_tmp9_ = tuba_account_store_get_active (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = tuba_instance_account_get_tuba_instance_features (_tmp10_);
	_tmp12_ = _tmp11_;
	if ((_tmp12_ & TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_QUOTE) == TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_QUOTE) {
		const gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		TubaViewsContentBase* _tmp16_;
		_tmp13_ = string_to_string (status_id);
		_tmp14_ = g_strconcat ("/api/v1/statuses/", _tmp13_, "/quotes", NULL);
		_tmp15_ = _tmp14_;
		_tmp16_ = tuba_views_tabbed_base_add_timeline_tab ((TubaViewsTabbedBase*) self, _ ("Quotes"), "tuba-quotation-symbolic", _tmp15_, TUBA_API_TYPE_STATUS, _ ("No Quotes"), "tuba-heart-broken-symbolic", TRUE);
		_g_object_unref0 (self->priv->quoted);
		self->priv->quoted = _tmp16_;
		_g_free0 (_tmp15_);
	}
	if (has_reactors) {
		TubaAccountStore* _tmp19_;
		TubaInstanceAccount* _tmp20_;
		TubaInstanceAccount* _tmp21_;
		TubaAPIInstance* _tmp22_;
		TubaAPIInstance* _tmp23_;
		_tmp19_ = tuba_accounts;
		_tmp20_ = tuba_account_store_get_active (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp22_ = tuba_instance_account_get_instance_info (_tmp21_);
		_tmp23_ = _tmp22_;
		_tmp18_ = _tmp23_ != NULL;
	} else {
		_tmp18_ = FALSE;
	}
	if (_tmp18_) {
		TubaAccountStore* _tmp24_;
		TubaInstanceAccount* _tmp25_;
		TubaInstanceAccount* _tmp26_;
		TubaAPIInstance* _tmp27_;
		TubaAPIInstance* _tmp28_;
		TubaAPIPleromaInstance* _tmp29_;
		TubaAPIPleromaInstance* _tmp30_;
		_tmp24_ = tuba_accounts;
		_tmp25_ = tuba_account_store_get_active (_tmp24_);
		_tmp26_ = _tmp25_;
		_tmp27_ = tuba_instance_account_get_instance_info (_tmp26_);
		_tmp28_ = _tmp27_;
		_tmp29_ = tuba_api_instance_get_pleroma (_tmp28_);
		_tmp30_ = _tmp29_;
		_tmp17_ = _tmp30_ != NULL;
	} else {
		_tmp17_ = FALSE;
	}
	if (_tmp17_) {
		const gchar* _tmp31_;
		gchar* _tmp32_;
		gchar* _tmp33_;
		TubaViewsContentBase* _tmp34_;
		_tmp31_ = string_to_string (status_id);
		_tmp32_ = g_strconcat ("/api/v1/pleroma/statuses/", _tmp31_, "/reactions", NULL);
		_tmp33_ = _tmp32_;
		_tmp34_ = tuba_views_tabbed_base_add_timeline_tab ((TubaViewsTabbedBase*) self, _ ("Reactions"), "tuba-smile-symbolic", _tmp33_, TUBA_API_TYPE_EMOJI_REACTION, _ ("No Reactions"), "tuba-heart-broken-symbolic", FALSE);
		_g_object_unref0 (self->priv->reacted);
		self->priv->reacted = _tmp34_;
		_g_free0 (_tmp33_);
	}
	return self;
}

TubaViewsStatusStats*
tuba_views_status_stats_new (const gchar* status_id,
                             gboolean has_reactors)
{
	return tuba_views_status_stats_construct (TUBA_VIEWS_TYPE_STATUS_STATS, status_id, has_reactors);
}

static GObject *
tuba_views_status_stats_constructor (GType type,
                                     guint n_construct_properties,
                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsStatusStats * self;
	parent_class = G_OBJECT_CLASS (tuba_views_status_stats_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_STATUS_STATS, TubaViewsStatusStats);
	tuba_views_base_set_label ((TubaViewsBase*) self, _ ("Post Stats"));
	return obj;
}

static void
tuba_views_status_stats_class_init (TubaViewsStatusStatsClass * klass,
                                    gpointer klass_data)
{
	tuba_views_status_stats_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsStatusStats_private_offset);
	G_OBJECT_CLASS (klass)->constructor = tuba_views_status_stats_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_status_stats_finalize;
}

static void
tuba_views_status_stats_instance_init (TubaViewsStatusStats * self,
                                       gpointer klass)
{
	self->priv = tuba_views_status_stats_get_instance_private (self);
}

static void
tuba_views_status_stats_finalize (GObject * obj)
{
	TubaViewsStatusStats * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_STATUS_STATS, TubaViewsStatusStats);
	_g_object_unref0 (self->priv->favorited);
	_g_object_unref0 (self->priv->boosted);
	_g_object_unref0 (self->priv->reacted);
	_g_object_unref0 (self->priv->quoted);
	G_OBJECT_CLASS (tuba_views_status_stats_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_status_stats_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsStatusStatsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_status_stats_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsStatusStats), 0, (GInstanceInitFunc) tuba_views_status_stats_instance_init, NULL };
	GType tuba_views_status_stats_type_id;
	tuba_views_status_stats_type_id = g_type_register_static (TUBA_VIEWS_TYPE_TABBED_BASE, "TubaViewsStatusStats", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsStatusStats_private_offset = g_type_add_instance_private (tuba_views_status_stats_type_id, sizeof (TubaViewsStatusStatsPrivate));
	return tuba_views_status_stats_type_id;
}

GType
tuba_views_status_stats_get_type (void)
{
	static GType tuba_views_status_stats_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_status_stats_type_id__once)) {
		GType tuba_views_status_stats_type_id;
		tuba_views_status_stats_type_id = tuba_views_status_stats_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_status_stats_type_id__once, tuba_views_status_stats_type_id);
	}
	return tuba_views_status_stats_type_id__once;
}

