---@class CraftSim
local CraftSim = select(2, ...)

---@class CraftSim.CONST
CraftSim.CONST = {}

-- One Time Info ------------
CraftSim.CONST.infoBoxSizeX = 500
CraftSim.CONST.infoBoxSizeY = 400
----------------

CraftSim.CONST.CURRENT_BETA_BUILD = "11.0.2"

CraftSim.CONST.FEATURE_TOGGLES = {
}

---@type table<CraftSim.EXPANSION_IDS, table<string, number>>
CraftSim.CONST.PERCENT_DIVISION_FACTORS = {
    [9] = { -- Dragonflight
        MULTICRAFT = 1100,
        RESOURCEFULNESS = 900,
        INGENUITY = 1000,
        CRAFTINGSPEED = 2650,
    },
    [10] = { -- The War Within
        MULTICRAFT = 1100,
        RESOURCEFULNESS = 900,
        INGENUITY = 1000,
        CRAFTINGSPEED = 2650,
    },
    [11] = { -- Midnight
        MULTICRAFT = 1100,
        RESOURCEFULNESS = 900,
        INGENUITY = 1000,
        CRAFTINGSPEED = 2650,
    },
}

-- some dummy recipes are not flagged as dummy ..........
CraftSim.CONST.BLIZZARD_DUMMY_RECIPES = {
    371635, -- "Demonstration Item Recipe" part of Alchemy Stone Category for Alchemy
}

CraftSim.CONST.ALCHEMICAL_EXPERIMENTATION_RECIPE_IDS = {
    370746, -- basic phial
    370743, -- basic potion
    370747, -- adv phial
    370745, -- adv potion
    60893,  -- northrend research
}

-- this average comes from 20-40% resources saved on proc with a minimum of 1
-- currently this is just an approximation
CraftSim.CONST.BASE_RESOURCEFULNESS_AVERAGE_SAVE_FACTOR = 0.30

--- Approximation based on recipe base yield
CraftSim.CONST.MULTICRAFT_CONSTANTS = {
    DEFAULT = 2.5,
    [1] = 2.1,
    [2] = 1.83,
    [5] = 1.875,
}

CraftSim.CONST.DISCORD_INVITE_URL = "https://discord.gg/7vqKMgezXR"
CraftSim.CONST.PAYPAL_ME_URL = "https://www.paypal.com/paypalme/CraftSim"
CraftSim.CONST.KOFI_URL = "https://ko-fi.com/craftsim"

CraftSim.CONST.TSM_DEFAULT_PRICE_EXPRESSION = "first(DBRecent, DBMinbuyout)"

---@enum CraftSim.EXPORT_MODE
CraftSim.CONST.EXPORT_MODE = {
    NON_WORK_ORDER = 0,
    WORK_ORDER = 1,
    SCAN = 2,
}

---@enum CraftSim.FRAMES
CraftSim.CONST.FRAMES = {
    REAGENT_OPTIMIZATION = "REAGENT_OPTIMIZATION",
    AVERAGE_PROFIT = "AVERAGE_PROFIT",
    AVERAGE_PROFIT_WO = "AVERAGE_PROFIT_WO",
    TOP_GEAR = "TOP_GEAR",
    PRICE_DETAILS = "PRICE_DETAILS",
    EXPLANATIONS = "EXPLANATIONS",
    CRAFTING_DETAILS = "CRAFTING_DETAILS",
    SPEC_INFO = "SPEC_INFO",
    COOLDOWNS = "COOLDOWNS",
    WARNING = "WARNING",
    INFO = "INFO",
    DEBUG = "DEBUG",
    DEBUG_CONTROL = "DEBUG_CONTROL",
    SPEC_SIM = "SPEC_SIM",
    CONTROL_PANEL = "CONTROL_PANEL",
    PROFIT_DETAILS_WORK_ORDER = "PROFIT_DETAILS_WORK_ORDER",
    REAGENT_OPTIMIZATION_WORK_ORDER = "REAGENT_OPTIMIZATION_WORK_ORDER",
    PRICE_DETAILS_WORK_ORDER = "PRICE_DETAILS_WORK_ORDER",
    TOP_GEAR_WORK_ORDER = "TOP_GEAR_WORK_ORDER",
    PRICE_OVERRIDE_WORK_ORDER = "PRICE_OVERRIDE_WORK_ORDER",
    PRICE_OVERRIDE = "PRICE_OVERRIDE",
    RECIPE_SCAN = "RECIPE_SCAN",
    CRAFT_LOG = "CRAFT_LOG",
    CRAFT_LOG_LOG_FRAME = "CRAFT_LOG_LOG_FRAME",
    STATISTICS = "STATISTICS",
    STATISTICS_WORKORDER = "STATISTICS_WORKORDER",
    CUSTOMER_HISTORY = "CUSTOMER_HISTORY",
    CRAFTING_DETAILS_WO = "CRAFTING_DETAILS_WO",
    SPEC_SIM_WO = "SPEC_SIM_WO",
    SPEC_INFO_WO = "SPEC_INFO_WO",
    COST_OPTIMIZATION = "COST_OPTIMIZATION",
    COST_OPTIMIZATION_WO = "COST_OPTIMIZATION_WO",
    POPUP = "POPUP",
    SUPPORTERS = "SUPPORTERS",
    CRAFT_QUEUE = "CRAFT_QUEUE",
    CRAFTQUEUE_PATRON_REWARD_VALUES = "CRAFTQUEUE_PATRON_REWARD_VALUES",
    CRAFT_BUFFS = "CRAFT_BUFFS",
    CRAFT_BUFFS_WORKORDER = "CRAFT_BUFFS_WORKORDER",
    CRAFT_QUEUE_EDIT_RECIPE = "CRAFT_QUEUE_EDIT_RECIPE",
    CONCENTRATION_TRACKER = "CONCENTRATION_TRACKER",
    CONCENTRATION_TRACKER_TRACKER_FRAME = "CONCENTRATION_TRACKER_TRACKER_FRAME",
    SIMULATION_MODE = "SIMULATION_MODE",
    SIMULATION_MODE_WO = "SIMULATION_MODE_WO",
}

CraftSim.CONST.MODULES_FRAME_STRATA = "HIGH"

CraftSim.CONST.OLD_BACKDROP_OPTIONS = {
    bgFile = "Interface\\CharacterFrame\\UI-Party-Background",
    borderOptions = {
        edgeFile = "Interface\\PVPFrame\\UI-Character-PVP-Highlight", -- this one is neat
        edgeSize = 16,
        insets = { left = 8, right = 6, top = 8, bottom = 8 },
    }
}
CraftSim.CONST.DEFAULT_BACKDROP_OPTIONS = {
    bgFile = "Interface\\Buttons\\WHITE8X8",
    borderOptions = {
        edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
        edgeSize = 16,
        insets = { left = 3, right = 3, top = 3, bottom = 3 },
    },
    colorR = 0,
    colorG = 0,
    colorB = 0,
    colorA = 1,
}

CraftSim.CONST.BACKDROPS = {
    OPTIONS_CONTENT_FRAME = {
        --bgFile = "Interface\\Buttons\\WHITE8X8",
        borderOptions = {
            edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
            edgeSize = 16,
            insets = { left = 3, right = 3, top = 3, bottom = 3 },
        }
    },
    DEBUG = {
        bgFile = "Interface\\Buttons\\WHITE8X8",
        colorR = 1,
        colorG = 1,
        colorB = 1,
        colorA = 0.5,
    }
}

CraftSim.CONST.FRAME_LIST_SELECTION_COLORS = {
    HOVER_LIGHT_WHITE = { 1, 1, 1, 0.3 },
    SELECTED_LIGHT_WHITE = { 1, 1, 1, 0.5 },
    HOVER_LIGHT_GREEN = { 0, 1, 0, 0.2 },
    SELECTED_LIGHT_GREEN = { 0, 1, 0, 0.4 },
}

---@enum CraftSim.EXPANSION_IDS
CraftSim.CONST.EXPANSION_IDS = {
    VANILLA = 0,
    THE_BURNING_CRUSADE = 1,
    WRATH_OF_THE_LICH_KING = 2,
    CATACLYSM = 3,
    MISTS_OF_PANDARIA = 4,
    WARLORDS_OF_DRAENOR = 5,
    LEGION = 6,
    BATTLE_FOR_AZEROTH = 7,
    SHADOWLANDS = 8,
    DRAGONFLIGHT = 9,
    THE_WAR_WITHIN = 10,
    MIDNIGHT = 11,
}

---@type table<CraftSim.EXPANSION_IDS, CraftSim.LOCALIZATION_IDS>
CraftSim.CONST.EXPANSION_LOCALIZATION_IDS = {
    [0] = "EXPANSION_VANILLA",
    [1] = "EXPANSION_THE_BURNING_CRUSADE",
    [2] = "EXPANSION_WRATH_OF_THE_LICH_KING",
    [3] = "EXPANSION_CATACLYSM",
    [4] = "EXPANSION_MISTS_OF_PANDARIA",
    [5] = "EXPANSION_WARLORDS_OF_DRAENOR",
    [6] = "EXPANSION_LEGION",
    [7] = "EXPANSION_BATTLE_FOR_AZEROTH",
    [8] = "EXPANSION_SHADOWLANDS",
    [9] = "EXPANSION_DRAGONFLIGHT",
    [10] = "EXPANSION_THE_WAR_WITHIN",
    [11] = "EXPANSION_MIDNIGHT",
}


