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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <adwaita.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>

#define TUBA_INSTANCE_ACCOUNT_KIND_FOLLOW "follow"
#define TUBA_INSTANCE_ACCOUNT_KIND_FOLLOW_REQUEST "follow_request"
#define TUBA_INSTANCE_ACCOUNT_KIND_FAVOURITE "favourite"
#define TUBA_INSTANCE_ACCOUNT_KIND_REBLOG "reblog"
#define TUBA_INSTANCE_ACCOUNT_KIND_PLEROMA_REACTION "pleroma:emoji_reaction"
#define TUBA_INSTANCE_ACCOUNT_KIND_REACTION "reaction"
#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_WIDGETS_TYPE_STATUS (tuba_widgets_status_get_type ())
#define TUBA_WIDGETS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_STATUS, TubaWidgetsStatus))
#define TUBA_WIDGETS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_STATUS, TubaWidgetsStatusClass))
#define TUBA_WIDGETS_IS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_STATUS))
#define TUBA_WIDGETS_IS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_STATUS))
#define TUBA_WIDGETS_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_STATUS, TubaWidgetsStatusClass))

typedef struct _TubaWidgetsStatus TubaWidgetsStatus;
typedef struct _TubaWidgetsStatusClass TubaWidgetsStatusClass;
typedef struct _TubaWidgetsStatusPrivate TubaWidgetsStatusPrivate;

#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_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;
typedef void (*TubaDialogsComposerDialogSuccessCallback) (TubaAPIStatus* cb_status, gpointer user_data);

#define TUBA_WIDGETS_TYPE_RICH_LABEL (tuba_widgets_rich_label_get_type ())
#define TUBA_WIDGETS_RICH_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_RICH_LABEL, TubaWidgetsRichLabel))
#define TUBA_WIDGETS_RICH_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_RICH_LABEL, TubaWidgetsRichLabelClass))
#define TUBA_WIDGETS_IS_RICH_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_RICH_LABEL))
#define TUBA_WIDGETS_IS_RICH_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_RICH_LABEL))
#define TUBA_WIDGETS_RICH_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_RICH_LABEL, TubaWidgetsRichLabelClass))

typedef struct _TubaWidgetsRichLabel TubaWidgetsRichLabel;
typedef struct _TubaWidgetsRichLabelClass TubaWidgetsRichLabelClass;

#define TUBA_WIDGETS_TYPE_AVATAR (tuba_widgets_avatar_get_type ())
#define TUBA_WIDGETS_AVATAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_AVATAR, TubaWidgetsAvatar))
#define TUBA_WIDGETS_AVATAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_AVATAR, TubaWidgetsAvatarClass))
#define TUBA_WIDGETS_IS_AVATAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_AVATAR))
#define TUBA_WIDGETS_IS_AVATAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_AVATAR))
#define TUBA_WIDGETS_AVATAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_AVATAR, TubaWidgetsAvatarClass))

typedef struct _TubaWidgetsAvatar TubaWidgetsAvatar;
typedef struct _TubaWidgetsAvatarClass TubaWidgetsAvatarClass;

#define TUBA_WIDGETS_TYPE_MARKUP_VIEW (tuba_widgets_markup_view_get_type ())
#define TUBA_WIDGETS_MARKUP_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_MARKUP_VIEW, TubaWidgetsMarkupView))
#define TUBA_WIDGETS_MARKUP_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_MARKUP_VIEW, TubaWidgetsMarkupViewClass))
#define TUBA_WIDGETS_IS_MARKUP_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_MARKUP_VIEW))
#define TUBA_WIDGETS_IS_MARKUP_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_MARKUP_VIEW))
#define TUBA_WIDGETS_MARKUP_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_MARKUP_VIEW, TubaWidgetsMarkupViewClass))

typedef struct _TubaWidgetsMarkupView TubaWidgetsMarkupView;
typedef struct _TubaWidgetsMarkupViewClass TubaWidgetsMarkupViewClass;

