#ifndef TYPES_H
#define TYPES_H

#include <stdint.h>
#include <stdbool.h>
#include <Windows.h>

#define MAX_PATH_LEN 512
#define MAX_QUERY_LEN 1024
#define MAX_JSON_LEN 4096
#define MAX_NETSCAPE_LEN 4096
#define COOKIE_PLAINTEXT_HEADER_SIZE 32
#define KEY_SIZE 32
#define GCM_IV_LENGTH 12
#define GCM_TAG_LENGTH 16

typedef enum {
    PROTECTION_NONE = 0,
    PROTECTION_PATH_VALIDATION_OLD = 1,
    PROTECTION_PATH_VALIDATION = 2,
    PROTECTION_MAX = 3
} ProtectionLevel;

typedef struct {
    char name[64];
    wchar_t process_name[64];
    CLSID clsid;
    IID iid;
    wchar_t user_data_path[MAX_PATH_LEN];
} BrowserConfig;

typedef struct {
    uint8_t* data;
    size_t size;
    size_t capacity;
} ByteBuffer;

typedef struct {
    char** items;
    size_t count;
    size_t capacity;
} StringArray;

typedef struct {
    wchar_t path[MAX_PATH_LEN];
    bool is_valid;
} ProfilePath;

typedef struct {
    ProfilePath* paths;
    size_t count;
    size_t capacity;
} ProfileList;

#endif // TYPES_H