#ifndef ZOITECHAT_ICON_RESOLVER_H
#define ZOITECHAT_ICON_RESOLVER_H

#include <gtk/gtk.h>

typedef enum
{
	ICON_RESOLVER_ROLE_MENU_ACTION,
	ICON_RESOLVER_ROLE_TRAY_STATE,
	ICON_RESOLVER_ROLE_TREE_TYPE,
	ICON_RESOLVER_ROLE_USERLIST_RANK
} IconResolverRole;

typedef enum
{
	ICON_RESOLVER_THEME_SYSTEM,
	ICON_RESOLVER_THEME_LIGHT,
	ICON_RESOLVER_THEME_DARK
} IconResolverThemeVariant;

typedef enum
{
	ICON_RESOLVER_MENU_ACTION_NEW,
	ICON_RESOLVER_MENU_ACTION_NETWORK_LIST,
	ICON_RESOLVER_MENU_ACTION_LOAD_PLUGIN,
	ICON_RESOLVER_MENU_ACTION_DETACH,
	ICON_RESOLVER_MENU_ACTION_CLOSE,
	ICON_RESOLVER_MENU_ACTION_QUIT,
	ICON_RESOLVER_MENU_ACTION_DISCONNECT,
	ICON_RESOLVER_MENU_ACTION_CONNECT,
	ICON_RESOLVER_MENU_ACTION_JOIN,
	ICON_RESOLVER_MENU_ACTION_PREFERENCES,
	ICON_RESOLVER_MENU_ACTION_CLEAR,
	ICON_RESOLVER_MENU_ACTION_COPY,
	ICON_RESOLVER_MENU_ACTION_DELETE,
	ICON_RESOLVER_MENU_ACTION_ADD,
	ICON_RESOLVER_MENU_ACTION_REMOVE,
	ICON_RESOLVER_MENU_ACTION_SPELL_CHECK,
	ICON_RESOLVER_MENU_ACTION_SAVE,
	ICON_RESOLVER_MENU_ACTION_SAVE_AS,
	ICON_RESOLVER_MENU_ACTION_REFRESH,
	ICON_RESOLVER_MENU_ACTION_SEARCH,
	ICON_RESOLVER_MENU_ACTION_FIND,
	ICON_RESOLVER_MENU_ACTION_PREVIOUS,
	ICON_RESOLVER_MENU_ACTION_NEXT,
	ICON_RESOLVER_MENU_ACTION_HELP,
	ICON_RESOLVER_MENU_ACTION_ABOUT,
	ICON_RESOLVER_MENU_ACTION_OK,
	ICON_RESOLVER_MENU_ACTION_CANCEL,
	ICON_RESOLVER_MENU_ACTION_EMOJI,
	ICON_RESOLVER_MENU_ACTION_UPDATE,
	ICON_RESOLVER_MENU_ACTION_CHANLIST
} IconResolverMenuAction;

typedef enum
{
	ICON_RESOLVER_TRAY_STATE_NORMAL,
	ICON_RESOLVER_TRAY_STATE_FILEOFFER,
	ICON_RESOLVER_TRAY_STATE_HIGHLIGHT,
	ICON_RESOLVER_TRAY_STATE_MESSAGE
} IconResolverTrayState;

typedef enum
{
	ICON_RESOLVER_TREE_TYPE_CHANNEL,
	ICON_RESOLVER_TREE_TYPE_DIALOG,
	ICON_RESOLVER_TREE_TYPE_SERVER,
	ICON_RESOLVER_TREE_TYPE_UTIL
} IconResolverTreeType;

typedef enum
{
	ICON_RESOLVER_USERLIST_RANK_VOICE,
	ICON_RESOLVER_USERLIST_RANK_HALFOP,
	ICON_RESOLVER_USERLIST_RANK_OP,
	ICON_RESOLVER_USERLIST_RANK_OWNER,
	ICON_RESOLVER_USERLIST_RANK_FOUNDER,
	ICON_RESOLVER_USERLIST_RANK_NETOP
} IconResolverUserlistRank;

const char *icon_resolver_icon_name_from_stock (const char *stock_name);
const char *icon_resolver_icon_name_for_menu_custom (const char *custom_icon_name);
gboolean icon_resolver_menu_action_from_custom (const char *custom_icon_name, int *action_out);
gboolean icon_resolver_menu_action_from_name (const char *name, int *action_out);
const char *icon_resolver_system_icon_name (IconResolverRole role, int item);
IconResolverThemeVariant icon_resolver_detect_theme_variant (void);
char *icon_resolver_resolve_path (IconResolverRole role, int item, GtkIconSize size,
                                  const char *context, IconResolverThemeVariant variant,
                                  const char **system_icon_name);

#endif