--- https://warcraft.wiki.gg/wiki/TradeSkillLineID
---@type table<Enum.Profession, table<CraftSim.EXPANSION_IDS, number>>
CraftSim.CONST.TRADESKILLLINEIDS = {
    [Enum.Profession.Blacksmithing] = { BASE = 164, [0] = 2477, [1] = 2476, [2] = 2475, [3] = 2474, [4] = 2473, [5] = 2472, [6] = 2454, [7] = 2437, [8] = 2751, [9] = 2822, [10] = 2872, [11] = 2907, },
    [Enum.Profession.Leatherworking] = { BASE = 165, [0] = 2532, [1] = 2531, [2] = 2530, [3] = 2529, [4] = 2528, [5] = 2527, [6] = 2526, [7] = 2525, [8] = 2758, [9] = 2830, [10] = 2880, [11] = 2915, },
    [Enum.Profession.Alchemy] = { BASE = 171, [0] = 2485, [1] = 2484, [2] = 2483, [3] = 2482, [4] = 2481, [5] = 2480, [6] = 2479, [7] = 2478, [8] = 2750, [9] = 2823, [10] = 2871, [11] = 2906, },
    [Enum.Profession.Herbalism] = { BASE = 182, [0] = 2556, [1] = 2555, [2] = 2554, [3] = 2553, [4] = 2552, [5] = 2551, [6] = 2550, [7] = 2549, [8] = 2760, [9] = 2832, [10] = 2877, [11] = 2912, },
    [Enum.Profession.Cooking] = { BASE = 185, [0] = 2548, [1] = 2547, [2] = 2546, [3] = 2545, [4] = 2544, [5] = 2543, [6] = 2542, [7] = 2541, [8] = 2752, [9] = 2824, [10] = 2873, [11] = 2908, },
    [Enum.Profession.Mining] = { BASE = 186, [0] = 2572, [1] = 2571, [2] = 2570, [3] = 2569, [4] = 2568, [5] = 2567, [6] = 2566, [7] = 2565, [8] = 2761, [9] = 2833, [10] = 2881, [11] = 2916, },
    [Enum.Profession.Tailoring] = { BASE = 197, [0] = 2540, [1] = 2539, [2] = 2538, [3] = 2537, [4] = 2536, [5] = 2535, [6] = 2534, [7] = 2533, [8] = 2759, [9] = 2831, [10] = 2883, [11] = 2918, },
    [Enum.Profession.Engineering] = { BASE = 202, [0] = 2506, [1] = 2505, [2] = 2504, [3] = 2503, [4] = 2502, [5] = 2501, [6] = 2500, [7] = 2499, [8] = 2755, [9] = 2827, [10] = 2875, [11] = 2910, },
    [Enum.Profession.Enchanting] = { BASE = 333, [0] = 2494, [1] = 2493, [2] = 2492, [3] = 2491, [4] = 2489, [5] = 2488, [6] = 2487, [7] = 2486, [8] = 2753, [9] = 2825, [10] = 2874, [11] = 2909, },
    [Enum.Profession.Fishing] = { BASE = 356, [0] = 2592, [1] = 2591, [2] = 2590, [3] = 2589, [4] = 2588, [5] = 2587, [6] = 2586, [7] = 2585, [8] = 2754, [9] = 2826, [10] = 2876, [11] = 2911, },
    [Enum.Profession.Skinning] = { BASE = 393, [0] = 2564, [1] = 2563, [2] = 2562, [3] = 2561, [4] = 2560, [5] = 2559, [6] = 2558, [7] = 2557, [8] = 2762, [9] = 2834, [10] = 2882, [11] = 2917, },
    [Enum.Profession.Jewelcrafting] = { BASE = 755, [0] = 2524, [1] = 2523, [2] = 2522, [3] = 2521, [4] = 2520, [5] = 2519, [6] = 2518, [7] = 2517, [8] = 2757, [9] = 2829, [10] = 2879, [11] = 2914, },
    [Enum.Profession.Inscription] = { BASE = 773, [0] = 2514, [1] = 2513, [2] = 2512, [3] = 2511, [4] = 2510, [5] = 2509, [6] = 2508, [7] = 2507, [8] = 2756, [9] = 2828, [10] = 2878, [11] = 2913, }
}

---@type table<Enum.Profession, CraftSim.LOCALIZATION_IDS>
CraftSim.CONST.PROFESSION_LOCALIZATION_IDS = {
    [Enum.Profession.Blacksmithing] = "PROFESSIONS_BLACKSMITHING",
    [Enum.Profession.Leatherworking] = "PROFESSIONS_LEATHERWORKING",
    [Enum.Profession.Alchemy] = "PROFESSIONS_ALCHEMY",
    [Enum.Profession.Herbalism] = "PROFESSIONS_HERBALISM",
    [Enum.Profession.Cooking] = "PROFESSIONS_COOKING",
    [Enum.Profession.Mining] = "PROFESSIONS_MINING",
    [Enum.Profession.Tailoring] = "PROFESSIONS_TAILORING",
    [Enum.Profession.Engineering] = "PROFESSIONS_ENGINEERING",
    [Enum.Profession.Enchanting] = "PROFESSIONS_ENCHANTING",
    [Enum.Profession.Fishing] = "PROFESSIONS_FISHING",
    [Enum.Profession.Skinning] = "PROFESSIONS_SKINNING",
    [Enum.Profession.Jewelcrafting] = "PROFESSIONS_JEWELCRAFTING",
    [Enum.Profession.Inscription] = "PROFESSIONS_INSCRIPTION",
}

CraftSim.CONST.QUEST_PLAN_CATEGORY_IDS = {
    1688, 1522, -- Blacksmithing
    1687, 1525, -- Alchemy
    1693,       -- Leatherworking
    1686,       -- Jewelcrafting
    1690, 1527, -- Enchanting
    1692,       -- Inscription
    1696, 1532, -- Tailoring
    1691, 1528, -- Engineering
    1526,       -- Cooking
}

-- that are not within a quest plan category
CraftSim.CONST.QUEST_RECIPE_IDS = {
    -- Heart in a Bottle
    377984, -- Herbalism
    377989, -- Leatherworking
    377987, -- Mining
    377978, -- Alchemy
    377982, -- Enchanting
    377988, -- Skinning
    377981, -- Blacksmithing
    377915, -- Jewelcrafting
    377983, -- Engineering
    377985, -- Inscription
    377986, -- Tailoring
}

