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

#include <glib-object.h>
#include "libdino.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include "xmpp-vala.h"
#include <gtk/gtk.h>
#include <float.h>
#include <math.h>
#include "dino_i18n.h"
#include <gio/gio.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 DINO_UI_CONVERSATION_SUMMARY_TYPE_CHAT_STATE_POPULATOR (dino_ui_conversation_summary_chat_state_populator_get_type ())
#define DINO_UI_CONVERSATION_SUMMARY_CHAT_STATE_POPULATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CHAT_STATE_POPULATOR, DinoUiConversationSummaryChatStatePopulator))
#define DINO_UI_CONVERSATION_SUMMARY_CHAT_STATE_POPULATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_CHAT_STATE_POPULATOR, DinoUiConversationSummaryChatStatePopulatorClass))
#define DINO_UI_CONVERSATION_SUMMARY_IS_CHAT_STATE_POPULATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CHAT_STATE_POPULATOR))
#define DINO_UI_CONVERSATION_SUMMARY_IS_CHAT_STATE_POPULATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_CHAT_STATE_POPULATOR))
#define DINO_UI_CONVERSATION_SUMMARY_CHAT_STATE_POPULATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CHAT_STATE_POPULATOR, DinoUiConversationSummaryChatStatePopulatorClass))

typedef struct _DinoUiConversationSummaryChatStatePopulator DinoUiConversationSummaryChatStatePopulator;
typedef struct _DinoUiConversationSummaryChatStatePopulatorClass DinoUiConversationSummaryChatStatePopulatorClass;
typedef struct _DinoUiConversationSummaryChatStatePopulatorPrivate DinoUiConversationSummaryChatStatePopulatorPrivate;

#define DINO_UI_CONVERSATION_SUMMARY_TYPE_META_CHAT_STATE_ITEM (dino_ui_conversation_summary_meta_chat_state_item_get_type ())
#define DINO_UI_CONVERSATION_SUMMARY_META_CHAT_STATE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_META_CHAT_STATE_ITEM, DinoUiConversationSummaryMetaChatStateItem))
#define DINO_UI_CONVERSATION_SUMMARY_META_CHAT_STATE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_META_CHAT_STATE_ITEM, DinoUiConversationSummaryMetaChatStateItemClass))
#define DINO_UI_CONVERSATION_SUMMARY_IS_META_CHAT_STATE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_META_CHAT_STATE_ITEM))
#define DINO_UI_CONVERSATION_SUMMARY_IS_META_CHAT_STATE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_META_CHAT_STATE_ITEM))
#define DINO_UI_CONVERSATION_SUMMARY_META_CHAT_STATE_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_META_CHAT_STATE_ITEM, DinoUiConversationSummaryMetaChatStateItemClass))

typedef struct _DinoUiConversationSummaryMetaChatStateItem DinoUiConversationSummaryMetaChatStateItem;
typedef struct _DinoUiConversationSummaryMetaChatStateItemClass DinoUiConversationSummaryMetaChatStateItemClass;
enum  {
	DINO_UI_CONVERSATION_SUMMARY_CHAT_STATE_POPULATOR_0_PROPERTY,
	DINO_UI_CONVERSATION_SUMMARY_CHAT_STATE_POPULATOR_ID_PROPERTY,
	DINO_UI_CONVERSATION_SUMMARY_CHAT_STATE_POPULATOR_NUM_PROPERTIES
};
static GParamSpec* dino_ui_conversation_summary_chat_state_populator_properties[DINO_UI_CONVERSATION_SUMMARY_CHAT_STATE_POPULATOR_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _DinoUiConversationSummaryMetaChatStateItemPrivate DinoUiConversationSummaryMetaChatStateItemPrivate;

#define DINO_UI_TYPE_AVATAR_PICTURE (dino_ui_avatar_picture_get_type ())
#define DINO_UI_AVATAR_PICTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPicture))
#define DINO_UI_AVATAR_PICTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPictureClass))
#define DINO_UI_IS_AVATAR_PICTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_AVATAR_PICTURE))
#define DINO_UI_IS_AVATAR_PICTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_AVATAR_PICTURE))
#define DINO_UI_AVATAR_PICTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPictureClass))

typedef struct _DinoUiAvatarPicture DinoUiAvatarPicture;
typedef struct _DinoUiAvatarPictureClass DinoUiAvatarPictureClass;
enum  {
	DINO_UI_CONVERSATION_SUMMARY_META_CHAT_STATE_ITEM_0_PROPERTY,
	DINO_UI_CONVERSATION_SUMMARY_META_CHAT_STATE_ITEM_TIME_PROPERTY,
	DINO_UI_CONVERSATION_SUMMARY_META_CHAT_STATE_ITEM_NUM_PROPERTIES
};
static GParamSpec* dino_ui_conversation_summary_meta_chat_state_item_properties[DINO_UI_CONVERSATION_SUMMARY_META_CHAT_STATE_ITEM_NUM_PROPERTIES];
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _xmpp_jid_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_jid_unref (var), NULL)))

#define DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL (dino_ui_view_model_avatar_picture_model_get_type ())
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModel))
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModelClass))
#define DINO_UI_VIEW_MODEL_IS_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_IS_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModelClass))

typedef struct _DinoUiViewModelAvatarPictureModel DinoUiViewModelAvatarPictureModel;
typedef struct _DinoUiViewModelAvatarPictureModelClass DinoUiViewModelAvatarPictureModelClass;

#define DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL (dino_ui_view_model_compat_avatar_picture_model_get_type ())
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModel))
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModelClass))
#define DINO_UI_VIEW_MODEL_IS_COMPAT_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_IS_COMPAT_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModelClass))

typedef struct _DinoUiViewModelCompatAvatarPictureModel DinoUiViewModelCompatAvatarPictureModel;
typedef struct _DinoUiViewModelCompatAvatarPictureModelClass DinoUiViewModelCompatAvatarPictureModelClass;

struct _DinoUiConversationSummaryChatStatePopulator {
	GObject parent_instance;
	DinoUiConversationSummaryChatStatePopulatorPrivate * priv;
};

struct _DinoUiConversationSummaryChatStatePopulatorClass {
	GObjectClass parent_class;
};

struct _DinoUiConversationSummaryChatStatePopulatorPrivate {
	DinoStreamInteractor* stream_interactor;
	DinoEntitiesConversation* current_conversation;
	DinoPluginsConversationItemCollection* item_collection;
	DinoUiConversationSummaryMetaChatStateItem* meta_item;
};

struct _DinoUiConversationSummaryMetaChatStateItem {
	DinoPluginsMetaConversationItem parent_instance;
	DinoUiConversationSummaryMetaChatStateItemPrivate * priv;
};

struct _DinoUiConversationSummaryMetaChatStateItemClass {
	DinoPluginsMetaConversationItemClass parent_class;
};

struct _DinoUiConversationSummaryMetaChatStateItemPrivate {
	GDateTime* _time;
	DinoStreamInteractor* stream_interactor;
	DinoEntitiesConversation* conversation;
	GeeList* jids;
	GtkLabel* label;
	DinoUiAvatarPicture* picture;
};

static gint DinoUiConversationSummaryChatStatePopulator_private_offset;
static gpointer dino_ui_conversation_summary_chat_state_populator_parent_class = NULL;
static DinoPluginsConversationItemPopulatorIface * dino_ui_conversation_summary_chat_state_populator_dino_plugins_conversation_item_populator_parent_iface = NULL;
static DinoPluginsConversationAdditionPopulatorIface * dino_ui_conversation_summary_chat_state_populator_dino_plugins_conversation_addition_populator_parent_iface = NULL;
static gint DinoUiConversationSummaryMetaChatStateItem_private_offset;
static gpointer dino_ui_conversation_summary_meta_chat_state_item_parent_class = NULL;