#define TUBA_WIDGETS_TYPE_FADE_BIN (tuba_widgets_fade_bin_get_type ())
#define TUBA_WIDGETS_FADE_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_FADE_BIN, TubaWidgetsFadeBin))
#define TUBA_WIDGETS_FADE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_FADE_BIN, TubaWidgetsFadeBinClass))
#define TUBA_WIDGETS_IS_FADE_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_FADE_BIN))
#define TUBA_WIDGETS_IS_FADE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_FADE_BIN))
#define TUBA_WIDGETS_FADE_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_FADE_BIN, TubaWidgetsFadeBinClass))

typedef struct _TubaWidgetsFadeBin TubaWidgetsFadeBin;
typedef struct _TubaWidgetsFadeBinClass TubaWidgetsFadeBinClass;

#define TUBA_WIDGETS_TYPE_PREVIEW_CARD (tuba_widgets_preview_card_get_type ())
#define TUBA_WIDGETS_PREVIEW_CARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_PREVIEW_CARD, TubaWidgetsPreviewCard))
#define TUBA_WIDGETS_PREVIEW_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_PREVIEW_CARD, TubaWidgetsPreviewCardClass))
#define TUBA_WIDGETS_IS_PREVIEW_CARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_PREVIEW_CARD))
#define TUBA_WIDGETS_IS_PREVIEW_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_PREVIEW_CARD))
#define TUBA_WIDGETS_PREVIEW_CARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_PREVIEW_CARD, TubaWidgetsPreviewCardClass))

typedef struct _TubaWidgetsPreviewCard TubaWidgetsPreviewCard;
typedef struct _TubaWidgetsPreviewCardClass TubaWidgetsPreviewCardClass;

#define TUBA_WIDGETS_TYPE_VOTE_BOX (tuba_widgets_vote_box_get_type ())
#define TUBA_WIDGETS_VOTE_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_VOTE_BOX, TubaWidgetsVoteBox))
#define TUBA_WIDGETS_VOTE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_VOTE_BOX, TubaWidgetsVoteBoxClass))
#define TUBA_WIDGETS_IS_VOTE_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_VOTE_BOX))
#define TUBA_WIDGETS_IS_VOTE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_VOTE_BOX))
#define TUBA_WIDGETS_VOTE_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_VOTE_BOX, TubaWidgetsVoteBoxClass))

typedef struct _TubaWidgetsVoteBox TubaWidgetsVoteBox;
typedef struct _TubaWidgetsVoteBoxClass TubaWidgetsVoteBoxClass;

#define TUBA_WIDGETS_TYPE_NOTIFICATION (tuba_widgets_notification_get_type ())
#define TUBA_WIDGETS_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_NOTIFICATION, TubaWidgetsNotification))
#define TUBA_WIDGETS_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_NOTIFICATION, TubaWidgetsNotificationClass))
#define TUBA_WIDGETS_IS_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_NOTIFICATION))
#define TUBA_WIDGETS_IS_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_NOTIFICATION))
#define TUBA_WIDGETS_NOTIFICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_NOTIFICATION, TubaWidgetsNotificationClass))

typedef struct _TubaWidgetsNotification TubaWidgetsNotification;
typedef struct _TubaWidgetsNotificationClass TubaWidgetsNotificationClass;
typedef struct _TubaWidgetsNotificationPrivate TubaWidgetsNotificationPrivate;

#define TUBA_API_TYPE_NOTIFICATION (tuba_api_notification_get_type ())
#define TUBA_API_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_NOTIFICATION, TubaAPINotification))
#define TUBA_API_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_NOTIFICATION, TubaAPINotificationClass))
#define TUBA_API_IS_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_NOTIFICATION))
#define TUBA_API_IS_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_NOTIFICATION))
#define TUBA_API_NOTIFICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_NOTIFICATION, TubaAPINotificationClass))

