-- ============================================================================
-- HDG_signatures.lua - API Reference
-- HousingDecorGuide Public Function Signatures
-- Auto-generated reference - do not execute, documentation only
-- ============================================================================

-- ============================================================================
-- HDG_Core.lua - Global Namespace
-- ============================================================================
-- HousingDecorGuide = {} -- Global addon table (defined in HDG_Core.lua)

-- ============================================================================
-- HDG_Config.lua - Constants, Settings, Logging
-- ============================================================================
-- privateDB.CONFIG                                 -- Configuration constants table (sizes, colors, textures)
-- privateDB.Log(level, message, ...)               -- Internal logging with LOG_LEVEL filter
-- privateDB.LOG_LEVEL                              -- { DEBUG=1, INFO=2, WARN=3, ERROR=4 }
-- privateDB.ValidateSettings()                     -- Validate/initialize HDG_Settings with defaults
-- privateDB.MigrateToStore()                       -- Migrate legacy HDG_Settings to HDG_DB (Store)
-- privateDB.CreateSettingsProxy()                  -- Create backward-compat proxy for HDG_Settings
-- privateDB.InitSettingsProxy()                    -- Initialize settings proxy after Store ready

-- ============================================================================
-- HDG_ExpansionData.lua - Zone/Expansion Lookups, BoP Reagents
-- ============================================================================
-- ZONE_DATA (local)                                  -- SSoT: string keys = {mapID, xpac}, int keys = xpac
HDG_ExpansionData.ZONE_MAP_IDS                        -- Built from ZONE_DATA: zoneName -> mapID
HDG_ExpansionData.GetMapIDForZone(zoneName)            -- Lookup mapID for a zone display name
HDG_ExpansionData.GetExpansionForMapID(mapID)           -- Resolve mapID to expansion (walks parent chain)
HDG_ExpansionData.IsBoPReagent(itemID)                 -- Check if itemID is a BoP crafting reagent

-- ============================================================================
-- HDG_Data.lua - Recipe/Collection Data Access
-- ============================================================================
HDG_Data.GetCachedItemName(itemID)                  -- Get item name (cached, async loads if needed)
HDG_Data.GetCachedItemNameLower(itemID)             -- Get pre-lowercased item name (for search filtering)
HDG_Data.GetLocalizedName(itemID, fallbackName)     -- Get localized name, prefer WoW API
HDG_Data.IsItemCollected(itemID)                    -- Check if decor item is collected (by itemID, caches negatives)
HDG_Data.IsDecorCollected(decorID)                  -- Check if decor is collected (by decorID)
HDG_Data.MarkDecorCollected(decorID)                -- Force-mark decor as collected (bypasses API delay)
HDG_Data.ClearCaches()                              -- Clear item name and collection caches
HDG_Data.GetItemCount(itemID)                       -- Get total item count (bags+bank+warband)
HDG_Data.GetItemCountWithVariants(itemID)           -- Get count including all quality variants (R1+R2+R3)
HDG_Data.GetPersonalItemCount(itemID)               -- Get count excluding Warband Bank
HDG_Data.GetWarbandBankCount(itemID)                -- Get count in Warband Bank only
HDG_Data.SaveCharacterLumberInventory()             -- Save current char's lumber to Store
HDG_Data.GetAccountWideLumberCount(lumberId)        -- Get account-wide lumber total + breakdown
HDG_Data.GetLumberBreakdown(lumberId)               -- Get per-character lumber breakdown
HDG_Data.PlayerKnowsRecipeBySpellID(spellID)        -- Check if player knows recipe (by spellID)
HDG_Data.BuildKnownRecipeCache()                    -- Build cache of known recipe spellIDs
HDG_Data.InvalidateRecipeCache()                    -- Clear known recipe cache
HDG_Data.PlayerKnowsRecipe(recipeName)              -- Check if player knows recipe (by name, legacy)
HDG_Data.GetRecipeSpellID(recipeName)               -- Get spellID for a recipe name
HDG_Data.PlayerHasProfession(professionName)        -- Check if player has profession
HDG_Data.OpenProfessionAtRecipe(professionName, recipeSpellID) -- Open profession window at recipe
HDG_Data.GetPlayerProfessions()                     -- Get player professions for UI display
HDG_Data.InitializeDatabase()                       -- Transform HDG_DecorDB into addon format
HDG_Data.CalculateLumberNeeds(professions)          -- Calculate lumber needs for all recipes
HDG_Data.CalculateShoppingListLumber(shoppingList)  -- Calculate lumber for shopping list
HDG_Data.GetItemPrice(itemID)                       -- Delegate to HDG_PriceIntegration
HDG_Data.FormatGold(copper, useTextures)            -- Delegate to HDG_PriceIntegration
HDG_Data.HasPriceAddon()                            -- Delegate to HDG_PriceIntegration
HDG_Data.LogCraftFromItemLink(itemLink, quantity)   -- Log craft from item link
HDG_Data.GetCraftingHistory()                       -- Get crafting history
HDG_Data.ClearCraftingHistory()                     -- Clear crafting history
HDG_Data.FormatTimestamp(timestamp)                 -- Format timestamp for display
HDG_Data.CanCraftRecipe(recipe)                     -- Check if player can craft recipe
HDG_Data.GetCraftableRecipes(professionFilter)      -- Get all craftable recipes
HDG_Data.IsCraftableFilterEnabled()                 -- Check if "What Can I Craft" mode enabled
HDG_Data.SetCraftableFilter(enabled)                -- Toggle "What Can I Craft" mode
HDG_Data.GetCharacterKey()                          -- Get unique character key (Name-Realm)
HDG_Data.CollectCharacterProfessions()              -- Collect/cache current char's professions
HDG_Data.GetAltProfessionData(professionName)       -- Get alt profession data
HDG_Data.GetBestAltRecipeCount(professionName)      -- Get best alt's recipe count
HDG_Data.AnyAltHasProfession(professionName)        -- Check if any alt has profession
HDG_Data.GetCharactersWhoKnowRecipe(spellID, professionName) -- Get chars who know recipe