VALA_EXTERN GType dino_ui_conversation_summary_chat_state_populator_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSummaryChatStatePopulator, g_object_unref)
VALA_EXTERN GType dino_ui_conversation_summary_meta_chat_state_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSummaryMetaChatStateItem, g_object_unref)
VALA_EXTERN DinoUiConversationSummaryChatStatePopulator* dino_ui_conversation_summary_chat_state_populator_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiConversationSummaryChatStatePopulator* dino_ui_conversation_summary_chat_state_populator_construct (GType object_type,
                                                                                                          DinoStreamInteractor* stream_interactor);
static void __lambda120_ (DinoUiConversationSummaryChatStatePopulator* self,
                   DinoEntitiesConversation* conversation,
                   const gchar* state);
static void dino_ui_conversation_summary_chat_state_populator_update_chat_state (DinoUiConversationSummaryChatStatePopulator* self);
static void ___lambda120__dino_counterpart_interaction_manager_received_state (DinoCounterpartInteractionManager* _sender,
                                                                        DinoEntitiesConversation* conversation,
                                                                        const gchar* state,
                                                                        gpointer self);
static void __lambda121_ (DinoUiConversationSummaryChatStatePopulator* self,
                   DinoEntitiesMessage* message,
                   DinoEntitiesConversation* conversation);
static void ___lambda121__dino_message_processor_message_sent (DinoMessageProcessor* _sender,
                                                        DinoEntitiesMessage* message,
                                                        DinoEntitiesConversation* conversation,
                                                        gpointer self);
static void dino_ui_conversation_summary_chat_state_populator_real_init (DinoPluginsConversationItemPopulator* base,
                                                                  DinoEntitiesConversation* conversation,
                                                                  DinoPluginsConversationItemCollection* item_collection,
                                                                  DinoPluginsWidgetType type);
static void dino_ui_conversation_summary_chat_state_populator_real_close (DinoPluginsConversationItemPopulator* base,
                                                                   DinoEntitiesConversation* conversation);
static void dino_ui_conversation_summary_chat_state_populator_real_populate_timespan (DinoPluginsConversationAdditionPopulator* base,
                                                                               DinoEntitiesConversation* conversation,
                                                                               GDateTime* from,
                                                                               GDateTime* to);
VALA_EXTERN void dino_ui_conversation_summary_meta_chat_state_item_set_new (DinoUiConversationSummaryMetaChatStateItem* self,
                                                                GeeList* jids);
VALA_EXTERN DinoUiConversationSummaryMetaChatStateItem* dino_ui_conversation_summary_meta_chat_state_item_new (DinoStreamInteractor* stream_interactor,
                                                                                                   DinoEntitiesConversation* conversation,
                                                                                                   GeeList* jids);
VALA_EXTERN DinoUiConversationSummaryMetaChatStateItem* dino_ui_conversation_summary_meta_chat_state_item_construct (GType object_type,
                                                                                                         DinoStreamInteractor* stream_interactor,
                                                                                                         DinoEntitiesConversation* conversation,
                                                                                                         GeeList* jids);
static void dino_ui_conversation_summary_chat_state_populator_finalize (GObject * obj);
static GType dino_ui_conversation_summary_chat_state_populator_get_type_once (void);
static void _vala_dino_ui_conversation_summary_chat_state_populator_get_property (GObject * object,
                                                                           guint property_id,
                                                                           GValue * value,
                                                                           GParamSpec * pspec);
VALA_EXTERN GType dino_ui_avatar_picture_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiAvatarPicture, g_object_unref)
static GObject* dino_ui_conversation_summary_meta_chat_state_item_real_get_widget (DinoPluginsMetaConversationItem* base,
                                                                            DinoPluginsConversationItemWidgetInterface* outer,
                                                                            DinoPluginsWidgetType widget_type);
VALA_EXTERN DinoUiAvatarPicture* dino_ui_avatar_picture_new (void);
VALA_EXTERN DinoUiAvatarPicture* dino_ui_avatar_picture_construct (GType object_type);
static void dino_ui_conversation_summary_meta_chat_state_item_update (DinoUiConversationSummaryMetaChatStateItem* self);
static GeeList* dino_ui_conversation_summary_meta_chat_state_item_real_get_item_actions (DinoPluginsMetaConversationItem* base,
                                                                                  DinoPluginsWidgetType type);
VALA_EXTERN gchar* dino_ui_util_get_participant_display_name (DinoStreamInteractor* stream_interactor,
                                                  DinoEntitiesConversation* conversation,
                                                  XmppJid* participant,
                                                  gboolean me_is_me);
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_construct (GType object_type,
                                                                                                   DinoStreamInteractor* stream_interactor);
VALA_EXTERN GType dino_ui_view_model_avatar_picture_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelAvatarPictureModel, g_object_unref)
VALA_EXTERN GType dino_ui_view_model_compat_avatar_picture_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelCompatAvatarPictureModel, g_object_unref)
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_add_participant (DinoUiViewModelCompatAvatarPictureModel* self,
                                                                                                         DinoEntitiesConversation* conversation,
                                                                                                         XmppJid* jid);
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_add (DinoUiViewModelCompatAvatarPictureModel* self,
                                                                                             const gchar* display,
                                                                                             const gchar* color_id,
                                                                                             GFile* image_file);
VALA_EXTERN void dino_ui_avatar_picture_set_model (DinoUiAvatarPicture* self,
                                       DinoUiViewModelAvatarPictureModel* value);
static void dino_ui_conversation_summary_meta_chat_state_item_finalize (GObject * obj);
static GType dino_ui_conversation_summary_meta_chat_state_item_get_type_once (void);
static void _vala_dino_ui_conversation_summary_meta_chat_state_item_get_property (GObject * object,
                                                                           guint property_id,
                                                                           GValue * value,
                                                                           GParamSpec * pspec);
static void _vala_dino_ui_conversation_summary_meta_chat_state_item_set_property (GObject * object,
                                                                           guint property_id,
                                                                           const GValue * value,
                                                                           GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
dino_ui_conversation_summary_chat_state_populator_get_instance_private (DinoUiConversationSummaryChatStatePopulator* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiConversationSummaryChatStatePopulator_private_offset);
}

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

static void
__lambda120_ (DinoUiConversationSummaryChatStatePopulator* self,
              DinoEntitiesConversation* conversation,
              const gchar* state)
{
	gboolean _tmp0_ = FALSE;
	DinoEntitiesConversation* _tmp1_;
	g_return_if_fail (conversation != NULL);
	g_return_if_fail (state != NULL);
	_tmp1_ = self->priv->current_conversation;
	if (_tmp1_ != NULL) {
		DinoEntitiesConversation* _tmp2_;
		_tmp2_ = self->priv->current_conversation;
		_tmp0_ = dino_entities_conversation_equals (_tmp2_, conversation);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		dino_ui_conversation_summary_chat_state_populator_update_chat_state (self);
	}
}

static void
___lambda120__dino_counterpart_interaction_manager_received_state (DinoCounterpartInteractionManager* _sender,
                                                                   DinoEntitiesConversation* conversation,
                                                                   const gchar* state,
                                                                   gpointer self)
{
	__lambda120_ ((DinoUiConversationSummaryChatStatePopulator*) self, conversation, state);
}