typedef struct _TubaAPINotification TubaAPINotification;
typedef struct _TubaAPINotificationClass TubaAPINotificationClass;
enum  {
	TUBA_WIDGETS_NOTIFICATION_0_PROPERTY,
	TUBA_WIDGETS_NOTIFICATION_NOTIFICATION_PROPERTY,
	TUBA_WIDGETS_NOTIFICATION_NUM_PROPERTIES
};
static GParamSpec* tuba_widgets_notification_properties[TUBA_WIDGETS_NOTIFICATION_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#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_API_TYPE_EMOJI (tuba_api_emoji_get_type ())
#define TUBA_API_EMOJI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_EMOJI, TubaAPIEmoji))
#define TUBA_API_EMOJI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_EMOJI, TubaAPIEmojiClass))
#define TUBA_API_IS_EMOJI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_EMOJI))
#define TUBA_API_IS_EMOJI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_EMOJI))
#define TUBA_API_EMOJI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_EMOJI, TubaAPIEmojiClass))

typedef struct _TubaAPIEmoji TubaAPIEmoji;
typedef struct _TubaAPIEmojiClass TubaAPIEmojiClass;
#define _g_free0(var) (var = (g_free (var), NULL))

struct _TubaWidgetsStatus {
	GtkListBoxRow parent_instance;
	TubaWidgetsStatusPrivate * priv;
	TubaDialogsComposerDialogSuccessCallback reply_cb;
	gpointer reply_cb_target;
	GDestroyNotify reply_cb_target_destroy_notify;
	GtkBox* status_box;
	GtkBox* avatar_side;
	GtkBox* title_box;
	GtkBox* content_side;
	AdwWrapBox* name_wrapbox;
	GtkMenuButton* menu_button;
	GtkImage* header_icon;
	TubaWidgetsRichLabel* header_label;
	GtkButton* header_button;
	TubaWidgetsAvatar* avatar;
	GtkOverlay* avatar_overlay;
	GtkButton* name_button;
	TubaWidgetsRichLabel* name_label;
	GtkLabel* handle_label;
	GtkBox* indicators;
	GtkLabel* date_label;
	GtkImage* pin_indicator;
	GtkImage* edited_indicator;
	GtkImage* visibility_indicator;
	GtkBox* content_column;
	GtkStack* spoiler_stack;
	GtkBox* content_box;
	TubaWidgetsMarkupView* content;
	GtkButton* spoiler_button;
	GtkLabel* spoiler_label;
	GtkLabel* spoiler_label_rev;
	GtkBox* spoiler_status_con;
	TubaWidgetsFadeBin* fade_bin;
	GtkStack* filter_stack;
	GtkLabel* filter_label;
	GtkLabel* filter_author_label;
	TubaWidgetsPreviewCard* prev_card;
	TubaWidgetsVoteBox* poll;
};

struct _TubaWidgetsStatusClass {
	GtkListBoxRowClass parent_class;
	void (*on_open) (TubaWidgetsStatus* self);
	void (*change_kind) (TubaWidgetsStatus* self);
	void (*bind) (TubaWidgetsStatus* self);
};

struct _TubaWidgetsNotification {
	TubaWidgetsStatus parent_instance;
	TubaWidgetsNotificationPrivate * priv;
};

struct _TubaWidgetsNotificationClass {
	TubaWidgetsStatusClass parent_class;
};

struct _TubaWidgetsNotificationPrivate {
	TubaAPINotification* _notification;
};

static gint TubaWidgetsNotification_private_offset;
static gpointer tuba_widgets_notification_parent_class = NULL;

VALA_EXTERN GType tuba_widgets_status_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsStatus, 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_status_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIStatus, g_object_unref)
VALA_EXTERN GType tuba_widgets_rich_label_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsRichLabel, g_object_unref)
VALA_EXTERN GType tuba_widgets_avatar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsAvatar, g_object_unref)
VALA_EXTERN GType tuba_widgets_markup_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsMarkupView, g_object_unref)
VALA_EXTERN GType tuba_widgets_fade_bin_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsFadeBin, g_object_unref)
VALA_EXTERN GType tuba_widgets_preview_card_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsPreviewCard, g_object_unref)
VALA_EXTERN GType tuba_widgets_vote_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsVoteBox, g_object_unref)
VALA_EXTERN GType tuba_widgets_notification_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsNotification, g_object_unref)
VALA_EXTERN GType tuba_api_notification_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPINotification, g_object_unref)
VALA_EXTERN TubaWidgetsNotification* tuba_widgets_notification_new (TubaAPINotification* obj,
                                                        gboolean with_kind);
VALA_EXTERN TubaWidgetsNotification* tuba_widgets_notification_construct (GType object_type,
                                                              TubaAPINotification* obj,
                                                              gboolean with_kind);