-- ============================================================================
-- HDG_UI.lua - Main Window Management
-- ============================================================================
HDG_UI.CreateUI()                                   -- Create main addon window
HDG_UI.Toggle()                                     -- Toggle main window visibility
HDG_UI.OpenWithProfession(professionName)           -- Open filtered to specific profession
HDG_UI.RefreshUI()                                  -- Refresh all visible UI elements
HDG_UI.UpdateTabs()                                 -- Update tab states and visibility
HDG_UI.SwitchTab(tabKey)                             -- Switch to a specific tab programmatically
HDG_UI.CountKnownRecipes(profData)                  -- Count known recipes in profession
HDG_UI.CreateTrainersPanel()                        -- Create trainers placeholder frame
HDG_UI.RefreshCharactersPanel()                     -- Refresh characters/alts panel
HDG_UI.UpdateLumberLayout()                         -- Update lumber panel (embedded vs pinned)
HDG_UI.RefreshEmbeddedLumber()                      -- Refresh embedded lumber content
HDG_UI.RefreshLumberTracking()                      -- Refresh all lumber displays
HDG_UI.RefreshProfessionTabs()                      -- Delegate: refresh profession tabs
HDG_UI.AddToShoppingList(recipe, skipRefresh)       -- Delegate: add recipe to shopping list
HDG_UI.RefreshShoppingList()                        -- Delegate: refresh shopping list panel
HDG_UI.RefreshMaterials()                           -- Delegate: refresh materials panel
HDG_UI.AddAllMaterialsToAuctionator()               -- Delegate: add mats to Auctionator search
HDG_UI.UpdateProfessionButtonVisibility()           -- Update profession window button visibility
HDG_UI.RefreshQuote()                               -- Refresh random Orc quote
HDG_UI.RequestHouseInfo()                           -- Request house info (async)
HDG_UI.OnHouseListUpdated(houseInfoList)            -- Handler for PLAYER_HOUSE_LIST_UPDATED
HDG_UI.OnHouseLevelFavorUpdated(houseLevelFavor)    -- Handler for HOUSE_LEVEL_FAVOR_UPDATED
HDG_UI.UpdateHouseLevelDisplay()                    -- Update house level display