static void
__lambda121_ (DinoUiConversationSummaryChatStatePopulator* self,
              DinoEntitiesMessage* message,
              DinoEntitiesConversation* conversation)
{
	DinoEntitiesConversation* _tmp0_;
	g_return_if_fail (message != NULL);
	g_return_if_fail (conversation != NULL);
	_tmp0_ = self->priv->current_conversation;
	if (dino_entities_conversation_equals (conversation, _tmp0_)) {
		dino_ui_conversation_summary_chat_state_populator_update_chat_state (self);
	}
}

static void
___lambda121__dino_message_processor_message_sent (DinoMessageProcessor* _sender,
                                                   DinoEntitiesMessage* message,
                                                   DinoEntitiesConversation* conversation,
                                                   gpointer self)
{
	__lambda121_ ((DinoUiConversationSummaryChatStatePopulator*) self, message, conversation);
}

DinoUiConversationSummaryChatStatePopulator*
dino_ui_conversation_summary_chat_state_populator_construct (GType object_type,
                                                             DinoStreamInteractor* stream_interactor)
{
	DinoUiConversationSummaryChatStatePopulator * self = NULL;
	DinoStreamInteractor* _tmp0_;
	DinoModuleIdentity* _tmp1_;
	gpointer _tmp2_;
	DinoCounterpartInteractionManager* _tmp3_;
	DinoModuleIdentity* _tmp4_;
	gpointer _tmp5_;
	DinoMessageProcessor* _tmp6_;
	g_return_val_if_fail (stream_interactor != NULL, NULL);
	self = (DinoUiConversationSummaryChatStatePopulator*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (stream_interactor);
	_g_object_unref0 (self->priv->stream_interactor);
	self->priv->stream_interactor = _tmp0_;
	_tmp1_ = dino_counterpart_interaction_manager_IDENTITY;
	_tmp2_ = dino_stream_interactor_get_module (stream_interactor, DINO_TYPE_COUNTERPART_INTERACTION_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp1_);
	_tmp3_ = (DinoCounterpartInteractionManager*) _tmp2_;
	g_signal_connect_object (_tmp3_, "received-state", (GCallback) ___lambda120__dino_counterpart_interaction_manager_received_state, self, 0);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = dino_message_processor_IDENTITY;
	_tmp5_ = dino_stream_interactor_get_module (stream_interactor, DINO_TYPE_MESSAGE_PROCESSOR, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp4_);
	_tmp6_ = (DinoMessageProcessor*) _tmp5_;
	g_signal_connect_object (_tmp6_, "message-sent", (GCallback) ___lambda121__dino_message_processor_message_sent, self, 0);
	_g_object_unref0 (_tmp6_);
	return self;
}

DinoUiConversationSummaryChatStatePopulator*
dino_ui_conversation_summary_chat_state_populator_new (DinoStreamInteractor* stream_interactor)
{
	return dino_ui_conversation_summary_chat_state_populator_construct (DINO_UI_CONVERSATION_SUMMARY_TYPE_CHAT_STATE_POPULATOR, stream_interactor);
}

static void
dino_ui_conversation_summary_chat_state_populator_real_init (DinoPluginsConversationItemPopulator* base,
                                                             DinoEntitiesConversation* conversation,
                                                             DinoPluginsConversationItemCollection* item_collection,
                                                             DinoPluginsWidgetType type)
{
	DinoUiConversationSummaryChatStatePopulator * self;
	DinoEntitiesConversation* _tmp0_;
	DinoPluginsConversationItemCollection* _tmp1_;
	self = (DinoUiConversationSummaryChatStatePopulator*) base;
	g_return_if_fail (conversation != NULL);
	g_return_if_fail (item_collection != NULL);
	_tmp0_ = _g_object_ref0 (conversation);
	_g_object_unref0 (self->priv->current_conversation);
	self->priv->current_conversation = _tmp0_;
	_tmp1_ = _g_object_ref0 (item_collection);
	_g_object_unref0 (self->priv->item_collection);
	self->priv->item_collection = _tmp1_;
	_g_object_unref0 (self->priv->meta_item);
	self->priv->meta_item = NULL;
	dino_ui_conversation_summary_chat_state_populator_update_chat_state (self);
}

static void
dino_ui_conversation_summary_chat_state_populator_real_close (DinoPluginsConversationItemPopulator* base,
                                                              DinoEntitiesConversation* conversation)
{
	DinoUiConversationSummaryChatStatePopulator * self;
	self = (DinoUiConversationSummaryChatStatePopulator*) base;
	g_return_if_fail (conversation != NULL);
}

static void
dino_ui_conversation_summary_chat_state_populator_real_populate_timespan (DinoPluginsConversationAdditionPopulator* base,
                                                                          DinoEntitiesConversation* conversation,
                                                                          GDateTime* from,
                                                                          GDateTime* to)
{
	DinoUiConversationSummaryChatStatePopulator * self;
	self = (DinoUiConversationSummaryChatStatePopulator*) base;
	g_return_if_fail (conversation != NULL);
	g_return_if_fail (from != NULL);
	g_return_if_fail (to != NULL);
}

static void
dino_ui_conversation_summary_chat_state_populator_update_chat_state (DinoUiConversationSummaryChatStatePopulator* self)
{
	GeeList* typing_jids = NULL;
	DinoStreamInteractor* _tmp0_;
	DinoModuleIdentity* _tmp1_;
	gpointer _tmp2_;
	DinoCounterpartInteractionManager* _tmp3_;
	DinoEntitiesConversation* _tmp4_;
	GeeList* _tmp5_;
	GeeList* _tmp6_;
	gboolean _tmp7_ = FALSE;
	DinoUiConversationSummaryMetaChatStateItem* _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->stream_interactor;
	_tmp1_ = dino_counterpart_interaction_manager_IDENTITY;
	_tmp2_ = dino_stream_interactor_get_module (_tmp0_, DINO_TYPE_COUNTERPART_INTERACTION_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp1_);
	_tmp3_ = (DinoCounterpartInteractionManager*) _tmp2_;
	_tmp4_ = self->priv->current_conversation;
	_tmp5_ = dino_counterpart_interaction_manager_get_typing_jids (_tmp3_, _tmp4_);
	_tmp6_ = _tmp5_;
	_g_object_unref0 (_tmp3_);
	typing_jids = _tmp6_;
	_tmp8_ = self->priv->meta_item;
	if (_tmp8_ != NULL) {
		GeeList* _tmp9_;
		_tmp9_ = typing_jids;
		_tmp7_ = _tmp9_ == NULL;
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		DinoPluginsConversationItemCollection* _tmp10_;
		DinoUiConversationSummaryMetaChatStateItem* _tmp11_;
		_tmp10_ = self->priv->item_collection;
		_tmp11_ = self->priv->meta_item;
		dino_plugins_conversation_item_collection_remove_item (_tmp10_, (DinoPluginsMetaConversationItem*) _tmp11_);
		_g_object_unref0 (self->priv->meta_item);
		self->priv->meta_item = NULL;
	} else {
		gboolean _tmp12_ = FALSE;
		DinoUiConversationSummaryMetaChatStateItem* _tmp13_;
		_tmp13_ = self->priv->meta_item;
		if (_tmp13_ != NULL) {
			GeeList* _tmp14_;
			_tmp14_ = typing_jids;
			_tmp12_ = _tmp14_ != NULL;
		} else {
			_tmp12_ = FALSE;
		}
		if (_tmp12_) {
			DinoUiConversationSummaryMetaChatStateItem* _tmp15_;
			GeeList* _tmp16_;
			_tmp15_ = self->priv->meta_item;
			_tmp16_ = typing_jids;
			dino_ui_conversation_summary_meta_chat_state_item_set_new (_tmp15_, _tmp16_);
		} else {
			GeeList* _tmp17_;
			_tmp17_ = typing_jids;
			if (_tmp17_ != NULL) {
				DinoStreamInteractor* _tmp18_;
				DinoEntitiesConversation* _tmp19_;
				GeeList* _tmp20_;
				DinoUiConversationSummaryMetaChatStateItem* _tmp21_;
				DinoPluginsConversationItemCollection* _tmp22_;
				DinoUiConversationSummaryMetaChatStateItem* _tmp23_;
				_tmp18_ = self->priv->stream_interactor;
				_tmp19_ = self->priv->current_conversation;
				_tmp20_ = typing_jids;
				_tmp21_ = dino_ui_conversation_summary_meta_chat_state_item_new (_tmp18_, _tmp19_, _tmp20_);
				_g_object_unref0 (self->priv->meta_item);
				self->priv->meta_item = _tmp21_;
				_tmp22_ = self->priv->item_collection;
				_tmp23_ = self->priv->meta_item;
				dino_plugins_conversation_item_collection_insert_item (_tmp22_, (DinoPluginsMetaConversationItem*) _tmp23_);
			}
		}
	}
	_g_object_unref0 (typing_jids);
}

static const gchar*
dino_ui_conversation_summary_chat_state_populator_real_get_id (DinoPluginsConversationItemPopulator* base)
{
	const gchar* result;
	DinoUiConversationSummaryChatStatePopulator* self;
	self = (DinoUiConversationSummaryChatStatePopulator*) base;
	result = "chat_state";
	return result;
}

static void
dino_ui_conversation_summary_chat_state_populator_class_init (DinoUiConversationSummaryChatStatePopulatorClass * klass,
                                                              gpointer klass_data)
{
	dino_ui_conversation_summary_chat_state_populator_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiConversationSummaryChatStatePopulator_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_ui_conversation_summary_chat_state_populator_get_property;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_conversation_summary_chat_state_populator_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_CONVERSATION_SUMMARY_CHAT_STATE_POPULATOR_ID_PROPERTY, dino_ui_conversation_summary_chat_state_populator_properties[DINO_UI_CONVERSATION_SUMMARY_CHAT_STATE_POPULATOR_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
dino_ui_conversation_summary_chat_state_populator_dino_plugins_conversation_item_populator_interface_init (DinoPluginsConversationItemPopulatorIface * iface,
                                                                                                           gpointer iface_data)
{
	dino_ui_conversation_summary_chat_state_populator_dino_plugins_conversation_item_populator_parent_iface = g_type_interface_peek_parent (iface);
	iface->init = (void (*) (DinoPluginsConversationItemPopulator*, DinoEntitiesConversation*, DinoPluginsConversationItemCollection*, DinoPluginsWidgetType)) dino_ui_conversation_summary_chat_state_populator_real_init;
	iface->close = (void (*) (DinoPluginsConversationItemPopulator*, DinoEntitiesConversation*)) dino_ui_conversation_summary_chat_state_populator_real_close;
	iface->get_id = dino_ui_conversation_summary_chat_state_populator_real_get_id;
}

static void
dino_ui_conversation_summary_chat_state_populator_dino_plugins_conversation_addition_populator_interface_init (DinoPluginsConversationAdditionPopulatorIface * iface,
                                                                                                               gpointer iface_data)
{
	dino_ui_conversation_summary_chat_state_populator_dino_plugins_conversation_addition_populator_parent_iface = g_type_interface_peek_parent (iface);
	iface->populate_timespan = (void (*) (DinoPluginsConversationAdditionPopulator*, DinoEntitiesConversation*, GDateTime*, GDateTime*)) dino_ui_conversation_summary_chat_state_populator_real_populate_timespan;
}

static void
dino_ui_conversation_summary_chat_state_populator_instance_init (DinoUiConversationSummaryChatStatePopulator * self,
                                                                 gpointer klass)
{
	self->priv = dino_ui_conversation_summary_chat_state_populator_get_instance_private (self);
}

static void
dino_ui_conversation_summary_chat_state_populator_finalize (GObject * obj)
{
	DinoUiConversationSummaryChatStatePopulator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_CONVERSATION_SUMMARY_TYPE_CHAT_STATE_POPULATOR, DinoUiConversationSummaryChatStatePopulator);
	_g_object_unref0 (self->priv->stream_interactor);
	_g_object_unref0 (self->priv->current_conversation);
	_g_object_unref0 (self->priv->item_collection);
	_g_object_unref0 (self->priv->meta_item);
	G_OBJECT_CLASS (dino_ui_conversation_summary_chat_state_populator_parent_class)->finalize (obj);
}

static GType
dino_ui_conversation_summary_chat_state_populator_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiConversationSummaryChatStatePopulatorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_conversation_summary_chat_state_populator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiConversationSummaryChatStatePopulator), 0, (GInstanceInitFunc) dino_ui_conversation_summary_chat_state_populator_instance_init, NULL };
	static const GInterfaceInfo dino_plugins_conversation_item_populator_info = { (GInterfaceInitFunc) dino_ui_conversation_summary_chat_state_populator_dino_plugins_conversation_item_populator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo dino_plugins_conversation_addition_populator_info = { (GInterfaceInitFunc) dino_ui_conversation_summary_chat_state_populator_dino_plugins_conversation_addition_populator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType dino_ui_conversation_summary_chat_state_populator_type_id;
	dino_ui_conversation_summary_chat_state_populator_type_id = g_type_register_static (G_TYPE_OBJECT, "DinoUiConversationSummaryChatStatePopulator", &g_define_type_info, 0);
	g_type_add_interface_static (dino_ui_conversation_summary_chat_state_populator_type_id, DINO_PLUGINS_TYPE_CONVERSATION_ITEM_POPULATOR, &dino_plugins_conversation_item_populator_info);
	g_type_add_interface_static (dino_ui_conversation_summary_chat_state_populator_type_id, DINO_PLUGINS_TYPE_CONVERSATION_ADDITION_POPULATOR, &dino_plugins_conversation_addition_populator_info);
	DinoUiConversationSummaryChatStatePopulator_private_offset = g_type_add_instance_private (dino_ui_conversation_summary_chat_state_populator_type_id, sizeof (DinoUiConversationSummaryChatStatePopulatorPrivate));
	return dino_ui_conversation_summary_chat_state_populator_type_id;
}

GType
dino_ui_conversation_summary_chat_state_populator_get_type (void)
{
	static volatile gsize dino_ui_conversation_summary_chat_state_populator_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_conversation_summary_chat_state_populator_type_id__once)) {
		GType dino_ui_conversation_summary_chat_state_populator_type_id;
		dino_ui_conversation_summary_chat_state_populator_type_id = dino_ui_conversation_summary_chat_state_populator_get_type_once ();
		g_once_init_leave (&dino_ui_conversation_summary_chat_state_populator_type_id__once, dino_ui_conversation_summary_chat_state_populator_type_id);
	}
	return dino_ui_conversation_summary_chat_state_populator_type_id__once;
}