VALA_EXTERN TubaAPIStatus* tuba_api_notification_get_status (TubaAPINotification* self);
VALA_EXTERN GType tuba_api_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccount, g_object_unref)
VALA_EXTERN TubaAPIAccount* tuba_api_notification_get_account (TubaAPINotification* self);
VALA_EXTERN TubaAPIStatus* tuba_api_status_new_from_account (TubaAPIAccount* account);
VALA_EXTERN TubaAPIStatus* tuba_api_status_construct_from_account (GType object_type,
                                                       TubaAPIAccount* account);
VALA_EXTERN const gchar* tuba_api_notification_get_emoji_url (TubaAPINotification* self);
VALA_EXTERN GType tuba_api_emoji_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIEmoji, g_object_unref)
VALA_EXTERN const gchar* tuba_api_notification_get_emoji (TubaAPINotification* self);
VALA_EXTERN TubaAPIEmoji* tuba_api_emoji_new (void);
VALA_EXTERN TubaAPIEmoji* tuba_api_emoji_construct (GType object_type);
VALA_EXTERN void tuba_api_emoji_set_shortcode (TubaAPIEmoji* self,
                                   const gchar* value);
VALA_EXTERN void tuba_api_emoji_set_url (TubaAPIEmoji* self,
                             const gchar* value);
VALA_EXTERN GeeArrayList* tuba_api_account_get_emojis (TubaAPIAccount* self);
VALA_EXTERN void tuba_api_account_set_emojis (TubaAPIAccount* self,
                                  GeeArrayList* value);
VALA_EXTERN const gchar* tuba_api_notification_get_kind (TubaAPINotification* self);
VALA_EXTERN void tuba_widgets_status_toggle_actions_visibility (TubaWidgetsStatus* self,
                                                    gboolean visible);
VALA_EXTERN TubaAPIStatus* tuba_api_status_get_formal (TubaAPIStatus* self);
VALA_EXTERN TubaAPIAccount* tuba_api_status_get_account (TubaAPIStatus* self);
VALA_EXTERN gboolean tuba_api_account_is_self (TubaAPIAccount* self);
VALA_EXTERN TubaAPINotification* tuba_widgets_notification_get_notification (TubaWidgetsNotification* self);
VALA_EXTERN void tuba_widgets_notification_set_notification (TubaWidgetsNotification* self,
                                                 TubaAPINotification* value);
static void tuba_widgets_notification_finalize (GObject * obj);
static GType tuba_widgets_notification_get_type_once (void);
static void _vala_tuba_widgets_notification_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec);
static void _vala_tuba_widgets_notification_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec);

static inline gpointer
tuba_widgets_notification_get_instance_private (TubaWidgetsNotification* self)
{
	return G_STRUCT_MEMBER_P (self, TubaWidgetsNotification_private_offset);
}

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

static gchar*
string_slice (const gchar* self,
              glong start,
              glong end)
{
	glong string_length = 0L;
	gint _tmp0_;
	gint _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gchar* _tmp4_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	string_length = (glong) _tmp1_;
	if (start < ((glong) 0)) {
		start = string_length + start;
	}
	if (end < ((glong) 0)) {
		end = string_length + end;
	}
	if (start >= ((glong) 0)) {
		_tmp2_ = start <= string_length;
	} else {
		_tmp2_ = FALSE;
	}
	g_return_val_if_fail (_tmp2_, NULL);
	if (end >= ((glong) 0)) {
		_tmp3_ = end <= string_length;
	} else {
		_tmp3_ = FALSE;
	}
	g_return_val_if_fail (_tmp3_, NULL);
	g_return_val_if_fail (start <= end, NULL);
	_tmp4_ = g_strndup (((gchar*) self) + start, (gsize) (end - start));
	result = _tmp4_;
	return result;
}

