#ifndef DIALOGS_H
#define DIALOGS_H

#include <gtk/gtk.h>
#include "player.h"
#include "playlist.h"

/* Forward declaration */
struct PluginManager;

/* Preferences dialog */
typedef struct {
    double default_volume;
    gboolean remember_position;
    gboolean show_playlist;
    gboolean auto_resize;
    gboolean hide_cursor_windowed;
    gboolean remember_last_dir;
    gboolean use_mpris;
    gboolean open_in_new_window;
    gboolean seekbar_direct_jump;
    gboolean hide_focus_rect;
    gboolean enable_osd;
    gboolean enable_chapters;
    gboolean enable_volume_boost;
    char *last_dir;
    char *screenshot_directory;
    char *screenshot_format;
    char *mpv_config_path;
} Preferences;

Preferences* preferences_new(void);
void preferences_free(Preferences *prefs);
void preferences_load(Preferences *prefs);
void preferences_save(Preferences *prefs);
gboolean dialogs_show_preferences(GtkWindow *parent, Preferences *prefs, struct PluginManager *pm);

/* File dialogs */
GSList* dialogs_open_files(GtkWindow *parent, Preferences *prefs);
char* dialogs_open_directory(GtkWindow *parent, Preferences *prefs);
char* dialogs_open_url(GtkWindow *parent, Preferences *prefs);
char* dialogs_open_subtitle(GtkWindow *parent, Preferences *prefs);
char* dialogs_save_playlist(GtkWindow *parent, Preferences *prefs);
char* dialogs_save_screenshot(GtkWindow *parent);

/* About dialog */
void dialogs_show_about(GtkWindow *parent);

/* Go to time dialog */
double dialogs_goto_time(GtkWindow *parent, double current_time, double duration);

/* Speed selection dialog */
double dialogs_select_speed(GtkWindow *parent, double current_speed);

/* Script Manager dialog */
void dialogs_show_script_manager(GtkWindow *parent, Player *player);

#endif /* DIALOGS_H */