-- ============================================================================
-- HDG_UIHelpers.lua - UI Utilities
-- ============================================================================
HDG_UIHelpers.GetScheme()                           -- Get current color scheme from Theme Engine
HDG_UIHelpers.RegisterWidget(widget, widgetType)    -- Register widget with Theme Engine
HDG_UIHelpers.ColorText(text, colorKey)             -- Apply color code to text
HDG_UIHelpers.GetBorderColor(alpha)                 -- Get scheme-aware border color
HDG_UIHelpers.GetActiveColor(alpha)                 -- Get scheme-aware active state color
HDG_UIHelpers.GetInactiveColor(alpha)               -- Get scheme-aware inactive state color
HDG_UIHelpers.GetHoverColor(alpha)                  -- Get scheme-aware hover color
HDG_UIHelpers.GetTextColor(isDim, isHeader)         -- Get scheme-aware text color
HDG_UIHelpers.GetAccentColor(alpha)                 -- Get scheme-aware accent color
HDG_UIHelpers.GetPanelColor(alpha)                  -- Get scheme-aware panel background color
HDG_UIHelpers.GetBgColor(alpha)                     -- Get scheme-aware main background color
HDG_UIHelpers.GetProgressBarColor(percentage)       -- Get teal gradient color for progress bars
HDG_UIHelpers.ApplyBackdrop(frame, backdropType, bgColor, borderColor) -- Apply predefined backdrop
HDG_UIHelpers.SetupTooltip(frame, title, description, anchor) -- Setup standard tooltip
HDG_UIHelpers.SetupItemTooltip(frame, itemID, extraLines, anchor) -- Setup item tooltip
HDG_UIHelpers.SetupHoverEffect(frame, normalColor, hoverColor, textElement, normalTextColor, hoverTextColor) -- Setup hover colors
HDG_UIHelpers.SetupHoverWithTooltip(frame, normalColor, hoverColor, tooltipTitle, tooltipDesc, anchor) -- Combined hover+tooltip
HDG_UIHelpers.CreateSectionHeader(parent, text, yOffset, colorKey) -- Create section header
HDG_UIHelpers.CreateLeftHeader(parent, text, xOffset, yOffset, colorKey) -- Create left-aligned header
HDG_UIHelpers.CreateFilterButton(parent, text, width, isActive, onClick, options) -- Create filter button
HDG_UIHelpers.CreatePanel(parent, config)           -- Create standard panel frame
HDG_UIHelpers.ClearScrollContent(scrollContent)     -- Clear all children from scroll content
HDG_UIHelpers.FormatGold(copper, useTextures)       -- Format copper as gold string
HDG_UIHelpers.PrintMessage(message, messageType)    -- Print addon message with formatting
HDG_UIHelpers.StyleScrollBar(scrollFrame, thumbColor, trackColor) -- Style scrollbar minimalist
HDG_UIHelpers.CreateLumberRow(parent, lumberId, lumberInfo, shoppingData, allData, yOffset, farmingOptions) -- Create lumber tracking row
HDG_UIHelpers.CreateRowPool(factoryFn)              -- Create reusable row pool with acquire/release
HDG_UIHelpers.Data()                                -- Nil-safe accessor for HDG_Data module

-- ============================================================================
-- HDG_Data.lua - Recipe Filters & Craft Logic (extracted from HDG_RecipesTab)
-- ============================================================================
HDG_Data.GetProfessionFilter()                      -- Get per-character profession filter
HDG_Data.SetProfessionFilter(professionName)        -- Set per-character profession filter
HDG_Data.CanCraftRecipe(recipe)                     -- Check if player can craft recipe now
HDG_Data.GetCraftableRecipes(professionFilter)      -- Get all craftable recipes
HDG_Data.IsCraftableFilterEnabled()                 -- Check if "What Can I Craft" enabled
HDG_Data.SetCraftableFilter(enabled)                -- Toggle "What Can I Craft" mode
HDG_Data.GetSearchFilter()                          -- Get current search text
HDG_Data.SetSearchFilter(text)                      -- Set search filter text
HDG_Data.IsSearchReagentsEnabled()                  -- Check if searching reagents too
HDG_Data.SetSearchReagents(enabled)                 -- Toggle searching reagent names
HDG_Data.IsUncollectedFilterEnabled()               -- Check if uncollected-only filter enabled
HDG_Data.SetUncollectedFilter(enabled)              -- Toggle uncollected-only filter
HDG_Data.RecipeMatchesFilters(recipe)               -- Check if recipe passes all filters