--- TODO: Move to options? or maybe create Const folder with different const files
---@enum CraftSim.GENERAL_OPTIONS
CraftSim.CONST.GENERAL_OPTIONS = {
    -- LIBS
    GGUI_CONFIG = "GGUI_CONFIG",
    LIB_ICON_DB = "LIB_ICON_DB",
    -- GENERAL
    PRICE_SOURCE_REMINDER_DISABLED = "PRICE_SOURCE_REMINDER_DISABLED",
    NEWS_CHECKSUM = "NEWS_CHECKSUM",
    PRICE_DEBUG = "PRICE_DEBUG",
    PRICE_SOURCE = "PRICE_SOURCE",
    QUALITY_BREAKPOINT_OFFSET = "QUALITY_BREAKPOINT_OFFSET",
    SHOW_PROFIT_PERCENTAGE = "SHOW_PROFIT_PERCENTAGE",
    OPEN_LAST_RECIPE = "OPEN_LAST_RECIPE",
    SHOW_NEWS = "SHOW_NEWS",
    MINIMAP_BUTTON_HIDE = "MINIMAP_BUTTON_HIDE",
    MONEY_FORMAT_USE_TEXTURES = "MONEY_FORMAT_USE_TEXTURES",
    -- TSM
    TSM_PRICE_KEY_REAGENTS = "TSM_PRICE_KEY_REAGENTS",
    TSM_PRICE_KEY_ITEMS = "TSM_PRICE_KEY_ITEMS",
    TSM_RESTOCK_KEY_ITEMS = "TSM_RESTOCK_KEY_ITEMS",
    -- TSM ENHANCED
    TSM_DEPOSIT_ENABLED = "TSM_DEPOSIT_ENABLED",
    TSM_DEPOSIT_EXPRESSION = "TSM_DEPOSIT_EXPRESSION",
    TSM_SMART_RESTOCK_ENABLED = "TSM_SMART_RESTOCK_ENABLED",
    TSM_SMART_RESTOCK_INCLUDE_ALTS = "TSM_SMART_RESTOCK_INCLUDE_ALTS",
    TSM_SMART_RESTOCK_INCLUDE_WARBANK = "TSM_SMART_RESTOCK_INCLUDE_WARBANK",

    -- TOP GEAR
    TOP_GEAR_MODE = "TOP_GEAR_MODE",
    TOP_GEAR_AUTO_UPDATE = "TOP_GEAR_AUTO_UPDATE",

    -- MODULE VISIBILITIES
    MODULE_REAGENT_OPTIMIZATION = "MODULE_REAGENT_OPTIMIZATION",
    MODULE_AVERAGE_PROFIT = "MODULE_AVERAGE_PROFIT",
    MODULE_TOP_GEAR = "MODULE_TOP_GEAR",
    MODULE_COST_OVERVIEW = "MODULE_COST_OVERVIEW",
    MODULE_SPEC_INFO = "MODULE_SPEC_INFO",
    MODULE_PRICE_OVERRIDE = "MODULE_PRICE_OVERRIDE",
    MODULE_RECIPE_SCAN = "MODULE_RECIPE_SCAN",
    MODULE_CRAFT_LOG = "MODULE_CRAFT_LOG",
    MODULE_CUSTOMER_HISTORY = "MODULE_CUSTOMER_HISTORY",
    MODULE_COST_OPTIMIZATION = "MODULE_COST_OPTIMIZATION",
    MODULE_CRAFT_QUEUE = "MODULE_CRAFT_QUEUE",
    MODULE_CRAFT_BUFFS = "MODULE_CRAFT_BUFFS",
    MODULE_COOLDOWNS = "MODULE_COOLDOWNS",
    MODULE_EXPLANATIONS = "MODULE_EXPLANATIONS",
    MODULE_STATISTICS = "MODULE_STATISTICS",

    -- CUSTOMER HISTORY
    CUSTOMER_HISTORY_MAX_ENTRIES_PER_CLIENT = "CUSTOMER_HISTORY_MAX_ENTRIES_PER_CLIENT",
    CUSTOMER_HISTORY_AUTO_PURGE_INTERVAL = "CUSTOMER_HISTORY_AUTO_PURGE_INTERVAL",
    CUSTOMER_HISTORY_AUTO_PURGE_LAST_PURGE = "CUSTOMER_HISTORY_AUTO_PURGE_LAST_PURGE",
    CUSTOMER_HISTORY_ENABLED = "CUSTOMER_HISTORY_ENABLED",
    CUSTOMER_HISTORY_REMOVAL_TIP_THRESHOLD = "CUSTOMER_HISTORY_REMOVAL_TIP_THRESHOLD",
    CUSTOMER_HISTORY_RECORD_PATRON_ORDERS = "CUSTOMER_HISTORY_RECORD_PATRON_ORDERS",

    -- RECIPE SCAN
    RECIPESCAN_INCLUDE_SOULBOUND = "RECIPESCAN_INCLUDE_SOULBOUND",
    RECIPESCAN_INCLUDE_GEAR = "RECIPESCAN_INCLUDE_GEAR",
    RECIPESCAN_INCLUDE_NOT_LEARNED = "RECIPESCAN_INCLUDE_NOT_LEARNED",
    RECIPESCAN_ONLY_FAVORITES = "RECIPESCAN_ONLY_FAVORITES",
    RECIPESCAN_OPTIMIZE_PROFESSION_TOOLS = "RECIPESCAN_OPTIMIZE_PROFESSION_TOOLS",
    RECIPESCAN_SCAN_MODE = "RECIPESCAN_SCAN_MODE",
    RECIPESCAN_SORT_MODE = "RECIPESCAN_SORT_MODE",
    RECIPESCAN_SORT_MODE_ASCENDING = "RECIPESCAN_SORT_MODE_ASCENDING",
    RECIPESCAN_FILTERED_EXPANSIONS = "RECIPESCAN_FILTERED_EXPANSIONS",
    RECIPESCAN_OPTIMIZE_SUBRECIPES = "RECIPESCAN_OPTIMIZE_SUBRECIPES",
    RECIPESCAN_USE_INSIGHT = "RECIPESCAN_USE_INSIGHT",
    RECIPESCAN_INCLUDED_PROFESSIONS = "RECIPESCAN_INCLUDED_PROFESSIONS",
    RECIPESCAN_ENABLE_CONCENTRATION = "RECIPESCAN_ENABLE_CONCENTRATION",
    RECIPESCAN_OPTIMIZE_REAGENTS_TOP_PROFIT = "RECIPESCAN_OPTIMIZE_REAGENTS_TOP_PROFIT",
    RECIPESCAN_OPTIMIZE_CONCENTRATION_VALUE = "RECIPESCAN_OPTIMIZE_CONCENTRATION_VALUE",
    RECIPESCAN_OPTIMIZE_FINISHING_REAGENTS = "RECIPESCAN_OPTIMIZE_FINISHING_REAGENTS",
    RECIPESCAN_OPTIMIZE_FINISHING_REAGENTS_INCLUDE_SOULBOUND = "RECIPESCAN_OPTIMIZE_FINISHING_REAGENTS_INCLUDE_SOULBOUND",
    RECIPESCAN_SEND_TO_CRAFTQUEUE_PROFIT_MARGIN_THRESHOLD = "RECIPESCAN_SEND_TO_CRAFTQUEUE_PROFIT_MARGIN_THRESHOLD",
    RECIPESCAN_SEND_TO_CRAFTQUEUE_DEFAULT_QUEUE_AMOUNT = "RECIPESCAN_SEND_TO_CRAFTQUEUE_DEFAULT_QUEUE_AMOUNT",
    RECIPESCAN_SEND_TO_CRAFTQUEUE_TSM_SALERATE_THRESHOLD = "RECIPESCAN_SEND_TO_CRAFTQUEUE_TSM_SALERATE_THRESHOLD",
    RECIPESCAN_SCAN_PROFIT_MARGIN_THRESHOLD = "RECIPESCAN_SCAN_PROFIT_MARGIN_THRESHOLD",
    RECIPESCAN_SCAN_TSM_SALERATE_THRESHOLD = "RECIPESCAN_SCAN_TSM_SALERATE_THRESHOLD",
    RECIPESCAN_AUTOSELECT_OPEN_PROFESSION = "RECIPESCAN_AUTOSELECT_OPEN_PROFESSION",
    RECIPESCAN_UPDATE_LAST_CRAFTING_COST = "RECIPESCAN_UPDATE_LAST_CRAFTING_COST",

    -- COOLDOWNS
    COOLDOWNS_FILTERED_EXPANSIONS = "COOLDOWNS_FILTERED_EXPANSIONS",

    -- PROFIT CALCULATION
    PROFIT_CALCULATION_MULTICRAFT_CONSTANTS = "PROFIT_CALCULATION_MULTICRAFT_CONSTANTS",
    PROFIT_CALCULATION_RESOURCEFULNESS_CONSTANT = "PROFIT_CALCULATION_RESOURCEFULNESS_CONSTANT",

    -- CRAFTING
    CRAFTING_GARBAGE_COLLECTION_ENABLED = "CRAFTING_GARBAGE_COLLECTION_ENABLED",
    CRAFTING_GARBAGE_COLLECTION_CRAFTS = "CRAFTING_GARBAGE_COLLECTION_CRAFTS",

    -- CRAFT_LOG
    CRAFT_LOG_DISABLE = "CRAFT_LOG_DISABLE",
    CRAFT_LOG_DISABLE_ADV_DATA = "CRAFT_LOG_DISABLE_ADV_DATA",
    CRAFT_LOG_HIDE_BLIZZARD_CRAFTING_LOG = "CRAFT_LOG_HIDE_BLIZZARD_CRAFTING_LOG",
    CRAFT_LOG_SHOW_ADV_LOG = "CRAFT_LOG_SHOW_ADV_LOG",
    CRAFT_LOG_AUTO_SHOW = "CRAFT_LOG_AUTO_SHOW",
    CRAFT_LOG_IGNORE_WORK_ORDERS = "CRAFT_LOG_IGNORE_WORK_ORDERS",
    CRAFT_LOG_SELECTED_RECIPE_REAGENT_COMBINATION_ID = "CRAFT_LOG_SELECTED_RECIPE_REAGENT_COMBINATION_ID",

    -- CRAFT QUEUE
    CRAFTQUEUE_FLASH_TASKBAR_ON_CRAFT_FINISHED = "CRAFTQUEUE_FLASH_TASKBAR_ON_CRAFT_FINISHED",
    CRAFTQUEUE_WORK_ORDERS_INCLUDE_PATRON_ORDERS = "CRAFTQUEUE_WORK_ORDERS_INCLUDE_PATRON_ORDERS",
    CRAFTQUEUE_WORK_ORDERS_INCLUDE_PERSONAL_ORDERS = "CRAFTQUEUE_WORK_ORDERS_INCLUDE_PERSONAL_ORDERS",
    CRAFTQUEUE_WORK_ORDERS_INCLUDE_GUILD_ORDERS = "CRAFTQUEUE_WORK_ORDERS_INCLUDE_GUILD_ORDERS",
    CRAFTQUEUE_WORK_ORDERS_INCLUDE_PUBLIC_ORDERS = "CRAFTQUEUE_WORK_ORDERS_INCLUDE_PUBLIC_ORDERS",
    CRAFTQUEUE_PUBLIC_ORDERS_MAX_COUNT = "CRAFTQUEUE_PUBLIC_ORDERS_MAX_COUNT",
    CRAFTQUEUE_FIRST_CRAFTS_IGNORE_ACUITY_RECIPES = "CRAFTQUEUE_FIRST_CRAFTS_IGNORE_ACUITY_RECIPES",
    CRAFTQUEUE_FIRST_CRAFTS_IGNORE_SPARK_RECIPES = "CRAFTQUEUE_FIRST_CRAFTS_IGNORE_SPARK_RECIPES",
    CRAFTQUEUE_PATRON_ORDERS_SPARK_RECIPES = "CRAFTQUEUE_PATRON_ORDERS_SPARK_RECIPES",
    CRAFTQUEUE_PATRON_ORDERS_KNOWLEDGE_POINTS = "CRAFTQUEUE_PATRON_ORDERS_KNOWLEDGE_POINTS",
    CRAFTQUEUE_PATRON_ORDERS_ACUITY = "CRAFTQUEUE_PATRON_ORDERS_ACUITY",
    CRAFTQUEUE_PATRON_ORDERS_POWER_RUNE = "CRAFTQUEUE_PATRON_ORDERS_POWER_RUNE",
    CRAFTQUEUE_WORK_ORDERS_ALLOW_CONCENTRATION = "CRAFTQUEUE_WORK_ORDERS_ALLOW_CONCENTRATION",
    CRAFTQUEUE_WORK_ORDERS_FORCE_CONCENTRATION = "CRAFTQUEUE_WORK_ORDERS_FORCE_CONCENTRATION",
    CRAFTQUEUE_WORK_ORDERS_ONLY_PROFITABLE = "CRAFTQUEUE_WORK_ORDERS_ONLY_PROFITABLE",
    CRAFTQUEUE_EDIT_RECIPE_OPTIMIZE_PROFESSION_GEAR = "CRAFTQUEUE_EDIT_RECIPE_OPTIMIZE_PROFESSION_GEAR",
    CRAFTQUEUE_EDIT_RECIPE_OPTIMIZE_CONCENTRATION = "CRAFTQUEUE_EDIT_RECIPE_OPTIMIZE_CONCENTRATION",
    CRAFTQUEUE_EDIT_RECIPE_OPTIMIZE_TOP_PROFIT_QUALITY = "CRAFTQUEUE_EDIT_RECIPE_OPTIMIZE_TOP_PROFIT_QUALITY",
    CRAFTQUEUE_EDIT_RECIPE_OPTIMIZE_FINISHING_REAGENTS = "CRAFTQUEUE_EDIT_RECIPE_OPTIMIZE_FINISHING_REAGENTS",
    CRAFTQUEUE_QUEUE_OPEN_RECIPE_OPTIMIZE_TOP_PROFIT_QUALITY = "CRAFTQUEUE_QUEUE_OPEN_RECIPE_OPTIMIZE_TOP_PROFIT_QUALITY",
    CRAFTQUEUE_QUEUE_OPEN_RECIPE_OPTIMIZE_PROFESSION_GEAR = "CRAFTQUEUE_QUEUE_OPEN_RECIPE_OPTIMIZE_PROFESSION_GEAR",
    CRAFTQUEUE_QUEUE_OPEN_RECIPE_OPTIMIZE_CONCENTRATION = "CRAFTQUEUE_QUEUE_OPEN_RECIPE_OPTIMIZE_CONCENTRATION",
    CRAFTQUEUE_RESTOCK_FAVORITES_SMART_CONCENTRATION_QUEUING = "CRAFTQUEUE_RESTOCK_FAVORITES_SMART_CONCENTRATION_QUEUING",
    CRAFTQUEUE_RESTOCK_FAVORITES_OFFSET_CONCENTRATION_CRAFT_AMOUNT =
    "CRAFTQUEUE_RESTOCK_FAVORITES_OFFSET_CONCENTRATION_CRAFT_AMOUNT",
    RECIPESCAN_SEND_TO_CRAFTQUEUE_USE_TSM_RESTOCK_EXPRESSION = "RECIPESCAN_SEND_TO_CRAFTQUEUE_USE_TSM_RESTOCK_EXPRESSION",
    RECIPESCAN_SEND_TO_CRAFTQUEUE_CREATE_CRAFT_LIST = "RECIPESCAN_SEND_TO_CRAFTQUEUE_CREATE_CRAFT_LIST",
    CRAFTQUEUE_QUEUE_FAVORITES_OFFSET_QUEUE_AMOUNT = "CRAFTQUEUE_QUEUE_FAVORITES_OFFSET_QUEUE_AMOUNT",
    CRAFTQUEUE_QUEUE_FAVORITES_QUEUE_MAIN_PROFESSIONS = "CRAFTQUEUE_QUEUE_FAVORITES_QUEUE_MAIN_PROFESSIONS",
    CRAFTQUEUE_IGNORE_INGENUITY_PROCS = "CRAFTQUEUE_IGNORE_INGENUITY_PROCS",
    CRAFTQUEUE_REMOVE_ON_ALL_CONCENTRATION_USED = "CRAFTQUEUE_REMOVE_ON_ALL_CONCENTRATION_USED",
    CRAFTQUEUE_WORK_ORDERS_GUILD_ALTS_ONLY = "CRAFTQUEUE_WORK_ORDERS_GUILD_ALTS_ONLY",
    CRAFTQUEUE_QUEUE_PATRON_ORDERS_KP_MAX_COST = "CRAFTQUEUE_QUEUE_PATRON_ORDERS_KP_MAX_COST",
    CRAFTQUEUE_QUEUE_PATRON_ORDERS_MAX_COST = "CRAFTQUEUE_QUEUE_PATRON_ORDERS_MAX_COST",
    CRAFTQUEUE_QUEUE_PATRON_ORDERS_REAGENT_BAG_VALUE = "CRAFTQUEUE_QUEUE_PATRON_ORDERS_REAGENT_BAG_VALUE",
    --- table<currencyID, copperPerUnit> patron Manu Moxie reward valuation (nil until user sets any value)
    CRAFTQUEUE_QUEUE_PATRON_ORDERS_MOXIE_VALUES = "CRAFTQUEUE_QUEUE_PATRON_ORDERS_MOXIE_VALUES",
    CRAFTQUEUE_AUTO_SHOW = "CRAFTQUEUE_AUTO_SHOW",
    CRAFTQUEUE_RESTOCK_FAVORITES_AUTO_SHOPPING_LIST = "CRAFTQUEUE_RESTOCK_FAVORITES_AUTO_SHOPPING_LIST",
    CRAFTQUEUE_RESTOCK_FAVORITES_FINISHING_REAGENTS_INCLUDE_SOULBOUND = "CRAFTQUEUE_RESTOCK_FAVORITES_FINISHING_REAGENTS_INCLUDE_SOULBOUND",
    CRAFTQUEUE_EDIT_RECIPE_OPTIMIZE_FINISHING_REAGENTS_INCLUDE_SOULBOUND = "CRAFTQUEUE_EDIT_RECIPE_OPTIMIZE_FINISHING_REAGENTS_INCLUDE_SOULBOUND",
    CRAFTQUEUE_MIDNIGHT_SHATTER_MOTE_ITEMID = "CRAFTQUEUE_MIDNIGHT_SHATTER_MOTE_ITEMID",
    CRAFTQUEUE_UPDATE_LAST_CRAFTING_COST = "CRAFTQUEUE_UPDATE_LAST_CRAFTING_COST",

    -- COST OPTIMIZATION
    COST_OPTIMIZATION_AUTOMATIC_SUB_RECIPE_OPTIMIZATION = "COST_OPTIMIZATION_AUTOMATIC_SUB_RECIPE_OPTIMIZATION",
    COST_OPTIMIZATION_SUB_RECIPE_MAX_DEPTH = "COST_OPTIMIZATION_SUB_RECIPE_MAX_DEPTH",
    COST_OPTIMIZATION_SUB_RECIPE_INCLUDE_COOLDOWNS = "COST_OPTIMIZATION_SUB_RECIPE_INCLUDE_COOLDOWNS",
    COST_OPTIMIZATION_SUB_RECIPE_INCLUDE_CONCENTRATION = "COST_OPTIMIZATION_SUB_RECIPE_INCLUDE_CONCENTRATION",

    -- REAGENT OPTIMIZATION
    REAGENT_OPTIMIZATION_RECIPE_MAX_OPTIMIZATION_QUALITY = "REAGENT_OPTIMIZATION_RECIPE_MAX_OPTIMIZATION_QUALITY",
    REAGENT_OPTIMIZATION_TOP_PROFIT_ENABLED = "REAGENT_OPTIMIZATION_TOP_PROFIT_ENABLED",
    REAGENT_OPTIMIZATION_OPTIMIZE_CONCENTRATION_VALUE = "REAGENT_OPTIMIZATION_OPTIMIZE_CONCENTRATION_VALUE",
    REAGENT_OPTIMIZATION_OPTIMIZE_FINISHING_REAGENTS = "REAGENT_OPTIMIZATION_OPTIMIZE_FINISHING_REAGENTS",
    REAGENT_OPTIMIZATION_FINISHING_REAGENTS_ALGORITHM = "REAGENT_OPTIMIZATION_FINISHING_REAGENTS_ALGORITHM",
    REAGENT_OPTIMIZATION_OPTIMIZE_SOULBOUND_FINISHING_REAGENTS =
    "REAGENT_OPTIMIZATION_OPTIMIZE_SOULBOUND_FINISHING_REAGENTS",
    REAGENT_OPTIMIZATION_OPTIMIZE_LOCKED_FINISHING_REAGENTS = "REAGENT_OPTIMIZATION_OPTIMIZE_LOCKED_FINISHING_REAGENTS",

    -- CONCENTRATION TRACKER
    CONCENTRATION_TRACKER_PINNED = "CONCENTRATION_TRACKER_PINNED",
    CONCENTRATION_TRACKER_BLACKLIST = "CONCENTRATION_TRACKER_BLACKLIST",
    CONCENTRATION_TRACKER_SORT_MODE = "CONCENTRATION_TRACKER_SORT_MODE",
    CONCENTRATION_TRACKER_FORMAT_MODE = "CONCENTRATION_TRACKER_FORMAT_MODE",

    -- DEBUG
    DEBUG_IDS = "DEBUG_IDS",
    DEBUG_VISIBLE = "DEBUG_VISIBLE",
    DEBUG_AUTO_SCROLL = "DEBUG_AUTO_SCROLL",
}