static void
_vala_dino_ui_conversation_summary_chat_state_populator_get_property (GObject * object,
                                                                      guint property_id,
                                                                      GValue * value,
                                                                      GParamSpec * pspec)
{
	DinoUiConversationSummaryChatStatePopulator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_CONVERSATION_SUMMARY_TYPE_CHAT_STATE_POPULATOR, DinoUiConversationSummaryChatStatePopulator);
	switch (property_id) {
		case DINO_UI_CONVERSATION_SUMMARY_CHAT_STATE_POPULATOR_ID_PROPERTY:
		g_value_set_string (value, dino_plugins_conversation_item_populator_get_id ((DinoPluginsConversationItemPopulator*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
dino_ui_conversation_summary_meta_chat_state_item_get_instance_private (DinoUiConversationSummaryMetaChatStateItem* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiConversationSummaryMetaChatStateItem_private_offset);
}

DinoUiConversationSummaryMetaChatStateItem*
dino_ui_conversation_summary_meta_chat_state_item_construct (GType object_type,
                                                             DinoStreamInteractor* stream_interactor,
                                                             DinoEntitiesConversation* conversation,
                                                             GeeList* jids)
{
	DinoUiConversationSummaryMetaChatStateItem * self = NULL;
	DinoStreamInteractor* _tmp0_;
	DinoEntitiesConversation* _tmp1_;
	GeeList* _tmp2_;
	g_return_val_if_fail (stream_interactor != NULL, NULL);
	g_return_val_if_fail (conversation != NULL, NULL);
	g_return_val_if_fail (jids != NULL, NULL);
	self = (DinoUiConversationSummaryMetaChatStateItem*) dino_plugins_meta_conversation_item_construct (object_type);
	_tmp0_ = _g_object_ref0 (stream_interactor);
	_g_object_unref0 (self->priv->stream_interactor);
	self->priv->stream_interactor = _tmp0_;
	_tmp1_ = _g_object_ref0 (conversation);
	_g_object_unref0 (self->priv->conversation);
	self->priv->conversation = _tmp1_;
	_tmp2_ = _g_object_ref0 (jids);
	_g_object_unref0 (self->priv->jids);
	self->priv->jids = _tmp2_;
	return self;
}

DinoUiConversationSummaryMetaChatStateItem*
dino_ui_conversation_summary_meta_chat_state_item_new (DinoStreamInteractor* stream_interactor,
                                                       DinoEntitiesConversation* conversation,
                                                       GeeList* jids)
{
	return dino_ui_conversation_summary_meta_chat_state_item_construct (DINO_UI_CONVERSATION_SUMMARY_TYPE_META_CHAT_STATE_ITEM, stream_interactor, conversation, jids);
}

static GObject*
dino_ui_conversation_summary_meta_chat_state_item_real_get_widget (DinoPluginsMetaConversationItem* base,
                                                                   DinoPluginsConversationItemWidgetInterface* outer,
                                                                   DinoPluginsWidgetType widget_type)
{
	DinoUiConversationSummaryMetaChatStateItem * self;
	GtkLabel* _tmp0_ = NULL;
	GtkLabel* _tmp1_;
	DinoUiAvatarPicture* _tmp2_ = NULL;
	GtkBox* image_content_box = NULL;
	GtkBox* _tmp3_;
	DinoUiAvatarPicture* _tmp4_;
	GtkLabel* _tmp5_;
	GObject* result;
	self = (DinoUiConversationSummaryMetaChatStateItem*) base;
	g_return_val_if_fail (outer != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new ("");
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->label);
	self->priv->label = _tmp0_;
	_tmp1_ = self->priv->label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp1_, "dim-label");
	_tmp2_ = dino_ui_avatar_picture_new ();
	gtk_widget_set_margin_top ((GtkWidget*) _tmp2_, 2);
	gtk_widget_set_valign ((GtkWidget*) _tmp2_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->picture);
	self->priv->picture = _tmp2_;
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
	g_object_ref_sink (_tmp3_);
	image_content_box = _tmp3_;
	_tmp4_ = self->priv->picture;
	gtk_box_append (image_content_box, (GtkWidget*) _tmp4_);
	_tmp5_ = self->priv->label;
	gtk_box_append (image_content_box, (GtkWidget*) _tmp5_);
	dino_ui_conversation_summary_meta_chat_state_item_update (self);
	result = (GObject*) image_content_box;
	return result;
}

static GeeList*
dino_ui_conversation_summary_meta_chat_state_item_real_get_item_actions (DinoPluginsMetaConversationItem* base,
                                                                         DinoPluginsWidgetType type)
{
	DinoUiConversationSummaryMetaChatStateItem * self;
	GeeList* result;
	self = (DinoUiConversationSummaryMetaChatStateItem*) base;
	result = NULL;
	return result;
}

void
dino_ui_conversation_summary_meta_chat_state_item_set_new (DinoUiConversationSummaryMetaChatStateItem* self,
                                                           GeeList* jids)
{
	GeeList* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (jids != NULL);
	_tmp0_ = _g_object_ref0 (jids);
	_g_object_unref0 (self->priv->jids);
	self->priv->jids = _tmp0_;
	dino_ui_conversation_summary_meta_chat_state_item_update (self);
}

static void
dino_ui_conversation_summary_meta_chat_state_item_update (DinoUiConversationSummaryMetaChatStateItem* self)
{
	gboolean _tmp0_ = FALSE;
	DinoUiAvatarPicture* _tmp1_;
	GeeList* display_names = NULL;
	GeeArrayList* _tmp3_;
	gchar* new_text = NULL;
	gchar* _tmp18_;
	GeeList* _tmp19_;
	gint _tmp20_;
	gint _tmp21_;
	GtkLabel* _tmp135_;
	const gchar* _tmp136_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->picture;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		GtkLabel* _tmp2_;
		_tmp2_ = self->priv->label;
		_tmp0_ = _tmp2_ == NULL;
	}
	if (_tmp0_) {
		return;
	}
	_tmp3_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	display_names = (GeeList*) _tmp3_;
	{
		GeeList* _jid_list = NULL;
		GeeList* _tmp4_;
		gint _jid_size = 0;
		GeeList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _jid_index = 0;
		_tmp4_ = self->priv->jids;
		_jid_list = _tmp4_;
		_tmp5_ = _jid_list;
		_tmp6_ = gee_collection_get_size ((GeeCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_jid_size = _tmp7_;
		_jid_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			XmppJid* jid = NULL;
			GeeList* _tmp10_;
			gpointer _tmp11_;
			GeeList* _tmp12_;
			DinoStreamInteractor* _tmp13_;
			DinoEntitiesConversation* _tmp14_;
			XmppJid* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			_jid_index = _jid_index + 1;
			_tmp8_ = _jid_index;
			_tmp9_ = _jid_size;
			if (!(_tmp8_ < _tmp9_)) {
				break;
			}
			_tmp10_ = _jid_list;
			_tmp11_ = gee_list_get (_tmp10_, _jid_index);
			jid = (XmppJid*) _tmp11_;
			_tmp12_ = display_names;
			_tmp13_ = self->priv->stream_interactor;
			_tmp14_ = self->priv->conversation;
			_tmp15_ = jid;
			_tmp16_ = dino_ui_util_get_participant_display_name (_tmp13_, _tmp14_, _tmp15_, FALSE);
			_tmp17_ = _tmp16_;
			gee_collection_add ((GeeCollection*) _tmp12_, _tmp17_);
			_g_free0 (_tmp17_);
			_xmpp_jid_unref0 (jid);
		}
	}
	_tmp18_ = g_strdup ("");
	new_text = _tmp18_;
	_tmp19_ = self->priv->jids;
	_tmp20_ = gee_collection_get_size ((GeeCollection*) _tmp19_);
	_tmp21_ = _tmp20_;
	if (_tmp21_ > 3) {
		const gchar* _tmp22_;
		GeeList* _tmp23_;
		gpointer _tmp24_;
		gchar* _tmp25_;
		GeeList* _tmp26_;
		gpointer _tmp27_;
		gchar* _tmp28_;
		GeeList* _tmp29_;
		gint _tmp30_;
		gint _tmp31_;
		gchar* _tmp32_;
		DinoUiAvatarPicture* _tmp33_;
		DinoStreamInteractor* _tmp34_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp35_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp36_;
		DinoEntitiesConversation* _tmp37_;
		GeeList* _tmp38_;
		gpointer _tmp39_;
		XmppJid* _tmp40_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp41_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp42_;
		DinoEntitiesConversation* _tmp43_;
		GeeList* _tmp44_;
		gpointer _tmp45_;
		XmppJid* _tmp46_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp47_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp48_;
		DinoEntitiesConversation* _tmp49_;
		GeeList* _tmp50_;
		gpointer _tmp51_;
		XmppJid* _tmp52_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp53_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp54_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp55_;
		DinoUiViewModelCompatAvatarPictureModel* _tmp56_;
		_tmp22_ = dino_gettext ("%s, %s and %i others are typing…");
		_tmp23_ = display_names;
		_tmp24_ = gee_list_get (_tmp23_, 0);
		_tmp25_ = (gchar*) _tmp24_;
		_tmp26_ = display_names;
		_tmp27_ = gee_list_get (_tmp26_, 1);
		_tmp28_ = (gchar*) _tmp27_;
		_tmp29_ = self->priv->jids;
		_tmp30_ = gee_collection_get_size ((GeeCollection*) _tmp29_);
		_tmp31_ = _tmp30_;
		_tmp32_ = g_strdup_printf (_tmp22_, _tmp25_, _tmp28_, _tmp31_ - 2);
		_g_free0 (new_text);
		new_text = _tmp32_;
		_g_free0 (_tmp28_);
		_g_free0 (_tmp25_);
		_tmp33_ = self->priv->picture;
		_tmp34_ = self->priv->stream_interactor;
		_tmp35_ = dino_ui_view_model_compat_avatar_picture_model_new (_tmp34_);
		_tmp36_ = _tmp35_;
		_tmp37_ = self->priv->conversation;
		_tmp38_ = self->priv->jids;
		_tmp39_ = gee_list_get (_tmp38_, 0);
		_tmp40_ = (XmppJid*) _tmp39_;
		_tmp41_ = dino_ui_view_model_compat_avatar_picture_model_add_participant (_tmp36_, _tmp37_, _tmp40_);
		_tmp42_ = _tmp41_;
		_tmp43_ = self->priv->conversation;
		_tmp44_ = self->priv->jids;
		_tmp45_ = gee_list_get (_tmp44_, 1);
		_tmp46_ = (XmppJid*) _tmp45_;
		_tmp47_ = dino_ui_view_model_compat_avatar_picture_model_add_participant (_tmp42_, _tmp43_, _tmp46_);
		_tmp48_ = _tmp47_;
		_tmp49_ = self->priv->conversation;
		_tmp50_ = self->priv->jids;
		_tmp51_ = gee_list_get (_tmp50_, 2);
		_tmp52_ = (XmppJid*) _tmp51_;
		_tmp53_ = dino_ui_view_model_compat_avatar_picture_model_add_participant (_tmp48_, _tmp49_, _tmp52_);
		_tmp54_ = _tmp53_;
		_tmp55_ = dino_ui_view_model_compat_avatar_picture_model_add (_tmp54_, "+", NULL, NULL);
		_tmp56_ = _tmp55_;
		dino_ui_avatar_picture_set_model (_tmp33_, (DinoUiViewModelAvatarPictureModel*) _tmp56_);
		_g_object_unref0 (_tmp56_);
		_g_object_unref0 (_tmp54_);
		_xmpp_jid_unref0 (_tmp52_);
		_g_object_unref0 (_tmp48_);
		_xmpp_jid_unref0 (_tmp46_);
		_g_object_unref0 (_tmp42_);
		_xmpp_jid_unref0 (_tmp40_);
		_g_object_unref0 (_tmp36_);
	} else {
		GeeList* _tmp57_;
		gint _tmp58_;
		gint _tmp59_;
		_tmp57_ = self->priv->jids;
		_tmp58_ = gee_collection_get_size ((GeeCollection*) _tmp57_);
		_tmp59_ = _tmp58_;
		if (_tmp59_ == 3) {
			const gchar* _tmp60_;
			GeeList* _tmp61_;
			gpointer _tmp62_;
			gchar* _tmp63_;
			GeeList* _tmp64_;
			gpointer _tmp65_;
			gchar* _tmp66_;
			GeeList* _tmp67_;
			gpointer _tmp68_;
			gchar* _tmp69_;
			gchar* _tmp70_;
			DinoUiAvatarPicture* _tmp71_;
			DinoStreamInteractor* _tmp72_;
			DinoUiViewModelCompatAvatarPictureModel* _tmp73_;
			DinoUiViewModelCompatAvatarPictureModel* _tmp74_;
			DinoEntitiesConversation* _tmp75_;
			GeeList* _tmp76_;
			gpointer _tmp77_;
			XmppJid* _tmp78_;
			DinoUiViewModelCompatAvatarPictureModel* _tmp79_;
			DinoUiViewModelCompatAvatarPictureModel* _tmp80_;
			DinoEntitiesConversation* _tmp81_;
			GeeList* _tmp82_;
			gpointer _tmp83_;
			XmppJid* _tmp84_;
			DinoUiViewModelCompatAvatarPictureModel* _tmp85_;
			DinoUiViewModelCompatAvatarPictureModel* _tmp86_;
			DinoEntitiesConversation* _tmp87_;
			GeeList* _tmp88_;
			gpointer _tmp89_;
			XmppJid* _tmp90_;
			DinoUiViewModelCompatAvatarPictureModel* _tmp91_;
			DinoUiViewModelCompatAvatarPictureModel* _tmp92_;
			_tmp60_ = dino_gettext ("%s, %s and %s are typing…");
			_tmp61_ = display_names;
			_tmp62_ = gee_list_get (_tmp61_, 0);
			_tmp63_ = (gchar*) _tmp62_;
			_tmp64_ = display_names;
			_tmp65_ = gee_list_get (_tmp64_, 1);
			_tmp66_ = (gchar*) _tmp65_;
			_tmp67_ = display_names;
			_tmp68_ = gee_list_get (_tmp67_, 2);
			_tmp69_ = (gchar*) _tmp68_;
			_tmp70_ = g_strdup_printf (_tmp60_, _tmp63_, _tmp66_, _tmp69_);
			_g_free0 (new_text);
			new_text = _tmp70_;
			_g_free0 (_tmp69_);
			_g_free0 (_tmp66_);
			_g_free0 (_tmp63_);
			_tmp71_ = self->priv->picture;
			_tmp72_ = self->priv->stream_interactor;
			_tmp73_ = dino_ui_view_model_compat_avatar_picture_model_new (_tmp72_);
			_tmp74_ = _tmp73_;
			_tmp75_ = self->priv->conversation;
			_tmp76_ = self->priv->jids;
			_tmp77_ = gee_list_get (_tmp76_, 0);
			_tmp78_ = (XmppJid*) _tmp77_;
			_tmp79_ = dino_ui_view_model_compat_avatar_picture_model_add_participant (_tmp74_, _tmp75_, _tmp78_);
			_tmp80_ = _tmp79_;
			_tmp81_ = self->priv->conversation;
			_tmp82_ = self->priv->jids;
			_tmp83_ = gee_list_get (_tmp82_, 1);
			_tmp84_ = (XmppJid*) _tmp83_;
			_tmp85_ = dino_ui_view_model_compat_avatar_picture_model_add_participant (_tmp80_, _tmp81_, _tmp84_);
			_tmp86_ = _tmp85_;
			_tmp87_ = self->priv->conversation;
			_tmp88_ = self->priv->jids;
			_tmp89_ = gee_list_get (_tmp88_, 2);
			_tmp90_ = (XmppJid*) _tmp89_;
			_tmp91_ = dino_ui_view_model_compat_avatar_picture_model_add_participant (_tmp86_, _tmp87_, _tmp90_);
			_tmp92_ = _tmp91_;
			dino_ui_avatar_picture_set_model (_tmp71_, (DinoUiViewModelAvatarPictureModel*) _tmp92_);
			_g_object_unref0 (_tmp92_);
			_xmpp_jid_unref0 (_tmp90_);
			_g_object_unref0 (_tmp86_);
			_xmpp_jid_unref0 (_tmp84_);
			_g_object_unref0 (_tmp80_);
			_xmpp_jid_unref0 (_tmp78_);
			_g_object_unref0 (_tmp74_);
		} else {
			GeeList* _tmp93_;
			gint _tmp94_;
			gint _tmp95_;
			_tmp93_ = self->priv->jids;
			_tmp94_ = gee_collection_get_size ((GeeCollection*) _tmp93_);
			_tmp95_ = _tmp94_;
			if (_tmp95_ == 2) {
				const gchar* _tmp96_;
				GeeList* _tmp97_;
				gpointer _tmp98_;
				gchar* _tmp99_;
				GeeList* _tmp100_;
				gpointer _tmp101_;
				gchar* _tmp102_;
				gchar* _tmp103_;
				DinoUiAvatarPicture* _tmp104_;
				DinoStreamInteractor* _tmp105_;
				DinoUiViewModelCompatAvatarPictureModel* _tmp106_;
				DinoUiViewModelCompatAvatarPictureModel* _tmp107_;
				DinoEntitiesConversation* _tmp108_;
				GeeList* _tmp109_;
				gpointer _tmp110_;
				XmppJid* _tmp111_;
				DinoUiViewModelCompatAvatarPictureModel* _tmp112_;
				DinoUiViewModelCompatAvatarPictureModel* _tmp113_;
				DinoEntitiesConversation* _tmp114_;
				GeeList* _tmp115_;
				gpointer _tmp116_;
				XmppJid* _tmp117_;
				DinoUiViewModelCompatAvatarPictureModel* _tmp118_;
				DinoUiViewModelCompatAvatarPictureModel* _tmp119_;
				_tmp96_ = dino_gettext ("%s and %s are typing…");
				_tmp97_ = display_names;
				_tmp98_ = gee_list_get (_tmp97_, 0);
				_tmp99_ = (gchar*) _tmp98_;
				_tmp100_ = display_names;
				_tmp101_ = gee_list_get (_tmp100_, 1);
				_tmp102_ = (gchar*) _tmp101_;
				_tmp103_ = g_strdup_printf (_tmp96_, _tmp99_, _tmp102_);
				_g_free0 (new_text);
				new_text = _tmp103_;
				_g_free0 (_tmp102_);
				_g_free0 (_tmp99_);
				_tmp104_ = self->priv->picture;
				_tmp105_ = self->priv->stream_interactor;
				_tmp106_ = dino_ui_view_model_compat_avatar_picture_model_new (_tmp105_);
				_tmp107_ = _tmp106_;
				_tmp108_ = self->priv->conversation;
				_tmp109_ = self->priv->jids;
				_tmp110_ = gee_list_get (_tmp109_, 0);
				_tmp111_ = (XmppJid*) _tmp110_;
				_tmp112_ = dino_ui_view_model_compat_avatar_picture_model_add_participant (_tmp107_, _tmp108_, _tmp111_);
				_tmp113_ = _tmp112_;
				_tmp114_ = self->priv->conversation;
				_tmp115_ = self->priv->jids;
				_tmp116_ = gee_list_get (_tmp115_, 1);
				_tmp117_ = (XmppJid*) _tmp116_;
				_tmp118_ = dino_ui_view_model_compat_avatar_picture_model_add_participant (_tmp113_, _tmp114_, _tmp117_);
				_tmp119_ = _tmp118_;
				dino_ui_avatar_picture_set_model (_tmp104_, (DinoUiViewModelAvatarPictureModel*) _tmp119_);
				_g_object_unref0 (_tmp119_);
				_xmpp_jid_unref0 (_tmp117_);
				_g_object_unref0 (_tmp113_);
				_xmpp_jid_unref0 (_tmp111_);
				_g_object_unref0 (_tmp107_);
			} else {
				const gchar* _tmp120_;
				GeeList* _tmp121_;
				gpointer _tmp122_;
				gchar* _tmp123_;
				gchar* _tmp124_;
				DinoUiAvatarPicture* _tmp125_;
				DinoStreamInteractor* _tmp126_;
				DinoUiViewModelCompatAvatarPictureModel* _tmp127_;
				DinoUiViewModelCompatAvatarPictureModel* _tmp128_;
				DinoEntitiesConversation* _tmp129_;
				GeeList* _tmp130_;
				gpointer _tmp131_;
				XmppJid* _tmp132_;
				DinoUiViewModelCompatAvatarPictureModel* _tmp133_;
				DinoUiViewModelCompatAvatarPictureModel* _tmp134_;
				_tmp120_ = dino_gettext ("%s is typing…");
				_tmp121_ = display_names;
				_tmp122_ = gee_list_get (_tmp121_, 0);
				_tmp123_ = (gchar*) _tmp122_;
				_tmp124_ = g_strdup_printf (_tmp120_, _tmp123_);
				_g_free0 (new_text);
				new_text = _tmp124_;
				_g_free0 (_tmp123_);
				_tmp125_ = self->priv->picture;
				_tmp126_ = self->priv->stream_interactor;
				_tmp127_ = dino_ui_view_model_compat_avatar_picture_model_new (_tmp126_);
				_tmp128_ = _tmp127_;
				_tmp129_ = self->priv->conversation;
				_tmp130_ = self->priv->jids;
				_tmp131_ = gee_list_get (_tmp130_, 0);
				_tmp132_ = (XmppJid*) _tmp131_;
				_tmp133_ = dino_ui_view_model_compat_avatar_picture_model_add_participant (_tmp128_, _tmp129_, _tmp132_);
				_tmp134_ = _tmp133_;
				dino_ui_avatar_picture_set_model (_tmp125_, (DinoUiViewModelAvatarPictureModel*) _tmp134_);
				_g_object_unref0 (_tmp134_);
				_xmpp_jid_unref0 (_tmp132_);
				_g_object_unref0 (_tmp128_);
			}
		}
	}
	_tmp135_ = self->priv->label;
	_tmp136_ = new_text;
	gtk_label_set_label (_tmp135_, _tmp136_);
	_g_free0 (new_text);
	_g_object_unref0 (display_names);
}

static GDateTime*
dino_ui_conversation_summary_meta_chat_state_item_real_get_time (DinoPluginsMetaConversationItem* base)
{
	GDateTime* result;
	DinoUiConversationSummaryMetaChatStateItem* self;
	GDateTime* _tmp0_;
	self = (DinoUiConversationSummaryMetaChatStateItem*) base;
	_tmp0_ = self->priv->_time;
	result = _tmp0_;
	return result;
}

static gpointer
_g_date_time_ref0 (gpointer self)
{
	return self ? g_date_time_ref (self) : NULL;
}

static void
dino_ui_conversation_summary_meta_chat_state_item_real_set_time (DinoPluginsMetaConversationItem* base,
                                                                 GDateTime* value)
{
	DinoUiConversationSummaryMetaChatStateItem* self;
	GDateTime* old_value;
	self = (DinoUiConversationSummaryMetaChatStateItem*) base;
	old_value = dino_ui_conversation_summary_meta_chat_state_item_real_get_time (base);
	if (old_value != value) {
		GDateTime* _tmp0_;
		_tmp0_ = _g_date_time_ref0 (value);
		_g_date_time_unref0 (self->priv->_time);
		self->priv->_time = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_conversation_summary_meta_chat_state_item_properties[DINO_UI_CONVERSATION_SUMMARY_META_CHAT_STATE_ITEM_TIME_PROPERTY]);
	}
}

static void
dino_ui_conversation_summary_meta_chat_state_item_class_init (DinoUiConversationSummaryMetaChatStateItemClass * klass,
                                                              gpointer klass_data)
{
	dino_ui_conversation_summary_meta_chat_state_item_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiConversationSummaryMetaChatStateItem_private_offset);
	((DinoPluginsMetaConversationItemClass *) klass)->get_widget = (GObject* (*) (DinoPluginsMetaConversationItem*, DinoPluginsConversationItemWidgetInterface*, DinoPluginsWidgetType)) dino_ui_conversation_summary_meta_chat_state_item_real_get_widget;
	((DinoPluginsMetaConversationItemClass *) klass)->get_item_actions = (GeeList* (*) (DinoPluginsMetaConversationItem*, DinoPluginsWidgetType)) dino_ui_conversation_summary_meta_chat_state_item_real_get_item_actions;
	DINO_PLUGINS_META_CONVERSATION_ITEM_CLASS (klass)->get_time = (GDateTime* (*) (DinoPluginsMetaConversationItem*)) dino_ui_conversation_summary_meta_chat_state_item_real_get_time;
	DINO_PLUGINS_META_CONVERSATION_ITEM_CLASS (klass)->set_time = (void (*) (DinoPluginsMetaConversationItem*, GDateTime*)) dino_ui_conversation_summary_meta_chat_state_item_real_set_time;
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_ui_conversation_summary_meta_chat_state_item_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dino_ui_conversation_summary_meta_chat_state_item_set_property;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_conversation_summary_meta_chat_state_item_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_CONVERSATION_SUMMARY_META_CHAT_STATE_ITEM_TIME_PROPERTY, dino_ui_conversation_summary_meta_chat_state_item_properties[DINO_UI_CONVERSATION_SUMMARY_META_CHAT_STATE_ITEM_TIME_PROPERTY] = g_param_spec_boxed ("time", "time", "time", G_TYPE_DATE_TIME, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
dino_ui_conversation_summary_meta_chat_state_item_instance_init (DinoUiConversationSummaryMetaChatStateItem * self,
                                                                 gpointer klass)
{
	GDateTime* _tmp0_;
	GDateTime* _tmp1_;
	GDateTime* _tmp2_;
	GeeArrayList* _tmp3_;
	self->priv = dino_ui_conversation_summary_meta_chat_state_item_get_instance_private (self);
	_tmp0_ = g_date_time_new_now_utc ();
	_tmp1_ = _tmp0_;
	_tmp2_ = g_date_time_add_years (_tmp1_, 10);
	self->priv->_time = _tmp2_;
	_g_date_time_unref0 (_tmp1_);
	_tmp3_ = gee_array_list_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, NULL, NULL, NULL);
	self->priv->jids = (GeeList*) _tmp3_;
}

static void
dino_ui_conversation_summary_meta_chat_state_item_finalize (GObject * obj)
{
	DinoUiConversationSummaryMetaChatStateItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_CONVERSATION_SUMMARY_TYPE_META_CHAT_STATE_ITEM, DinoUiConversationSummaryMetaChatStateItem);
	_g_date_time_unref0 (self->priv->_time);
	_g_object_unref0 (self->priv->stream_interactor);
	_g_object_unref0 (self->priv->conversation);
	_g_object_unref0 (self->priv->jids);
	_g_object_unref0 (self->priv->label);
	_g_object_unref0 (self->priv->picture);
	G_OBJECT_CLASS (dino_ui_conversation_summary_meta_chat_state_item_parent_class)->finalize (obj);
}