TubaWidgetsNotification*
tuba_widgets_notification_construct (GType object_type,
                                     TubaAPINotification* obj,
                                     gboolean with_kind)
{
	TubaWidgetsNotification * self = NULL;
	TubaAPIStatus* status = NULL;
	TubaAPIStatus* _tmp0_;
	TubaAPIStatus* _tmp1_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	TubaAPIAccount* _tmp32_ = NULL;
	const gchar* _tmp35_ = NULL;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	TubaAPIStatus* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	const gchar* _tmp43_;
	GQuark _tmp45_ = 0U;
	static GQuark _tmp44_label0 = 0;
	static GQuark _tmp44_label1 = 0;
	static GQuark _tmp44_label2 = 0;
	static GQuark _tmp44_label3 = 0;
	static GQuark _tmp44_label4 = 0;
	static GQuark _tmp44_label5 = 0;
	TubaAPIStatus* _tmp48_;
	TubaAPIStatus* _tmp49_;
	TubaAPIStatus* _tmp50_;
	TubaAPIAccount* _tmp51_;
	TubaAPIAccount* _tmp52_;
	g_return_val_if_fail (obj != NULL, NULL);
	_tmp0_ = tuba_api_notification_get_status (obj);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		TubaAPIStatus* _tmp2_;
		TubaAPIStatus* _tmp3_;
		TubaAPIStatus* _tmp4_;
		_tmp2_ = tuba_api_notification_get_status (obj);
		_tmp3_ = _tmp2_;
		_tmp4_ = _g_object_ref0 (_tmp3_);
		_g_object_unref0 (status);
		status = _tmp4_;
	} else {
		TubaAPIAccount* _tmp5_;
		TubaAPIAccount* _tmp6_;
		TubaAPIStatus* _tmp7_;
		_tmp5_ = tuba_api_notification_get_account (obj);
		_tmp6_ = _tmp5_;
		_tmp7_ = tuba_api_status_new_from_account (_tmp6_);
		_g_object_unref0 (status);
		status = _tmp7_;
	}
	_tmp8_ = tuba_api_notification_get_emoji_url (obj);
	_tmp9_ = _tmp8_;
	if (_tmp9_ != NULL) {
		TubaAPIEmoji* custom_reaction = NULL;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		gchar* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		gchar* _tmp15_;
		TubaAPIEmoji* _tmp16_ = NULL;
		TubaAPIAccount* _tmp17_;
		TubaAPIAccount* _tmp18_;
		GeeArrayList* _tmp19_;
		GeeArrayList* _tmp20_;
		_tmp10_ = tuba_api_notification_get_emoji (obj);
		_tmp11_ = _tmp10_;
		_tmp12_ = string_slice (_tmp11_, (glong) 1, (glong) -1);
		_tmp13_ = tuba_api_notification_get_emoji_url (obj);
		_tmp14_ = _tmp13_;
		_tmp15_ = g_strdup (_tmp14_);
		_tmp16_ = tuba_api_emoji_new ();
		tuba_api_emoji_set_shortcode (_tmp16_, _tmp12_);
		_g_free0 (_tmp12_);
		tuba_api_emoji_set_url (_tmp16_, _tmp15_);
		_g_free0 (_tmp15_);
		custom_reaction = _tmp16_;
		_tmp17_ = tuba_api_notification_get_account (obj);
		_tmp18_ = _tmp17_;
		_tmp19_ = tuba_api_account_get_emojis (_tmp18_);
		_tmp20_ = _tmp19_;
		if (_tmp20_ != NULL) {
			TubaAPIAccount* _tmp21_;
			TubaAPIAccount* _tmp22_;
			GeeArrayList* _tmp23_;
			GeeArrayList* _tmp24_;
			TubaAPIEmoji* _tmp25_;
			_tmp21_ = tuba_api_notification_get_account (obj);
			_tmp22_ = _tmp21_;
			_tmp23_ = tuba_api_account_get_emojis (_tmp22_);
			_tmp24_ = _tmp23_;
			_tmp25_ = custom_reaction;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp24_, _tmp25_);
		} else {
			GeeArrayList* arr = NULL;
			GeeArrayList* _tmp26_;
			GeeArrayList* _tmp27_;
			TubaAPIEmoji* _tmp28_;
			TubaAPIAccount* _tmp29_;
			TubaAPIAccount* _tmp30_;
			GeeArrayList* _tmp31_;
			_tmp26_ = gee_array_list_new (TUBA_API_TYPE_EMOJI, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
			arr = _tmp26_;
			_tmp27_ = arr;
			_tmp28_ = custom_reaction;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp27_, _tmp28_);
			_tmp29_ = tuba_api_notification_get_account (obj);
			_tmp30_ = _tmp29_;
			_tmp31_ = arr;
			tuba_api_account_set_emojis (_tmp30_, _tmp31_);
			_g_object_unref0 (arr);
		}
		_g_object_unref0 (custom_reaction);
	}
	if (with_kind) {
		TubaAPIAccount* _tmp33_;
		TubaAPIAccount* _tmp34_;
		_tmp33_ = tuba_api_notification_get_account (obj);
		_tmp34_ = _tmp33_;
		_tmp32_ = _tmp34_;
	} else {
		_tmp32_ = NULL;
	}
	if (with_kind) {
		const gchar* _tmp36_;
		const gchar* _tmp37_;
		_tmp36_ = tuba_api_notification_get_kind (obj);
		_tmp37_ = _tmp36_;
		_tmp35_ = _tmp37_;
	} else {
		_tmp35_ = NULL;
	}
	_tmp38_ = tuba_api_notification_get_emoji (obj);
	_tmp39_ = _tmp38_;
	_tmp40_ = status;
	self = (TubaWidgetsNotification*) g_object_new (object_type, "other-data", _tmp39_, "notification", obj, "kind-instigator", _tmp32_, "kind", _tmp35_, "status", _tmp40_, NULL);
	_tmp41_ = tuba_api_notification_get_kind (obj);
	_tmp42_ = _tmp41_;
	_tmp43_ = _tmp42_;
	_tmp45_ = (NULL == _tmp43_) ? 0 : g_quark_from_string (_tmp43_);
	if ((_tmp45_ == ((0 != _tmp44_label0) ? _tmp44_label0 : (_tmp44_label0 = g_quark_from_static_string (TUBA_INSTANCE_ACCOUNT_KIND_FOLLOW)))) || (_tmp45_ == ((0 != _tmp44_label1) ? _tmp44_label1 : (_tmp44_label1 = g_quark_from_static_string (TUBA_INSTANCE_ACCOUNT_KIND_FOLLOW_REQUEST))))) {
		switch (0) {
			default:
			{
				GtkImage* _tmp46_;
				GtkLabel* _tmp47_;
				tuba_widgets_status_toggle_actions_visibility ((TubaWidgetsStatus*) self, FALSE);
				_tmp46_ = ((TubaWidgetsStatus*) self)->visibility_indicator;
				gtk_widget_set_visible ((GtkWidget*) _tmp46_, FALSE);
				_tmp47_ = ((TubaWidgetsStatus*) self)->date_label;
				gtk_widget_set_visible ((GtkWidget*) _tmp47_, FALSE);
				break;
			}
		}
	} else if ((((_tmp45_ == ((0 != _tmp44_label2) ? _tmp44_label2 : (_tmp44_label2 = g_quark_from_static_string (TUBA_INSTANCE_ACCOUNT_KIND_FAVOURITE)))) || (_tmp45_ == ((0 != _tmp44_label3) ? _tmp44_label3 : (_tmp44_label3 = g_quark_from_static_string (TUBA_INSTANCE_ACCOUNT_KIND_REBLOG))))) || (_tmp45_ == ((0 != _tmp44_label4) ? _tmp44_label4 : (_tmp44_label4 = g_quark_from_static_string (TUBA_INSTANCE_ACCOUNT_KIND_PLEROMA_REACTION))))) || (_tmp45_ == ((0 != _tmp44_label5) ? _tmp44_label5 : (_tmp44_label5 = g_quark_from_static_string (TUBA_INSTANCE_ACCOUNT_KIND_REACTION))))) {
		switch (0) {
			default:
			{
				gtk_widget_add_css_class ((GtkWidget*) self, "can-be-dimmed");
				break;
			}
		}
	}
	_tmp48_ = status;
	_tmp49_ = tuba_api_status_get_formal (_tmp48_);
	_tmp50_ = _tmp49_;
	_tmp51_ = tuba_api_status_get_account (_tmp50_);
	_tmp52_ = _tmp51_;
	if (tuba_api_account_is_self (_tmp52_)) {
		TubaWidgetsPreviewCard* _tmp53_;
		_tmp53_ = ((TubaWidgetsStatus*) self)->prev_card;
		if (_tmp53_ != NULL) {
			TubaWidgetsPreviewCard* _tmp54_;
			_tmp54_ = ((TubaWidgetsStatus*) self)->prev_card;
			gtk_widget_set_visible ((GtkWidget*) _tmp54_, FALSE);
		}
	}
	_g_object_unref0 (status);
	return self;
}