-- ============================================================================
-- HDG_PowerCrafting.lua - Material Aggregation (extracted from HDG_RecipesTab)
-- ============================================================================
HDG_PowerCrafting.AggregateMaterials(shoppingList)  -- Aggregate direct materials from shopping list
HDG_PowerCrafting.AggregateRawMaterials(shoppingList) -- Aggregate raw materials (expands crafted)
HDG_PowerCrafting.AggregateMaterialsByRecipe(shoppingList) -- Materials grouped by recipe
HDG_PowerCrafting.AggregateMaterialsByRecipeRaw(shoppingList) -- Raw materials grouped by recipe
HDG_PowerCrafting.FilterAndSortMaterials(materials) -- Filter and sort material list
HDG_PowerCrafting.CategorizeMaterials(matArray)     -- Categorize materials by source type
HDG_PowerCrafting.CategorizeMaterialsForRecipe(materials) -- Categorize materials for one recipe
HDG_PowerCrafting.GetSubsidiaryRecipes(item, multiplier) -- Get crafted sub-components
HDG_PowerCrafting.HasSubsidiaryRecipes(item)        -- Check if item has crafted sub-components

-- ============================================================================
-- HDG_RecipesTab.lua - Recipes/Shopping/Materials Panels (UI only)
-- ============================================================================
HDG_RecipesTab.ShowCraftConfirmation(item, shoppingListIndex) -- Show craft confirmation dialog
HDG_RecipesTab.ExecuteCraft(item, shoppingListIndex, quantity) -- Execute crafting
HDG_RecipesTab:Init(frame)                          -- Initialize module with mainFrame
HDG_RecipesTab:CreateRecipePanel()                  -- Create recipe list panel
HDG_RecipesTab:CreateShoppingPanel()                -- Create shopping list panel
HDG_RecipesTab:CreateMaterialsPanel()               -- Create materials panel
HDG_RecipesTab:Create()                             -- Create all three panels
HDG_RecipesTab:AddToShoppingList(recipe, skipRefresh) -- Add recipe to shopping list
HDG_RecipesTab:RefreshShoppingList()                -- Refresh shopping list display
HDG_RecipesTab:RefreshMaterials()                   -- Refresh materials display
HDG_RecipesTab:AddAllMaterialsToAuctionator()       -- Add all materials to Auctionator search
HDG_RecipesTab:RefreshProfessionTabs()              -- Refresh profession tab buttons
HDG_RecipesTab:RefreshRecipes()                     -- Refresh recipe list
HDG_RecipesTab:Refresh()                            -- Refresh all tab content
HDG_RecipesTab:Show()                               -- Show recipes tab panels
HDG_RecipesTab:Hide()                               -- Hide recipes tab panels

-- ============================================================================
-- HDG_PowerCrafting.lua - DAG-Based Recipe Resolution
-- ============================================================================
HDG_PowerCrafting.GetRecipeByItemID(itemID)         -- Get recipe entry by output itemID
HDG_PowerCrafting.GetAllRecipesForItem(itemID)      -- Get ALL recipes that produce itemID
HDG_PowerCrafting.IsCraftedReagent(itemID)          -- Check if item is a crafted reagent
HDG_PowerCrafting.GetCraftedRecipe(itemID)          -- Get recipe for crafted item (basic slots only)
HDG_PowerCrafting.BuildDependencyGraph(decorRecipe) -- Build dependency graph for recipe
HDG_PowerCrafting.TopologicalSort(graph)            -- Kahn's algorithm for crafting order
HDG_PowerCrafting.CalculateRawMaterials(shoppingList) -- Get total raw materials for queue
HDG_PowerCrafting.GetCraftingOrder(decorRecipe)     -- Get ordered crafting steps
HDG_PowerCrafting.GetItemName(itemID)               -- Get item name with fallbacks
HDG_PowerCrafting.CanPlayerCraft(itemID)            -- Check if player can craft item (stub)
HDG_PowerCrafting.GetMaterialBreakdown(decorRecipe) -- Get detailed material breakdown