static GType
dino_ui_conversation_summary_meta_chat_state_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiConversationSummaryMetaChatStateItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_conversation_summary_meta_chat_state_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiConversationSummaryMetaChatStateItem), 0, (GInstanceInitFunc) dino_ui_conversation_summary_meta_chat_state_item_instance_init, NULL };
	GType dino_ui_conversation_summary_meta_chat_state_item_type_id;
	dino_ui_conversation_summary_meta_chat_state_item_type_id = g_type_register_static (DINO_PLUGINS_TYPE_META_CONVERSATION_ITEM, "DinoUiConversationSummaryMetaChatStateItem", &g_define_type_info, 0);
	DinoUiConversationSummaryMetaChatStateItem_private_offset = g_type_add_instance_private (dino_ui_conversation_summary_meta_chat_state_item_type_id, sizeof (DinoUiConversationSummaryMetaChatStateItemPrivate));
	return dino_ui_conversation_summary_meta_chat_state_item_type_id;
}

GType
dino_ui_conversation_summary_meta_chat_state_item_get_type (void)
{
	static volatile gsize dino_ui_conversation_summary_meta_chat_state_item_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_conversation_summary_meta_chat_state_item_type_id__once)) {
		GType dino_ui_conversation_summary_meta_chat_state_item_type_id;
		dino_ui_conversation_summary_meta_chat_state_item_type_id = dino_ui_conversation_summary_meta_chat_state_item_get_type_once ();
		g_once_init_leave (&dino_ui_conversation_summary_meta_chat_state_item_type_id__once, dino_ui_conversation_summary_meta_chat_state_item_type_id);
	}
	return dino_ui_conversation_summary_meta_chat_state_item_type_id__once;
}