TubaWidgetsNotification*
tuba_widgets_notification_new (TubaAPINotification* obj,
                               gboolean with_kind)
{
	return tuba_widgets_notification_construct (TUBA_WIDGETS_TYPE_NOTIFICATION, obj, with_kind);
}

TubaAPINotification*
tuba_widgets_notification_get_notification (TubaWidgetsNotification* self)
{
	TubaAPINotification* result;
	TubaAPINotification* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_notification;
	result = _tmp0_;
	return result;
}

void
tuba_widgets_notification_set_notification (TubaWidgetsNotification* self,
                                            TubaAPINotification* value)
{
	TubaAPINotification* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_widgets_notification_get_notification (self);
	if (old_value != value) {
		TubaAPINotification* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_notification);
		self->priv->_notification = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_widgets_notification_properties[TUBA_WIDGETS_NOTIFICATION_NOTIFICATION_PROPERTY]);
	}
}

static void
tuba_widgets_notification_class_init (TubaWidgetsNotificationClass * klass,
                                      gpointer klass_data)
{
	tuba_widgets_notification_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaWidgetsNotification_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_widgets_notification_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_widgets_notification_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_widgets_notification_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_WIDGETS_NOTIFICATION_NOTIFICATION_PROPERTY, tuba_widgets_notification_properties[TUBA_WIDGETS_NOTIFICATION_NOTIFICATION_PROPERTY] = g_param_spec_object ("notification", "notification", "notification", TUBA_API_TYPE_NOTIFICATION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
}

static void
tuba_widgets_notification_instance_init (TubaWidgetsNotification * self,
                                         gpointer klass)
{
	self->priv = tuba_widgets_notification_get_instance_private (self);
}

static void
tuba_widgets_notification_finalize (GObject * obj)
{
	TubaWidgetsNotification * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_WIDGETS_TYPE_NOTIFICATION, TubaWidgetsNotification);
	_g_object_unref0 (self->priv->_notification);
	G_OBJECT_CLASS (tuba_widgets_notification_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_widgets_notification_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaWidgetsNotificationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_widgets_notification_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaWidgetsNotification), 0, (GInstanceInitFunc) tuba_widgets_notification_instance_init, NULL };
	GType tuba_widgets_notification_type_id;
	tuba_widgets_notification_type_id = g_type_register_static (TUBA_WIDGETS_TYPE_STATUS, "TubaWidgetsNotification", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaWidgetsNotification_private_offset = g_type_add_instance_private (tuba_widgets_notification_type_id, sizeof (TubaWidgetsNotificationPrivate));
	return tuba_widgets_notification_type_id;
}

GType
tuba_widgets_notification_get_type (void)
{
	static GType tuba_widgets_notification_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_widgets_notification_type_id__once)) {
		GType tuba_widgets_notification_type_id;
		tuba_widgets_notification_type_id = tuba_widgets_notification_get_type_once ();
		g_once_init_leave_pointer (&tuba_widgets_notification_type_id__once, tuba_widgets_notification_type_id);
	}
	return tuba_widgets_notification_type_id__once;
}

static void
_vala_tuba_widgets_notification_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec)
{
	TubaWidgetsNotification * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_WIDGETS_TYPE_NOTIFICATION, TubaWidgetsNotification);
	switch (property_id) {
		case TUBA_WIDGETS_NOTIFICATION_NOTIFICATION_PROPERTY:
		g_value_set_object (value, tuba_widgets_notification_get_notification (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_widgets_notification_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec)
{
	TubaWidgetsNotification * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_WIDGETS_TYPE_NOTIFICATION, TubaWidgetsNotification);
	switch (property_id) {
		case TUBA_WIDGETS_NOTIFICATION_NOTIFICATION_PROPERTY:
		tuba_widgets_notification_set_notification (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