-- ============================================================================
-- HDG_VendorResolver.lua - Vendor Name Resolution & Data Access
-- ============================================================================
-- HDG_VendorByItem = {}                                   -- Reverse index: [itemID] = {npcID1, npcID2, ...} (built at init)
-- HDG_VendorByMapID = {}                                  -- Reverse index: [uiMapID] = {npcID1, npcID2, ...} (built at init)
HDG_VendorResolver.Initialize()                            -- Load cached NPC names, build reverse index
HDG_VendorResolver.SaveCache()                             -- Save name cache to SavedVariables
HDG_VendorResolver.GetVendorName(vendorEntry)              -- Get resolved vendor name for a VendorDB entry
HDG_VendorResolver.GetVendorNameByID(npcID)                -- Get vendor name by npcID (preferred method)
HDG_VendorResolver.TryResolveNPCName(npcID)                -- Attempt NPC name resolution via WoW APIs
HDG_VendorResolver.CacheName(npcID, name)                  -- Cache a resolved NPC name
HDG_VendorResolver.GetVendorsForItem(itemID)               -- Get vendor list: {npcID, name, zone, mapID, x, y, goldCost, factionID, minRep, factionName, currencyCost}
HDG_VendorResolver.FormatRepRequirement(vendor)            -- Format rep as "FactionName — Standing" or nil
HDG_VendorResolver.MeetsRepRequirement(vendor)             -- Check if player meets vendor's rep/renown requirement
HDG_VendorResolver.FormatGoldCost(copper)                  -- Format copper as gold/silver/copper display
HDG_VendorResolver.GetStats()                              -- Get cache statistics
HDG_VendorResolver.ScanMerchantCurrencies()                -- Scan open merchant for currency costs (called on MERCHANT_SHOW)
HDG_VendorResolver.GetCurrencyCost(itemID)                 -- O(1) lookup: returns {{amount, name, icon}, ...} or nil
HDG_VendorResolver.SaveCurrencyCache()                     -- Persist currency cache to HDG_DB.vendorCurrencyCache
HDG_VendorResolver.ZonePctToMap(mapID, pctX, pctY)         -- Convert zone-pct coords (0-100) to map coords (0-1)
HDG_VendorResolver.ZoneHasUncollectedVendorItems(uiMapID)  -- Quick check: zone has uncollected vendor items?
HDG_VendorResolver.GetVendorsInZoneWithUncollected(uiMapID)-- Get vendors in zone with uncollected item lists

-- ============================================================================
-- HDG_AllDecorDB.lua - Master Decor Database (all ~1600 items)
-- ============================================================================
-- HDG_AllDecorDB = {}                                    -- Global: [itemID] = {decorID, sourceType, "sourceName", "sourceDetail"}
-- sourceType constants: CONFIG.SOURCE_TYPE = { UNKNOWN=0, ACHIEVEMENT=1, QUEST=2, WORLD_QUEST=3,
--   DROP=4, VENDOR=5, CRAFTED=6, LEARNED=7, GATHERING=8, TREASURE=9, PROMOTION=10, PROFESSION=11 }
-- CONFIG.ACQUIRABLE_SOURCE_TYPES = {1, 2, 3, 4, 9, 10}  -- Shown in Acquisition tab