static void
_vala_dino_ui_conversation_summary_meta_chat_state_item_get_property (GObject * object,
                                                                      guint property_id,
                                                                      GValue * value,
                                                                      GParamSpec * pspec)
{
	DinoUiConversationSummaryMetaChatStateItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_CONVERSATION_SUMMARY_TYPE_META_CHAT_STATE_ITEM, DinoUiConversationSummaryMetaChatStateItem);
	switch (property_id) {
		case DINO_UI_CONVERSATION_SUMMARY_META_CHAT_STATE_ITEM_TIME_PROPERTY:
		g_value_set_boxed (value, dino_plugins_meta_conversation_item_get_time ((DinoPluginsMetaConversationItem*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dino_ui_conversation_summary_meta_chat_state_item_set_property (GObject * object,
                                                                      guint property_id,
                                                                      const GValue * value,
                                                                      GParamSpec * pspec)
{
	DinoUiConversationSummaryMetaChatStateItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_CONVERSATION_SUMMARY_TYPE_META_CHAT_STATE_ITEM, DinoUiConversationSummaryMetaChatStateItem);
	switch (property_id) {
		case DINO_UI_CONVERSATION_SUMMARY_META_CHAT_STATE_ITEM_TIME_PROPERTY:
		dino_plugins_meta_conversation_item_set_time ((DinoPluginsMetaConversationItem*) self, g_value_get_boxed (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