---IDs used to identify individual OptimizationOptions button instances in the DB.
---@enum CraftSim.OPTIMIZATION_OPTIONS_IDS
CraftSim.CONST.OPTIMIZATION_OPTIONS_IDS = {
    RECIPESCAN_SCAN         = "RECIPESCAN_SCAN",
    CRAFTQUEUE_ADD_RECIPE   = "CRAFTQUEUE_ADD_RECIPE",
    CRAFTQUEUE_EDIT_RECIPE  = "CRAFTQUEUE_EDIT_RECIPE",
}

---@type table<CraftSim.GENERAL_OPTIONS, any>
CraftSim.CONST.GENERAL_OPTIONS_DEFAULTS = {
    -- LIBS
    [CraftSim.CONST.GENERAL_OPTIONS.GGUI_CONFIG] = {},
    [CraftSim.CONST.GENERAL_OPTIONS.LIB_ICON_DB] = {},
    -- GENERAL
    [CraftSim.CONST.GENERAL_OPTIONS.PRICE_SOURCE_REMINDER_DISABLED] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.NEWS_CHECKSUM] = nil,
    [CraftSim.CONST.GENERAL_OPTIONS.PRICE_DEBUG] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.PRICE_SOURCE] = nil, -- will be set on init
    [CraftSim.CONST.GENERAL_OPTIONS.QUALITY_BREAKPOINT_OFFSET] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.SHOW_PROFIT_PERCENTAGE] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.OPEN_LAST_RECIPE] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.SHOW_NEWS] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.MINIMAP_BUTTON_HIDE] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.MINIMAP_BUTTON_HIDE] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.MONEY_FORMAT_USE_TEXTURES] = false,
    -- TSM
    [CraftSim.CONST.GENERAL_OPTIONS.TSM_PRICE_KEY_REAGENTS] = CraftSim.CONST.TSM_DEFAULT_PRICE_EXPRESSION,
    [CraftSim.CONST.GENERAL_OPTIONS.TSM_PRICE_KEY_ITEMS] = CraftSim.CONST.TSM_DEFAULT_PRICE_EXPRESSION,
    [CraftSim.CONST.GENERAL_OPTIONS.TSM_RESTOCK_KEY_ITEMS] = "1",
    -- TSM ENHANCED
    [CraftSim.CONST.GENERAL_OPTIONS.TSM_DEPOSIT_ENABLED] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.TSM_DEPOSIT_EXPRESSION] = "vendorsell",
    [CraftSim.CONST.GENERAL_OPTIONS.TSM_SMART_RESTOCK_ENABLED] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.TSM_SMART_RESTOCK_INCLUDE_ALTS] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.TSM_SMART_RESTOCK_INCLUDE_WARBANK] = true,
    -- TOP GEAR
    [CraftSim.CONST.GENERAL_OPTIONS.TOP_GEAR_MODE] = "Top Profit",
    [CraftSim.CONST.GENERAL_OPTIONS.TOP_GEAR_AUTO_UPDATE] = true,
    -- MODULE VISIBILITIES
    [CraftSim.CONST.GENERAL_OPTIONS.MODULE_REAGENT_OPTIMIZATION] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.MODULE_AVERAGE_PROFIT] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.MODULE_TOP_GEAR] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.MODULE_COST_OVERVIEW] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.MODULE_SPEC_INFO] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.MODULE_PRICE_OVERRIDE] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.MODULE_RECIPE_SCAN] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.MODULE_CRAFT_LOG] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.MODULE_CUSTOMER_HISTORY] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.MODULE_COST_OPTIMIZATION] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.MODULE_CRAFT_QUEUE] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.MODULE_CRAFT_BUFFS] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.MODULE_COOLDOWNS] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.MODULE_EXPLANATIONS] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.MODULE_STATISTICS] = false,

    -- CUSTOMER HISTORY
    [CraftSim.CONST.GENERAL_OPTIONS.CUSTOMER_HISTORY_MAX_ENTRIES_PER_CLIENT] = 200,
    [CraftSim.CONST.GENERAL_OPTIONS.CUSTOMER_HISTORY_AUTO_PURGE_INTERVAL] = 2,
    [CraftSim.CONST.GENERAL_OPTIONS.CUSTOMER_HISTORY_AUTO_PURGE_LAST_PURGE] = nil,
    [CraftSim.CONST.GENERAL_OPTIONS.CUSTOMER_HISTORY_ENABLED] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CUSTOMER_HISTORY_REMOVAL_TIP_THRESHOLD] = 0,
    [CraftSim.CONST.GENERAL_OPTIONS.CUSTOMER_HISTORY_RECORD_PATRON_ORDERS] = false,

    -- RECIPE SCAN
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_INCLUDE_SOULBOUND] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_INCLUDE_GEAR] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_INCLUDE_NOT_LEARNED] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_ONLY_FAVORITES] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_OPTIMIZE_PROFESSION_TOOLS] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_SCAN_MODE] = "OPTIMIZE",
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_SORT_MODE] = "PROFIT",
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_SORT_MODE_ASCENDING] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_FILTERED_EXPANSIONS] = {
        [CraftSim.CONST.EXPANSION_IDS.MIDNIGHT] = true,
    },
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_OPTIMIZE_SUBRECIPES] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_USE_INSIGHT] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_INCLUDED_PROFESSIONS] = {},
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_ENABLE_CONCENTRATION] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_OPTIMIZE_REAGENTS_TOP_PROFIT] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_OPTIMIZE_CONCENTRATION_VALUE] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_OPTIMIZE_FINISHING_REAGENTS] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_OPTIMIZE_FINISHING_REAGENTS_INCLUDE_SOULBOUND] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_SEND_TO_CRAFTQUEUE_PROFIT_MARGIN_THRESHOLD] = 0,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_SEND_TO_CRAFTQUEUE_DEFAULT_QUEUE_AMOUNT] = 1,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_SEND_TO_CRAFTQUEUE_TSM_SALERATE_THRESHOLD] = 0.1,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_SCAN_PROFIT_MARGIN_THRESHOLD] = 0,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_SCAN_TSM_SALERATE_THRESHOLD] = 0,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_AUTOSELECT_OPEN_PROFESSION] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_UPDATE_LAST_CRAFTING_COST] = false,

    -- COOLDOWNS
    [CraftSim.CONST.GENERAL_OPTIONS.COOLDOWNS_FILTERED_EXPANSIONS] = {
        [CraftSim.CONST.EXPANSION_IDS.THE_WAR_WITHIN] = true,
        [CraftSim.CONST.EXPANSION_IDS.MIDNIGHT] = true,
    },

    -- PROFIT CALCULATION
    [CraftSim.CONST.GENERAL_OPTIONS.PROFIT_CALCULATION_MULTICRAFT_CONSTANTS] = CraftSim.CONST.MULTICRAFT_CONSTANTS,
    [CraftSim.CONST.GENERAL_OPTIONS.PROFIT_CALCULATION_RESOURCEFULNESS_CONSTANT] = CraftSim.CONST
        .BASE_RESOURCEFULNESS_AVERAGE_SAVE_FACTOR,

    -- CRAFTING
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTING_GARBAGE_COLLECTION_ENABLED] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTING_GARBAGE_COLLECTION_CRAFTS] = 500,

    -- CRAFT LOG
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFT_LOG_DISABLE] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFT_LOG_DISABLE_ADV_DATA] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFT_LOG_HIDE_BLIZZARD_CRAFTING_LOG] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFT_LOG_SHOW_ADV_LOG] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFT_LOG_AUTO_SHOW] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFT_LOG_IGNORE_WORK_ORDERS] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFT_LOG_SELECTED_RECIPE_REAGENT_COMBINATION_ID] = {},

    -- CRAFT QUEUE
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_FLASH_TASKBAR_ON_CRAFT_FINISHED] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_WORK_ORDERS_INCLUDE_PATRON_ORDERS] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_WORK_ORDERS_INCLUDE_GUILD_ORDERS] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_WORK_ORDERS_INCLUDE_PERSONAL_ORDERS] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_WORK_ORDERS_INCLUDE_PUBLIC_ORDERS] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_PUBLIC_ORDERS_MAX_COUNT] = 0,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_FIRST_CRAFTS_IGNORE_ACUITY_RECIPES] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_FIRST_CRAFTS_IGNORE_SPARK_RECIPES] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_PATRON_ORDERS_SPARK_RECIPES] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_PATRON_ORDERS_KNOWLEDGE_POINTS] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_PATRON_ORDERS_ACUITY] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_PATRON_ORDERS_POWER_RUNE] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_WORK_ORDERS_ALLOW_CONCENTRATION] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_WORK_ORDERS_FORCE_CONCENTRATION] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_WORK_ORDERS_ONLY_PROFITABLE] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_EDIT_RECIPE_OPTIMIZE_PROFESSION_GEAR] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_EDIT_RECIPE_OPTIMIZE_CONCENTRATION] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_EDIT_RECIPE_OPTIMIZE_TOP_PROFIT_QUALITY] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_EDIT_RECIPE_OPTIMIZE_FINISHING_REAGENTS] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_QUEUE_OPEN_RECIPE_OPTIMIZE_TOP_PROFIT_QUALITY] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_QUEUE_OPEN_RECIPE_OPTIMIZE_PROFESSION_GEAR] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_QUEUE_OPEN_RECIPE_OPTIMIZE_CONCENTRATION] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_RESTOCK_FAVORITES_SMART_CONCENTRATION_QUEUING] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_RESTOCK_FAVORITES_OFFSET_CONCENTRATION_CRAFT_AMOUNT] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_SEND_TO_CRAFTQUEUE_USE_TSM_RESTOCK_EXPRESSION] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.RECIPESCAN_SEND_TO_CRAFTQUEUE_CREATE_CRAFT_LIST] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_QUEUE_FAVORITES_OFFSET_QUEUE_AMOUNT] = 0,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_QUEUE_FAVORITES_QUEUE_MAIN_PROFESSIONS] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_IGNORE_INGENUITY_PROCS] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_REMOVE_ON_ALL_CONCENTRATION_USED] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_WORK_ORDERS_GUILD_ALTS_ONLY] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_QUEUE_PATRON_ORDERS_KP_MAX_COST] = 10000 * 5000,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_QUEUE_PATRON_ORDERS_MAX_COST] = 0,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_QUEUE_PATRON_ORDERS_REAGENT_BAG_VALUE] = 0,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_AUTO_SHOW] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_RESTOCK_FAVORITES_AUTO_SHOPPING_LIST] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_RESTOCK_FAVORITES_FINISHING_REAGENTS_INCLUDE_SOULBOUND] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_EDIT_RECIPE_OPTIMIZE_FINISHING_REAGENTS_INCLUDE_SOULBOUND] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_MIDNIGHT_SHATTER_MOTE_ITEMID] = nil,
    [CraftSim.CONST.GENERAL_OPTIONS.CRAFTQUEUE_UPDATE_LAST_CRAFTING_COST] = false,

    -- COST OPTIMIZATION
    [CraftSim.CONST.GENERAL_OPTIONS.COST_OPTIMIZATION_AUTOMATIC_SUB_RECIPE_OPTIMIZATION] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.COST_OPTIMIZATION_SUB_RECIPE_MAX_DEPTH] = 1,
    [CraftSim.CONST.GENERAL_OPTIONS.COST_OPTIMIZATION_SUB_RECIPE_INCLUDE_COOLDOWNS] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.COST_OPTIMIZATION_SUB_RECIPE_INCLUDE_CONCENTRATION] = false,

    -- REAGENT OPTIMIZATION
    [CraftSim.CONST.GENERAL_OPTIONS.REAGENT_OPTIMIZATION_RECIPE_MAX_OPTIMIZATION_QUALITY] = {},
    [CraftSim.CONST.GENERAL_OPTIONS.REAGENT_OPTIMIZATION_TOP_PROFIT_ENABLED] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.REAGENT_OPTIMIZATION_OPTIMIZE_CONCENTRATION_VALUE] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.REAGENT_OPTIMIZATION_OPTIMIZE_FINISHING_REAGENTS] = true,
    [CraftSim.CONST.GENERAL_OPTIONS.REAGENT_OPTIMIZATION_FINISHING_REAGENTS_ALGORITHM] = "SIMPLE",
    [CraftSim.CONST.GENERAL_OPTIONS.REAGENT_OPTIMIZATION_OPTIMIZE_SOULBOUND_FINISHING_REAGENTS] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.REAGENT_OPTIMIZATION_OPTIMIZE_LOCKED_FINISHING_REAGENTS] = false,

    --- CONCENTRATION TRACKER
    [CraftSim.CONST.GENERAL_OPTIONS.CONCENTRATION_TRACKER_PINNED] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.CONCENTRATION_TRACKER_BLACKLIST] = {},
    [CraftSim.CONST.GENERAL_OPTIONS.CONCENTRATION_TRACKER_SORT_MODE] = "CHARACTER",
    [CraftSim.CONST.GENERAL_OPTIONS.CONCENTRATION_TRACKER_FORMAT_MODE] = "EUROPE_MAX_DATE",

    -- DEBUG
    [CraftSim.CONST.GENERAL_OPTIONS.DEBUG_IDS] = {},
    [CraftSim.CONST.GENERAL_OPTIONS.DEBUG_VISIBLE] = false,
    [CraftSim.CONST.GENERAL_OPTIONS.DEBUG_AUTO_SCROLL] = true,
}