-- ============================================================================
-- HDG_AcqData.lua - Acquisition Data & Filtering (no UI frames)
-- ============================================================================
-- HDG_AcqData.filters                                     -- {search, zone, faction, source, expansion, uncollectedOnly}
-- HDG_AcqData.vendorItems                                 -- [npcID] = {itemID, ...}
-- HDG_AcqData.vendorExpansion                             -- [npcID] = expansion string (computed from mapID)
-- HDG_AcqData.allItems                                    -- Merged deduped acquirable itemIDs
-- HDG_AcqData.craftableByItem                             -- [itemID] = spellID
-- HDG_AcqData.uniqueZones                                 -- Sorted zone names for dropdown
-- HDG_AcqData.uniqueFactions                              -- Sorted faction names for dropdown
-- HDG_AcqData.uniqueExpansions                            -- Sorted expansion names for dropdown
-- HDG_AcqData.filteredItems                               -- ItemIDs passing filters (By Item view)
-- HDG_AcqData.filteredVendors                             -- NpcIDs with matching items (By Vendor view)
-- HDG_AcqData.vendorCounts                                -- [npcID] = {total=N, collected=N}
HDG_AcqData.BuildCaches(CONFIG)                            -- Build all caches from VendorDB/DecorDB/AllDecorDB
HDG_AcqData.RebuildFilteredItems(CONFIG)                   -- Apply filters → filteredItems
HDG_AcqData.RebuildFilteredVendors(CONFIG)                 -- Apply filters per vendor → filteredVendors + counts
HDG_AcqData.ItemPassesFilters(itemID, CONFIG)              -- Unified filter check
HDG_AcqData.GetSourceTypeLabel(srcType, CONFIG)            -- "Achievement"/"Quest"/etc.
HDG_AcqData.GetSourceTypeAtlas(srcType, CONFIG)            -- Atlas name for source type icon
HDG_AcqData.IsAcquirableType(srcType)                      -- Check if source type is acquirable
HDG_AcqData.GetSourceInfo(itemID)                          -- Get AllDecorDB entry: {decorID, type, name, detail} or nil
HDG_AcqData.GetVendorName(npcID)                           -- Get vendor name from VendorDB[npcID][1]
HDG_AcqData.GetVendorZone(npcID)                           -- Get vendor zone from VendorDB[npcID][2]
HDG_AcqData.GetVendorMapID(npcID)                          -- Get vendor mapID from VendorDB[npcID][3]

-- ============================================================================
-- HDG_AcqRows.lua - Row Factories & Pooling
-- ============================================================================
HDG_AcqRows.ReleaseAllRows()                               -- Release item + vendor header rows to pool
HDG_AcqRows.ReleaseAllCells()                              -- Release gallery cells, cancel timers
HDG_AcqRows.CreateItemRow(parent, itemID, yOffset, width, indent, selectedID, onSelect, CONFIG)
HDG_AcqRows.CreateVendorHeaderRow(parent, npcID, yOffset, width, isExpanded, onToggle, CONFIG)
HDG_AcqRows.CreateGalleryCell(parent, itemID, x, y, cellSize, selectedID, onSelect, CONFIG)
HDG_AcqRows.UpdateRowHighlights(selectedItemID)            -- Update item row selection borders
HDG_AcqRows.UpdateGalleryHighlights(selectedItemID)        -- Update gallery cell selection borders

-- ============================================================================
-- HDG_AcquisitionTab.lua - Acquisition Guide Tab
-- ============================================================================
HDG_AcquisitionTab:Init(configRef, mainFrameRef, dbRef)    -- Initialize module with references
HDG_AcquisitionTab:CreatePanel()                           -- Create the acquisition panel UI
HDG_AcquisitionTab:Show()                                  -- Show the acquisition tab
HDG_AcquisitionTab:Hide()                                  -- Hide the acquisition tab
HDG_AcquisitionTab:IsShown()                               -- Check if tab is visible
HDG_AcquisitionTab:Refresh()                               -- Full refresh of all content
HDG_AcquisitionTab:RefreshList()                           -- Refresh the filtered item list
HDG_AcquisitionTab:SelectItem(itemID)                      -- Select item and update all panels
HDG_AcquisitionTab:UpdateHeaderPanel(itemID)               -- Update header (name + collected badge)
HDG_AcquisitionTab:UpdatePreviewModel(itemID)              -- Load 3D preview model
HDG_AcquisitionTab:UpdateDetailPanel_Vendor(itemID, vendors) -- Vendor info in detail text area
HDG_AcquisitionTab:UpdateDetailPanel_NonVendor(itemID, si) -- Source info in detail text area
HDG_AcquisitionTab:UpdateInfoPanel(itemID, si)             -- Bottom info for non-vendor items
HDG_AcquisitionTab:UpdateNoteDisplay(itemID)               -- Update user note display in header
HDG_AcquisitionTab:UpdateVendorInventory(vendor)           -- Update 3D gallery grid

