#ifndef CORE_PROFILE_H
#define CORE_PROFILE_H

#include <sqlite3.h>
#include <webkit2/webkit2.h>

typedef struct {
  char *name;
  char *base_path;
  WebKitWebContext *context;
  WebKitWebsiteDataManager *data_manager;
  sqlite3 *db;
  gboolean is_private;
} Profile;

/**
 * Load a profile by name and initialize WebKit contexts
 * @param profile_name Name of the profile to load
 * @return Profile* or NULL on failure
 */
Profile *load_profile(const char *profile_name);

/**
 * Initialize the default profile if it doesn't exist
 * @return Profile* or NULL on failure
 */
Profile *init_default_profile(void);

Profile *create_private_profile(void);

/**
 * Free a profile and its resources
 * @param profile Profile to free
 */
void free_profile(Profile *profile);

#endif
