local _, ns = ...

-- ============================================================
-- Forge Fishing · Tuskarr Fishing Village Texture Registry
-- ============================================================
-- Three asset layers:
--
--   1. CUSTOM  — extracted PNG art from the concept sheet
--   2. ICONS   — Interface\Icons\* paths (always in WoW Retail)
--   3. FILEID  — numeric FileDataIDs from wago.tools/files
--               To verify or replace any ID:
--               → https://wago.tools/files
--               Search: "Tuskarr", "Iskaara", "AzureSpan",
--                       "NX_Tuskarr", or "loading_northrend"
--               Copy the number from the file URL.
--               A blank/purple square means the ID is wrong.
-- ============================================================

ns.Media = {}
local M  = ns.Media
local GEN = "Interface\\AddOns\\ForgeFishing\\Media\\generated\\"

-- ── 1. Custom extracted concept-sheet art ────────────────────
M.custom = {
    logo       = GEN .. "logo_primary.png",       -- full fisherman badge
    banner     = GEN .. "banner_wide.png",        -- wide village scene
    emblem     = GEN .. "emblem_round.png",       -- circular shield emblem
    portrait   = GEN .. "portrait_square.png",    -- tuskarr face portrait in carved frame
    rodLarge   = GEN .. "rod_hook_large.png",     -- rod + dangling hook
    rodSmall   = GEN .. "rod_small.png",          -- horizontal rod accent
    hookDisc   = GEN .. "hook_disc.png",          -- ice hook disc icon
    runeDisc   = GEN .. "rune_disc.png",          -- rune medallion disc
    iconFace   = GEN .. "app_icon_face.png",      -- tuskarr face app icon
    iconHook   = GEN .. "app_icon_hook.png",      -- ice hook app icon
    standing   = GEN .. "tuskarr_standing.png",   -- full body standing tuskarr
    sliders    = GEN .. "ui_sliders.png",         -- UI slider / progress bar elements
    hookLarge     = GEN .. "hook_ice_large.png",         -- large ice fishing hook (no glow)
    hookGlowing   = GEN .. "hook_ice_glowing.png",       -- glowing teal ice hook
    forgeCertified= GEN .. "forge_certified.png",        -- ForgeDMC Forge-Certified badge
}