CraftSim.CONST.ERROR = {
    NO_PRICE_DATA = 0,
    NO_RECIPE_DATA = 1
}

--> used in GUTIL now
-- if more needed, add https://wowpedia.fandom.com/wiki/LE_ITEM_BIND
CraftSim.CONST.BINDTYPES = {
    SOULBOUND = 1
}

CraftSim.CONST.PROFESSIONTOOL_INV_TYPES = {
    TOOL = "INVTYPE_PROFESSION_TOOL",
    GEAR = "INVTYPE_PROFESSION_GEAR"
}

-- for isGear initialization in recipeData
CraftSim.CONST.INVENTORY_TYPES_NON_GEAR = {
    "INVTYPE_NON_EQUIP_IGNORE",
    "INVTYPE_NON_EQUIP",
    "INVTYPE_BAG",
    "INVTYPE_AMMO",
    "INVTYPE_QUIVER",
    "INVTYPE_RELIC",
    "INVTYPE_EQUIPABLESPELL_OFFENSIVE",
    "INVTYPE_EQUIPABLESPELL_UTILITY",
    "INVTYPE_EQUIPABLESPELL_DEFENSIVE",
    "INVTYPE_EQUIPABLESPELL_WEAPON",
}

---@enum CraftSim.ItemEquipLocation
CraftSim.CONST.ITEM_EQUIP_LOCATIONS = {
    INVTYPE_NON_EQUIP = "INVTYPE_NON_EQUIP",
    INVTYPE_HEAD = "INVTYPE_HEAD",
    INVTYPE_NECK = "INVTYPE_NECK",
    INVTYPE_SHOULDER = "INVTYPE_SHOULDER",
    INVTYPE_BODY = "INVTYPE_BODY",
    INVTYPE_CHEST = "INVTYPE_CHEST",
    INVTYPE_WAIST = "INVTYPE_WAIST",
    INVTYPE_LEGS = "INVTYPE_LEGS",
    INVTYPE_FEET = "INVTYPE_FEET",
    INVTYPE_WRIST = "INVTYPE_WRIST",
    INVTYPE_HAND = "INVTYPE_HAND",
    INVTYPE_FINGER = "INVTYPE_FINGER",
    INVTYPE_TRINKET = "INVTYPE_TRINKET",
    INVTYPE_WEAPON = "INVTYPE_WEAPON",
    INVTYPE_SHIELD = "INVTYPE_SHIELD",
    INVTYPE_RANGED = "INVTYPE_RANGED",
    INVTYPE_CLOAK = "INVTYPE_CLOAK",
    INVTYPE_2HWEAPON = "INVTYPE_2HWEAPON",
    INVTYPE_BAG = "INVTYPE_BAG",
    INVTYPE_TABARD = "INVTYPE_TABARD",
    INVTYPE_ROBE = "INVTYPE_ROBE",
    INVTYPE_WEAPONMAINHAND = "INVTYPE_WEAPONMAINHAND",
    INVTYPE_WEAPONOFFHAND = "INVTYPE_WEAPONOFFHAND",
    INVTYPE_HOLDABLE = "INVTYPE_HOLDABLE",
    INVTYPE_AMMO = "INVTYPE_AMMO",
    INVTYPE_THROWN = "INVTYPE_THROWN",
    INVTYPE_RANGEDRIGHT = "INVTYPE_RANGEDRIGHT",
    INVTYPE_QUIVER = "INVTYPE_QUIVER",
    INVTYPE_RELIC = "INVTYPE_RELIC",
    INVTYPE_PROFESSION_TOOL = "INVTYPE_PROFESSION_TOOL",
    INVTYPE_PROFESSION_GEAR = "INVTYPE_PROFESSION_GEAR",
    INVTYPE_EQUIPABLESPELL_OFFENSIVE = "INVTYPE_EQUIPABLESPELL_OFFENSIVE",
    INVTYPE_EQUIPABLESPELL_UTILITY = "INVTYPE_EQUIPABLESPELL_UTILITY",
    INVTYPE_EQUIPABLESPELL_DEFENSIVE = "INVTYPE_EQUIPABLESPELL_DEFENSIVE",
    INVTYPE_EQUIPABLESPELL_WEAPON = "INVTYPE_EQUIPABLESPELL_WEAPON",
}

