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

#include <adwaita.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.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 PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG (proton_plus_widgets_error_dialog_get_type ())
#define PROTON_PLUS_WIDGETS_ERROR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG, ProtonPlusWidgetsErrorDialog))
#define PROTON_PLUS_WIDGETS_ERROR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG, ProtonPlusWidgetsErrorDialogClass))
#define PROTON_PLUS_WIDGETS_IS_ERROR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG))
#define PROTON_PLUS_WIDGETS_IS_ERROR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG))
#define PROTON_PLUS_WIDGETS_ERROR_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG, ProtonPlusWidgetsErrorDialogClass))

typedef struct _ProtonPlusWidgetsErrorDialog ProtonPlusWidgetsErrorDialog;
typedef struct _ProtonPlusWidgetsErrorDialogClass ProtonPlusWidgetsErrorDialogClass;
typedef struct _ProtonPlusWidgetsErrorDialogPrivate ProtonPlusWidgetsErrorDialogPrivate;
enum  {
	PROTON_PLUS_WIDGETS_ERROR_DIALOG_0_PROPERTY,
	PROTON_PLUS_WIDGETS_ERROR_DIALOG_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_error_dialog_properties[PROTON_PLUS_WIDGETS_ERROR_DIALOG_NUM_PROPERTIES];

struct _ProtonPlusWidgetsErrorDialog {
	AdwAlertDialog parent_instance;
	ProtonPlusWidgetsErrorDialogPrivate * priv;
};

struct _ProtonPlusWidgetsErrorDialogClass {
	AdwAlertDialogClass parent_class;
};

static gpointer proton_plus_widgets_error_dialog_parent_class = NULL;

VALA_EXTERN GType proton_plus_widgets_error_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsErrorDialog, g_object_unref)
VALA_EXTERN ProtonPlusWidgetsErrorDialog* proton_plus_widgets_error_dialog_new (const gchar* heading,
                                                                    const gchar* body);
VALA_EXTERN ProtonPlusWidgetsErrorDialog* proton_plus_widgets_error_dialog_construct (GType object_type,
                                                                          const gchar* heading,
                                                                          const gchar* body);
static void __lambda13_ (ProtonPlusWidgetsErrorDialog* self,
                  const gchar* response);
static void ___lambda13__adw_alert_dialog_response (AdwAlertDialog* _sender,
                                             const gchar* response,
                                             gpointer self);
static GType proton_plus_widgets_error_dialog_get_type_once (void);

static void
__lambda13_ (ProtonPlusWidgetsErrorDialog* self,
             const gchar* response)
{
	g_return_if_fail (response != NULL);
	if (g_strcmp0 (response, "report") == 0) {
		gtk_widget_activate_action ((GtkWidget*) self, "app.report", NULL, NULL);
	}
}

static void
___lambda13__adw_alert_dialog_response (AdwAlertDialog* _sender,
                                        const gchar* response,
                                        gpointer self)
{
	__lambda13_ ((ProtonPlusWidgetsErrorDialog*) self, response);
}

ProtonPlusWidgetsErrorDialog*
proton_plus_widgets_error_dialog_construct (GType object_type,
                                            const gchar* heading,
                                            const gchar* body)
{
	ProtonPlusWidgetsErrorDialog * self = NULL;
	g_return_val_if_fail (heading != NULL, NULL);
	g_return_val_if_fail (body != NULL, NULL);
	self = (ProtonPlusWidgetsErrorDialog*) g_object_new (object_type, NULL);
	adw_alert_dialog_set_heading ((AdwAlertDialog*) self, heading);
	adw_alert_dialog_set_body ((AdwAlertDialog*) self, body);
	adw_alert_dialog_add_response ((AdwAlertDialog*) self, "report", _ ("Report"));
	adw_alert_dialog_set_response_appearance ((AdwAlertDialog*) self, "report", ADW_RESPONSE_SUGGESTED);
	adw_alert_dialog_add_response ((AdwAlertDialog*) self, "ok", _ ("OK"));
	adw_alert_dialog_set_response_appearance ((AdwAlertDialog*) self, "ok", ADW_RESPONSE_DEFAULT);
	g_signal_connect_object ((AdwAlertDialog*) self, "response", (GCallback) ___lambda13__adw_alert_dialog_response, self, 0);
	return self;
}

ProtonPlusWidgetsErrorDialog*
proton_plus_widgets_error_dialog_new (const gchar* heading,
                                      const gchar* body)
{
	return proton_plus_widgets_error_dialog_construct (PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG, heading, body);
}

static void
proton_plus_widgets_error_dialog_class_init (ProtonPlusWidgetsErrorDialogClass * klass,
                                             gpointer klass_data)
{
	proton_plus_widgets_error_dialog_parent_class = g_type_class_peek_parent (klass);
}

static void
proton_plus_widgets_error_dialog_instance_init (ProtonPlusWidgetsErrorDialog * self,
                                                gpointer klass)
{
}

static GType
proton_plus_widgets_error_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsErrorDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_error_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsErrorDialog), 0, (GInstanceInitFunc) proton_plus_widgets_error_dialog_instance_init, NULL };
	GType proton_plus_widgets_error_dialog_type_id;
	proton_plus_widgets_error_dialog_type_id = g_type_register_static (adw_alert_dialog_get_type (), "ProtonPlusWidgetsErrorDialog", &g_define_type_info, 0);
	return proton_plus_widgets_error_dialog_type_id;
}

GType
proton_plus_widgets_error_dialog_get_type (void)
{
	static volatile gsize proton_plus_widgets_error_dialog_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_error_dialog_type_id__once)) {
		GType proton_plus_widgets_error_dialog_type_id;
		proton_plus_widgets_error_dialog_type_id = proton_plus_widgets_error_dialog_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_error_dialog_type_id__once, proton_plus_widgets_error_dialog_type_id);
	}
	return proton_plus_widgets_error_dialog_type_id__once;
}

