#ifndef UI_TABS_H
#define UI_TABS_H

#include "core/profile.h"
#include <gtk/gtk.h>
#include <webkit2/webkit2.h>

typedef struct _TabManager TabManager;

// Create a new tab manager
TabManager *tab_manager_new(GtkWindow *window, Profile *profile);

// Get the widget to put in the headerbar (the tab strip)
GtkWidget *tab_manager_get_header_widget(TabManager *manager);

// Get the widget to put in the window content area (the stack of webviews)
GtkWidget *tab_manager_get_content_widget(TabManager *manager);

// Set the URL entry from toolbar
void tab_manager_set_url_entry(TabManager *manager, GtkEntry *url_entry);

// Create a new tab
void tab_manager_new_tab(TabManager *manager, const char *url);

// Close the current tab
void tab_manager_close_current(TabManager *manager);

// Get the current webview
WebKitWebView *tab_manager_get_current_webview(TabManager *manager);

// Reopen the last closed tab
void tab_manager_reopen_last_tab(TabManager *manager);

// Switch to the next tab
void tab_manager_next_tab(TabManager *manager);

// Switch to the previous tab
void tab_manager_prev_tab(TabManager *manager);

// Reload the current tab
void tab_manager_reload_current(TabManager *manager);

#endif