-- ── 2. In-game icon paths (Interface\Icons\*) ────────────────
-- All paths are WoW Retail confirmed.  Case-insensitive on Windows.
-- If any shows as a blank square, the name is slightly off — check
-- the exact spelling on wago.tools or with /run print(GetItemIcon(#)).
M.icon = {
    -- Core fishing
    fishing        = "Interface\\Icons\\Trade_Fishing",
    pole           = "Interface\\Icons\\inv_fishingpole_01",
    poleNice       = "Interface\\Icons\\inv_fishingpole_02",
    poleFancy      = "Interface\\Icons\\inv_fishingpole_04",
    lure           = "Interface\\Icons\\inv_fishing_lure",
    findFish       = "Interface\\Icons\\ability_hunter_findfish",

    -- Fish / catch variety
    fishBlue       = "Interface\\Icons\\inv_misc_fish_14",    -- glowing blue fish
    fishCommon     = "Interface\\Icons\\inv_misc_fish_01",
    fishRed        = "Interface\\Icons\\inv_misc_fish_13",
    fishEel        = "Interface\\Icons\\inv_misc_fish_eel_01",
    fishSalmon     = "Interface\\Icons\\inv_misc_fish_10",

    -- Tackle / hooks / ocean
    anchor         = "Interface\\Icons\\inv_misc_anchor",
    net            = "Interface\\Icons\\inv_net_0",
    wave           = "Interface\\Icons\\spell_frost_shiftingweights",
    waterWalk      = "Interface\\Icons\\spell_shaman_waterwalk",
    iceShard       = "Interface\\Icons\\inv_misc_gem_crystal_01",

    -- Navigation / map
    compass        = "Interface\\Icons\\inv_misc_map01",
    map2           = "Interface\\Icons\\inv_misc_map_01",

    -- Session log / ledger
    bookLog        = "Interface\\Icons\\inv_misc_book_09",
    scroll         = "Interface\\Icons\\inv_misc_note_01",

    -- Settings / tools
    cogwheel       = "Interface\\Icons\\inv_misc_gear_01",
    engineering    = "Interface\\Icons\\trade_engineering",

    -- Achievements & status
    achievFishing  = "Interface\\Icons\\achievement_tradeskills_fishing",
    pearl          = "Interface\\Icons\\inv_misc_gem_pearl_04",
    medallion      = "Interface\\Icons\\inv_misc_ahnqirajtrinket04",
    rune           = "Interface\\Icons\\inv_misc_rune_01",

    -- Watcher / eye
    eyeWatcher     = "Interface\\Icons\\inv_misc_eye_03",
    spyglass       = "Interface\\Icons\\inv_misc_spyglass_02",

    -- Lantern / torch (atmospheric)
    lantern        = "Interface\\Icons\\inv_misc_lantern_01",
    torch          = "Interface\\Icons\\inv_misc_torch_01",

    -- Bonus decorative
    trident        = "Interface\\Icons\\inv_spear_07",
    shell          = "Interface\\Icons\\inv_misc_shell_01",
    whale          = "Interface\\Icons\\ability_hunter_aspectofthemonkey",
}

-- ── 3. Tuskarr / Azure Span art by FileDataID ────────────────
-- !! ALL IDs BELOW NEED VERIFICATION ON wago.tools/files !!
-- Visit https://wago.tools/files and search for the term noted.
-- Replace the number after verifying the preview shows the right art.
-- WoW loads these via: texture:SetTexture(fileDataID)
M.fileID = {
    -- Azure Span – Iskaara Tuskarr fishing village panoramic
    -- Search wago.tools: "iskaara" or "NX_AzureSpan_Iskaara"
    tuskarrVillage   = 5280779,     -- VERIFY

    -- Azure Span loading screen (icy ocean, Tuskarr boats, aurora)
    -- Search wago.tools: "loading_azurespan" or "LoadingScreen_AzureSpan"
    azureSpanLoad    = 4673792,     -- VERIFY

    -- Northrend ocean coast panoramic (Wrath era, icy sea)
    -- Search wago.tools: "loading_northrend" or "northrend coast"
    northrendCoast   = 4731905,     -- VERIFY

    -- Tuskarr character portrait (fishing/village pose)
    -- Search wago.tools: "tuskarr" under Character or Creature
    tuskarrPortrait  = 4568801,     -- VERIFY

    -- Azure Span zone map background art
    -- Search wago.tools: "azurespan" under Zone Maps
    azureSpanMap     = 4665749,     -- VERIFY

    -- Dragonflight ocean/coastal vista (generic blue sea backdrop)
    -- Search wago.tools: "DF_CoastalVista" or "azure_sea"
    dfCoastalVista   = 5050221,     -- VERIFY

    -- Fishing hole / bobber splash particle backdrop
    -- Search wago.tools: "fishing_splash" or bobber
    fishingHole      = 538051,      -- VERIFY (widely cited bobber texture)
}

-- ── Helper: apply any asset (path string or FileDataID number) ─
-- Usage:  M:Tex(frame, M.icon.pole, 0.85, 1, 0.85, 0.50)
--         M:Tex(frame, M.fileID.azureSpanLoad, 0.10)
function M:Tex(textureObj, asset, alpha, r, g, b)
    if not textureObj or not asset then return end
    textureObj:SetTexture(asset)
    textureObj:SetVertexColor(r or 1, g or 1, b or 1, alpha or 1)
end

-- ── Tab icon map (used by UI.lua tab loop) ────────────────────
-- Maps each tab name → an icon path from M.icon
M.tabIcons = {
    Overview  = M.icon.fishing,
    Watcher   = M.icon.fishBlue,
    Atlas     = M.icon.compass,
    Equipment = M.icon.poleNice,
    Tackle    = M.icon.lure,
    Session   = M.icon.bookLog,
    Database  = M.icon.bookLog,
    Settings  = M.icon.cogwheel,
}
