#pragma once

#include <adwaita.h>
#include "db-common.h"

G_BEGIN_DECLS

#define IMPORT_TYPE_DIALOG (import_dialog_get_type ())

G_DECLARE_FINAL_TYPE (ImportDialog, import_dialog, IMPORT, DIALOG, AdwDialog)

typedef struct {
    guint added;       /* tokens appended to the database */
    guint skipped;     /* duplicates or invalid records ignored */
    guint skipped_duplicates;
    guint skipped_invalid;
    guint batch_size;  /* Google migration batch count (0/1 = single payload) */
    guint batch_index; /* zero-based index of the imported batch */
} ImportSummary;

typedef void (*ImportCallback) (const ImportSummary *summary, gpointer user_data);

ImportDialog *import_dialog_new (DatabaseData   *db_data,
                                 GtkWidget      *parent,
                                 ImportCallback  callback,
                                 gpointer        user_data);

G_END_DECLS