-- ============================================================================
-- HDG_StyleEngine.lua - Custom Style Support (V2.8)
-- ============================================================================
-- StyleEngine:GetAllStyleDefs()                        -- Get merged built-in + custom style defs
-- StyleEngine:InvalidateCustomStyle(styleId)           -- Rebuild cache for one custom style
-- StyleEngine:RemoveCustomStyle(styleId)               -- Remove style from engine caches
-- StyleEngine:ScoreStyleLive(styleDef, limit)          -- Score items against ad-hoc def for preview

-- ============================================================================
-- HDG_StyleSerializer.lua - Import/Export Custom Styles
-- ============================================================================
-- HDG_StyleSerializer:Export(styleDef)                 -- Encode style as "HDG:1:<base64>" string
-- HDG_StyleSerializer:Import(encodedStr)               -- Decode string -> styleDef or nil, err

-- ============================================================================
-- HDG_PriceIntegration.lua - TSM/Auctionator Integration
-- ============================================================================
HDG_PriceIntegration.GetItemPrice(itemID, forceAddon) -- Get market price (TSM or Auctionator)
HDG_PriceIntegration.FormatGold(copper, useTextures) -- Format copper as gold string
HDG_PriceIntegration.FormatGoldOnly(copper)         -- Format as gold-only with commas
HDG_PriceIntegration.HasPriceAddon()                -- Check if any price addon available
HDG_PriceIntegration.IsTSMAvailable()               -- Check if TSM is available
HDG_PriceIntegration.IsAuctionatorAvailable()       -- Check if Auctionator is available
HDG_PriceIntegration.GetAvailableAddons()           -- Get list of available price addons
HDG_PriceIntegration.GetActiveAddon()               -- Get name of active price addon
HDG_PriceIntegration.GetRegionSaleAvg(itemID)       -- Get TSM region sale average
HDG_PriceIntegration.CalculateTotalPrice(materials) -- Calculate total price for material list

-- ============================================================================
-- HDG_VendorShoppingList.lua - Vendor Shopping List + Zone Scanner Widget
-- ============================================================================
-- ============================================================================
-- HDG_Store.lua - Style Shopping List Methods
-- ============================================================================
-- HDG.Store:AddToStyleShoppingList(itemID, styleId)       -- Add item+style pair (dedup), pulls sourceType from AllDecorDB
-- HDG.Store:RemoveFromStyleShoppingList(itemID, styleId)  -- Remove single entry
-- HDG.Store:ClearStyleShoppingListForStyle(styleId)       -- Remove all entries for one style
-- HDG.Store:ClearStyleShoppingList()                      -- Wipe all style shopping list entries
-- HDG.Store:IsOnStyleShoppingList(itemID, styleId)        -- Membership check
-- HDG.Store:PruneCollectedFromStyleShoppingList()          -- Auto-remove collected items
-- HDG.Store:GetStyleShoppingListCount()                   -- Return count of style shopping list entries

-- ============================================================================
-- HDG_VendorShoppingList.lua - Vendor Shopping List + Zone Scanner + Style List Widget
-- ============================================================================
HDG_VendorShoppingList:Init(configRef)                     -- Store config reference
HDG_VendorShoppingList.Toggle(mode)                        -- Show/hide, optional mode override ("list"/"zone"/"config")
HDG_VendorShoppingList.Show(mode)                          -- Show with optional mode
HDG_VendorShoppingList.Hide()                              -- Hide widget
HDG_VendorShoppingList.IsShown()                           -- Visibility check
HDG_VendorShoppingList.GetCount()                          -- Shopping list item count (for badge)
HDG_VendorShoppingList.Refresh()                           -- Rebuild current mode content
HDG_VendorShoppingList.OnZoneChanged(mapID)                -- Zone scanner trigger (called from event handler)
HDG_VendorShoppingList.MapListWaypoints()                  -- Set TomTom waypoints for all list vendors
HDG_VendorShoppingList.MapZoneWaypoints()                  -- Set TomTom waypoints for current zone vendors