CraftSim.CONST.STAT_MAP = {
    ITEM_MOD_RESOURCEFULNESS_SHORT = "resourcefulness",
    ITEM_MOD_MULTICRAFT_SHORT = "multicraft",
    ITEM_MOD_CRAFTING_SPEED_SHORT = "craftingspeed",
    ITEM_MOD_INGENUITY_SHORT = "ingenuity",
    CRAFTING_DETAILS_RECIPE_DIFFICULTY = "recipedifficulty",
    CRAFTING_DETAILS_SKILL = "skill",
    CRAFTING_DETAILS_MULTICRAFT = "multicraft",
    CRAFTING_DETAILS_RESOURCEFULNESS = "resourcefulness",
    CRAFTING_DETAILS_INGENUITY = "ingenuity",
}

CraftSim.CONST.EMPTY_SLOT_LINK = "empty"
CraftSim.CONST.EMPTY_SLOT_TEXTURE = "Interface\\containerframe\\bagsitemslot2x"

CraftSim.CONST.SUPPORTED_PRICE_API_ADDONS = { "TradeSkillMaster", "Auctionator", "RECrystallize", "OribosExchange" }

CraftSim.CONST.REAGENT_TYPE = {
    OPTIONAL = 0,
    REQUIRED = 1,
    FINISHING_REAGENT = 2,
    AUTOMATIC = 3,
}

CraftSim.CONST.TRADESKILL_SLOT_DATA_TYPE = {
    REAGENT = 1,
    MODIFIED_REAGENT = 2,
    CURRENCY = 3,
}

CraftSim.CONST.AUCTION_HOUSE_CUT = 0.95

CraftSim.CONST.ENCHANTING_VELLUM_ID = 38682

---@enum CraftSim.BuffID
CraftSim.CONST.BUFF_IDS = {
    --- DF
    -- all professions
    PHIAL_OF_QUICK_HANDS = 393665,
    PHIAL_OF_QUICK_HANDS_SPELL_Q1 = 381264,
    PHIAL_OF_QUICK_HANDS_SPELL_Q2 = 393689,
    PHIAL_OF_QUICK_HANDS_SPELL_Q3 = 393692,

    SAGACIOUS_INCENSE = 371234,

    -- cooking
    CHEFS_HAT = 67556,

    -- enchanting
    ELEMENTAL_SHATTER_AIR = 392761,
    ELEMENTAL_SHATTER_FIRE = 392819,
    ELEMENTAL_SHATTER_EARTH = 392812,
    ELEMENTAL_SHATTER_FROST = 392820,
    ELEMENTAL_SHATTER_ORDER = 392821,

    -- alchemy
    ALCHEMICALLY_INSPIRED = 382093,

    --- TWW

    -- all professions
    PHIAL_OF_BOUNTIFUL_SEASONS = 432286,
    PHIAL_OF_AMBIDEXTERITY = 432304,
    PHIAL_OF_CONCENTRATED_INGENUITY = 432306,
    WEAVERS_TUTELAGE = 442981,
    WEAVERS_PRODIGY = 462810,

    -- Blacksmithing
    EVERBURNING_IGNITION = 453734,

    -- Enchanting
    SHATTERING_ESSENCE = 445798,

    -- Alchemy
    POTION_SPILL_OVER = 433187,
    FLASK_SPILL_OVER = 433188,
    PHIAL_SPILL_OVER = 433230,

    -- Engineering
    INVENTORS_GUILE = 452519,

    -- Inscription
    IMPROVED_CIPHERS = 454547,
    IMPROVED_MILLING = 454548,
    IMPROVED_INKS = 454549,
    IMPROVED_CONTRACTS = 454550,
    IMPROVED_MISSIVES = 454551,
    IMPROVED_VANTUS = 454552,

    --- MIDNIGHT
    SHATTERING_ESSENCE_MIDNIGHT = 1235733,
    HARANIR_PHIAL_OF_INGENUITY = 1239755,
}

CraftSim.CONST.LOCALES = {
    EN = "enUS",
    DE = "deDE",
    IT = "itIT",
    RU = "ruRU",
    PT = "ptBR",
    ES = "esES",
    FR = "frFR",
    MX = "esMX",
    KO = "koKR",
    TW = "zhTW",
    CN = "zhCN",
}

---@type table<CraftSim.EXPANSION_IDS, Enum.Profession[]>
CraftSim.CONST.IMPLEMENTED_SPECIALIZATION_DATA =
{
    [CraftSim.CONST.EXPANSION_IDS.DRAGONFLIGHT] = {
        Enum.Profession.Alchemy,
        Enum.Profession.Blacksmithing,
        Enum.Profession.Enchanting,
        Enum.Profession.Engineering,
        Enum.Profession.Inscription,
        Enum.Profession.Jewelcrafting,
        Enum.Profession.Leatherworking,
        Enum.Profession.Tailoring,
    },
    [CraftSim.CONST.EXPANSION_IDS.THE_WAR_WITHIN] = {
        Enum.Profession.Alchemy,
        Enum.Profession.Blacksmithing,
        Enum.Profession.Enchanting,
        Enum.Profession.Engineering,
        Enum.Profession.Inscription,
        Enum.Profession.Jewelcrafting,
        Enum.Profession.Leatherworking,
        Enum.Profession.Tailoring,
    },
    [CraftSim.CONST.EXPANSION_IDS.MIDNIGHT] = {
        Enum.Profession.Alchemy,
        Enum.Profession.Blacksmithing,
        Enum.Profession.Enchanting,
        Enum.Profession.Engineering,
        Enum.Profession.Inscription,
        Enum.Profession.Jewelcrafting,
        Enum.Profession.Leatherworking,
        Enum.Profession.Tailoring,
    },
}

CraftSim.CONST.BASE_RECRAFT_RECIPE_IDS = {
    -- DF
    385304, -- Blacksmithing
    389195, -- Leatherworking
    389191, -- Enchanting
    389192, -- Engineering
    389193, -- Inscription
    389194, -- Jewelcrafting
    389195, -- Tailoring

}

CraftSim.CONST.REAGENT_ID_EXCEPTION_MAPPING = {
    [199345] = 200074, -- frosted rimefin tuna to rimefin tuna, due to frosted generating it, and rimefin tuna being soulbound
}

CraftSim.CONST.EXCEPTION_ORDER_ITEM_IDS = {
    [382363] = { 198236, 198237, 198238 }
}

CraftSim.CONST.SPECIAL_TOOL_STATS = {
    [191228] = { -- DF https://www.wowhead.com/beta/item=191228/black-dragon-touched-hammer
        ingenuityrefundincrease = 5
    },
    [224116] = { -- TWW https://www.wowhead.com/beta/item=224116/runed-null-stone-rod
        reduceconcentrationcost = 1
    },
}

CraftSim.CONST.ITEM_IDS = {
    REQUIRED_SELECTABLE_ITEMS = {
        SPARK_OF_INGENUITY = 190453,
        SPARK_OF_OMENS = 211296,
        SPARK_OF_RADIANCE = 232875,
    },
    OPTIONAL_REAGENTS = {
        ILLUSTRIOUS_INSIGHT = 191529,
        LESSER_ILLUSTRIOUS_INSIGHT = 191526,
    },
    PROFESSION_BAGS = {
        HIDESHAPERS_WORKBAG = 222861,          -- leatherworking reagents
        MAGICALLY_INFINITE_MESSENGER = 222862, -- ench shatter buff
        IGNITION_SATCHEL = 222860,             -- bs ignition buff
        CONCOCTORS_CLUTCH = 222859,            -- alchemy experiments
        DARKMOON_DUFFLE = 222864,              -- inscription darkmoon cards
        JEWELERS_PURSE = 222867,               -- Jewelcrafting crushing
        PRODIGYS_TOOLBOX = 222863,             -- Engineering piles of rusted scrap
        THE_SEVERED_SATCHEL = 224852,          -- Tailoring Unraveling
    },
    CURRENCY = {
        ARTISANS_METTLE = 190456,
        ARTISANS_ACUITY = 210814,
        FUSED_VITALITY = 245345,
    },
}

CraftSim.CONST.AUCTIONATOR_SHOPPING_LIST_QUEUE_NAME = 'CraftSim CraftQueue'


CraftSim.CONST.ATLAS_TEXTURES = {
    TRADESKILL_ICON_ADD = 'tradeskills-icon-add',
    CHECKMARK = 'UI-QuestTracker-Tracker-Check',
    CROSS = 'UI-QuestTracker-Objective-Fail',
    UPGRADE_ARROW = 'CovenantSanctum-Upgrade-Icon-Available',
    UPGRADE_ARROW_2 = 'loottoast-arrow-green',
    OPTIONS_COG_WHEEL = "mechagon-projects",
    FILTER_NORMAL = "Map-Filter-Button",
    FILTER_PUSHED = "Map-Filter-Button-down",
}

---@class CraftSim.CONST.BUTTON_TEXTURE_OPTIONS
CraftSim.CONST.BUTTON_TEXTURE_OPTIONS = {
    ---@type GGUI.ButtonTextureOptions
    OPTIONS = {
        normal = CraftSim.CONST.ATLAS_TEXTURES.OPTIONS_COG_WHEEL,
        disabled = CraftSim.CONST.ATLAS_TEXTURES.OPTIONS_COG_WHEEL,
        highlight = CraftSim.CONST.ATLAS_TEXTURES.OPTIONS_COG_WHEEL,
        pushed = CraftSim.CONST.ATLAS_TEXTURES.OPTIONS_COG_WHEEL,
        isAtlas = true
    },
    FILTER = {
        normal = CraftSim.CONST.ATLAS_TEXTURES.FILTER_NORMAL,
        disabled = CraftSim.CONST.ATLAS_TEXTURES.FILTER_NORMAL,
        highlight = CraftSim.CONST.ATLAS_TEXTURES.FILTER_NORMAL,
        pushed = CraftSim.CONST.ATLAS_TEXTURES.FILTER_PUSHED,
        isAtlas = true
    },
}

CraftSim.CONST.CONCENTRATION_ICON = 5747318
CraftSim.CONST.FIRST_CRAFT_KP_ICON = "Professions_Icon_FirstTimeCraft"

---@type table<Enum.Profession, string>
CraftSim.CONST.PROFESSION_ICONS = {
    [Enum.Profession.Blacksmithing] = "Interface\\Icons\\ui_profession_blacksmithing",
    [Enum.Profession.Leatherworking] = "Interface\\Icons\\ui_profession_leatherworking",
    [Enum.Profession.Alchemy] = "Interface\\Icons\\ui_profession_alchemy",
    [Enum.Profession.Herbalism] = "Interface\\Icons\\ui_profession_herbalism",
    [Enum.Profession.Cooking] = "Interface\\Icons\\ui_profession_cooking",
    [Enum.Profession.Mining] = "Interface\\Icons\\ui_profession_mining",
    [Enum.Profession.Tailoring] = "Interface\\Icons\\ui_profession_tailoring",
    [Enum.Profession.Engineering] = "Interface\\Icons\\ui_profession_engineering",
    [Enum.Profession.Enchanting] = "Interface\\Icons\\ui_profession_enchanting",
    [Enum.Profession.Fishing] = "Interface\\Icons\\ui_profession_fishing",
    [Enum.Profession.Skinning] = "Interface\\Icons\\ui_profession_skinning",
    [Enum.Profession.Jewelcrafting] = "Interface\\Icons\\ui_profession_jewelcrafting",
    [Enum.Profession.Inscription] = "Interface\\Icons\\ui_profession_inscription",

}

---@type table<Enum.Profession, boolean>
CraftSim.CONST.GATHERING_PROFESSIONS = {
    [Enum.Profession.Herbalism] = true,
    [Enum.Profession.Mining] = true,
    [Enum.Profession.Fishing] = true,
    [Enum.Profession.Skinning] = true,
}

---@enum CraftSim.SHARED_PROFESSION_COOLDOWNS
CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS = {
    DF_ALCHEMY_TRANSMUTATIONS = "DF_ALCHEMY_TRANSMUTATIONS",
    --- Midnight enchanting spells that share one mote/elemental-style lockout (e.g. ~18h).
    --- Wire each spell recipeID in SHARED_PROFESSION_COOLDOWNS_RECIPE_ID_MAP and list the same IDs in SHARED_PROFESSION_COOLDOWNS_RECIPES.
    MIDNIGHT_ALCHEMY_TRANSMUTATIONS = "MIDNIGHT_ALCHEMY_TRANSMUTATIONS",
}

CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS_RECIPE_ID_MAP = {
    [405847] = CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS.DF_ALCHEMY_TRANSMUTATIONS, -- DRACOTHYST
    [370714] = CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS.DF_ALCHEMY_TRANSMUTATIONS, -- DECAY
    [370715] = CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS.DF_ALCHEMY_TRANSMUTATIONS, -- ORDER_TO_ELEMENTS
    [370711] = CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS.DF_ALCHEMY_TRANSMUTATIONS, -- AWAKENED_AIR
    [370710] = CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS.DF_ALCHEMY_TRANSMUTATIONS, -- AWAKENED_EARTH
    [370707] = CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS.DF_ALCHEMY_TRANSMUTATIONS, -- AWAKENED_FIRE
    [370708] = CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS.DF_ALCHEMY_TRANSMUTATIONS, -- AWAKENED_FROST

    -- Midnight Alchemy: add one line per recipe spell ID that shares this lockout, all mapping to MIDNIGHT_ALCHEMY_TRANSMUTATIONS.
    [1230887] = CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS.MIDNIGHT_ALCHEMY_TRANSMUTATIONS,
    [1230888] = CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS.MIDNIGHT_ALCHEMY_TRANSMUTATIONS,
    [1230889] = CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS.MIDNIGHT_ALCHEMY_TRANSMUTATIONS,
    [1230890] = CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS.MIDNIGHT_ALCHEMY_TRANSMUTATIONS,
}

--- used for the cooldown module tooltip to list all connected recipes
---@type table<CraftSim.SHARED_PROFESSION_COOLDOWNS, RecipeID[]>
CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS_RECIPES = {
    [CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS.DF_ALCHEMY_TRANSMUTATIONS] = {
        405847, -- DRACOTHYST
        370714, -- DECAY
        370715, -- ORDER_TO_ELEMENTS
        370711, -- AWAKENED_AIR
        370710, -- AWAKENED_EARTH
        370707, -- AWAKENED_FIRE
        370708, -- AWAKENED_FROST
    },
    [CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS.MIDNIGHT_ALCHEMY_TRANSMUTATIONS] = {
        1230887,
        1230888,
        1230889,
        1230890,
    },
}

---@type table <CraftSim.SHARED_PROFESSION_COOLDOWNS, CraftSim.LOCALIZATION_IDS>
CraftSim.CONST.SHARED_PROFESSION_COOLDOWNS.TRANSLATION_IDS = {
    DF_ALCHEMY_TRANSMUTATIONS = "DF_ALCHEMY_TRANSMUTATIONS",
    MIDNIGHT_ALCHEMY_TRANSMUTATIONS = "MIDNIGHT_ALCHEMY_TRANSMUTATIONS"
}

CraftSim.CONST.CRAFT_QUEUE_STATUS_TEXTURES = {
    LEARNED = {
        isAtlas = true,
        texture = "Profession",
        x = 25,
        y = 25,
    },
    TOOLS = {
        isAtlas = true,
        texture = "Professions-Crafting-Orders-Icon",
        x = 25,
        y = 25,
    },
    COOLDOWN = {
        isAtlas = true,
        texture = "ChromieTime-32x32",
        x = 25,
        y = 25,
    },
    REAGENTS = {
        isAtlas = true,
        texture = "Banker",
        x = 25,
        y = 25,
    },
    PROFESSION = {
        isAtlas = true,
        texture = "mechagon-projects",
        x = 25,
        y = 25,
    },
    CRAFTER = {
        isAtlas = true,
        texture = "UI-ChatIcon-App",
        x = 25,
        y = 25,
    },
}

CraftSim.CONST.FONT_FILES = {
    ROBOTO = 'Interface/addons/CraftSim/Media/Fonts/Roboto-Regular.ttf',
    MONOSPACE = 'Interface/addons/CraftSim/Media/Fonts/SpaceMono-Regular.ttf',
}

CraftSim.CONST.PATRON_ORDERS_KNOWLEDGE_REWARD_ITEMS = {
    CATCHUP = {
        228724, -- alchemy
        228726, --blacksmithing
        228728, --enchanting
        228730, --engineering
        228732, --inscription
        228734, --jewelcrafting
        228736, --leatherworking
        228738, --tailoring
        -- MIDNIGHT
        246320, -- alchemy
        246322, -- blacksmithing
        246324, -- enchanting
        246326, -- engineering
        246328, -- inscription
        246330, -- jewelcrafting
        246332, -- leatherworking
        246334, -- tailoring
    },
    WEEKLY = {
        228725, --alchemy
        228727, --blacksmithing
        228729, --enchanting
        228731, --engineering
        228733, --inscription
        228735, --jewelcrafting
        228737, --leatherworking
        228739, --tailoring
        -- MIDNIGHT
        246321, -- alchemy
        246323, -- blacksmithing
        246325, -- enchanting
        246327, -- engineering
        246329, -- inscription
        246331, -- jewelcrafting
        246333, -- leatherworking
        246335, -- tailoring
    },
}

CraftSim.CONST.PATRON_ORDERS_REAGENT_BAG_REWARD_ITEMS = {
    [227713] = true, -- https://www.wowhead.com/item=227713/artisans-consortium-payout
    [246585] = true, -- https://www.wowhead.com/item=246585/
}

CraftSim.CONST.PATRON_ORDERS_ACUITY_REWARD_ITEMS = {
    -- TWW
    210814, -- https://www.wowhead.com/item=210814/
    -- MIDNIGHT: acuity no longer used
}

CraftSim.CONST.PATRON_ORDERS_POWER_RUNE_REWARD_ITEMS = {
    -- TWW
    224572, -- https://www.wowhead.com/item=224572/
    -- MIDNIGHT
    259085, -- https://www.wowhead.com/item=259085/
}

--- Midnight expansion: contiguous IDs 3256–3266 (gathering professions included). See Wowhead currency pages.
CraftSim.CONST.MOXIE_CURRENCY_IDS = {
    3256, -- alchemy
    3257, -- blacksmithing
    3258, -- enchanting
    3259, -- engineering
    3260, -- herbalism
    3261, -- inscription (Artisan Scribe's Moxie)
    3262, -- jewelcrafting
    3263, -- leatherworking
    3264, -- mining
    3265, -- skinning
    3266, -- tailoring
}

--- Manu Moxie currency per profession (same order as MOXIE_CURRENCY_IDS where applicable).
---@type table<Enum.Profession, number>
CraftSim.CONST.MOXIE_CURRENCY_ID_BY_PROFESSION = {
    [Enum.Profession.Alchemy] = 3256,
    [Enum.Profession.Blacksmithing] = 3257,
    [Enum.Profession.Enchanting] = 3258,
    [Enum.Profession.Engineering] = 3259,
    [Enum.Profession.Herbalism] = 3260,
    [Enum.Profession.Inscription] = 3261,
    [Enum.Profession.Jewelcrafting] = 3262,
    [Enum.Profession.Leatherworking] = 3263,
    [Enum.Profession.Mining] = 3264,
    [Enum.Profession.Skinning] = 3265,
    [Enum.Profession.Tailoring] = 3266,
}

--- Extra Moxie from a recipe's first craft (10; stacked on npc patron listed rewards when the same currency appears).
CraftSim.CONST.PATRON_ORDER_FIRST_CRAFT_EXTRA_MOXIE = 10

CraftSim.CONST.SOULBOUND_UPCRAFT_REAGENTS_DATA = {
    {
        upcraftItemID = 247724, -- Multicraft Manifold
        preItemID = 247719, -- Multicraft Matrix
        requiredQuantity = 5,
    }, 
    -- Resourceful Routing
    {
        upcraftItemID = 247726, -- Resourceful Routing
        preItemID = 247725, -- Resourceful Rebar
        requiredQuantity = 5,
    }, 
    -- Ingenious Identity
    {
        upcraftItemID = 247788, -- Ingenious Identity
        preItemID = 260630, -- Ingenious Identifier
        requiredQuantity = 5,
    },
    --- Artisan's Ledger
    {
        upcraftItemID = 246448, -- Artisan's Ledger
        preItemID = 246447, -- Apprentices Scribbles
        requiredQuantity = 5,
    },
    --- Mentors Helpful Handiwork
    {
        upcraftItemID = 246449, -- Mentors Helpful Handiwork
        preItemID = 246448, -- Artisan's Ledger
        requiredQuantity = 5,

    },
    --- Artisans Consortium Goldstar
    {
        upcraftItemID = 246450, -- Artisans Consortium Goldstar
        preItemID = 246449, -- Mentors Helpful Handiwork
        requiredQuantity = 5,
    },
}

CraftSim.CONST.QUICK_ACCESS_RECIPE_IDS = {
    MIDNIGHT_ENCHANTING_SHATTER = 1235731,
}
