-- ============================================================
--  rOrbs – Extended Orb Templates (NEW 3D Models)
-- ============================================================
--  Additional spherical / round 3D models from WoW's built-in
--  CreatureDisplayInfo database that fit inside the round orb.
--
--  These are stored separately from the original templates
--  (orb_templates.lua) so they appear in their own dropdown.
--
--  All displayInfoIDs here are confirmed WoW built-in models
--  that render as spherical, circular, or round effects
--  compatible with the PlayerModel:SetDisplayInfo() API.
-- ============================================================

local _, ns = ...

local M = "Interface\\AddOns\\rOrbs\\media\\"

ns.orbTemplatesExtended = {}
local T = ns.orbTemplatesExtended

-- Sorted display list (built once at the end)
ns.orbTemplateExtendedList = nil

-------------------------------------------------
-- EXTENDED TEMPLATE DEFINITIONS
-- Categories: Void/Shadow, Arcane/Mana, Nature,
--             Fire/Lava, Frost/Ice, Holy/Light,
--             Fel/Chaos, Misc/Mechanical
-------------------------------------------------

-- ======== VOID / SHADOW ========

T["void-sphere"] = {
  label = "Void Sphere",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.3, 0.0, 0.5, 1},
  sparkColor = {0.5, 0.1, 0.8, 1},
  modelOpacity = 1,
  displayInfoID = 78807,
  camScale = 1.0,
}

T["shadow-orb-dark"] = {
  label = "Shadow Orb",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.2, 0.0, 0.3, 1},
  sparkColor = {0.4, 0.0, 0.6, 1},
  modelOpacity = 0.9,
  displayInfoID = 63595,
  camScale = 1.2,
}

T["void-tendril-sphere"] = {
  label = "Void Tendrils",
  statusBarTexture = M .. "orb_filling6",
  statusBarColor = {0.15, 0.0, 0.25, 1},
  sparkColor = {0.4, 0.1, 0.7, 1},
  modelOpacity = 1,
  displayInfoID = 46720,
  camScale = 0.9,
}

T["shadow-crash-orb"] = {
  label = "Shadow Crash",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.25, 0.0, 0.4, 1},
  sparkColor = {0.5, 0.0, 0.8, 1},
  modelOpacity = 1,
  displayInfoID = 31950,
  camScale = 3.0,
  posAdjustZ = -1.2,
  panAdjustZ = 1.5,
}

T["nzoth-corruption"] = {
  label = "N'Zoth Corruption",
  statusBarTexture = M .. "orb_filling21",
  statusBarColor = {0.35, 0.1, 0.5, 1},
  sparkColor = {0.6, 0.2, 0.8, 1},
  modelOpacity = 0.9,
  displayInfoID = 93553,
  camScale = 0.8,
}

T["void-rift"] = {
  label = "Void Rift",
  statusBarTexture = M .. "orb_filling6",
  statusBarColor = {0.1, 0.0, 0.2, 1},
  sparkColor = {0.3, 0.0, 0.5, 1},
  modelOpacity = 1,
  displayInfoID = 87072,
  camScale = 2.0,
  posAdjustZ = -1.0,
  panAdjustZ = 1.25,
}

-- ======== ARCANE / MANA ========

T["arcane-orb-bright"] = {
  label = "Arcane Orb",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.3, 0.2, 0.8, 1},
  sparkColor = {0.5, 0.4, 1.0, 1},
  modelOpacity = 1,
  displayInfoID = 65040,
  camScale = 0.9,
}

T["mana-sphere-blue"] = {
  label = "Mana Sphere",
  statusBarTexture = M .. "orb_filling15",
  statusBarColor = {0.1, 0.2, 0.7, 1},
  sparkColor = {0.3, 0.5, 1.0, 1},
  modelOpacity = 1,
  displayInfoID = 45879,
  camScale = 1.0,
}

T["arcane-explosion-glow"] = {
  label = "Arcane Glow",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.4, 0.2, 0.9, 1},
  sparkColor = {0.7, 0.5, 1.0, 1},
  modelOpacity = 0.85,
  displayInfoID = 42497,
  camScale = 3.5,
  posAdjustZ = -1.5,
  panAdjustZ = 1.5,
}

T["nightborne-orb"] = {
  label = "Nightborne Orb",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.2, 0.1, 0.5, 1},
  sparkColor = {0.5, 0.3, 1.0, 1},
  modelOpacity = 1,
  displayInfoID = 72539,
  camScale = 0.7,
}

T["arcane-singularity"] = {
  label = "Arcane Singularity",
  statusBarTexture = M .. "orb_filling21",
  statusBarColor = {0.3, 0.15, 0.6, 1},
  sparkColor = {0.6, 0.4, 1.0, 1},
  modelOpacity = 1,
  displayInfoID = 78183,
  camScale = 1.5,
  posAdjustZ = -0.5,
  panAdjustZ = 1.0,
}

-- ======== NATURE / LIFE ========

T["nature-bloom-sphere"] = {
  label = "Nature Bloom",
  statusBarTexture = M .. "orb_filling10",
  statusBarColor = {0.1, 0.6, 0.2, 1},
  sparkColor = {0.3, 1.0, 0.4, 1},
  modelOpacity = 0.85,
  displayInfoID = 41168,
  camScale = 2.5,
  posAdjustZ = -1.0,
  panAdjustZ = 1.5,
}

T["emerald-dream-orb"] = {
  label = "Emerald Dream",
  statusBarTexture = M .. "orb_filling10",
  statusBarColor = {0.0, 0.5, 0.15, 1},
  sparkColor = {0.2, 0.9, 0.3, 1},
  modelOpacity = 0.9,
  displayInfoID = 110093,
  camScale = 0.9,
}

T["spore-cloud-globe"] = {
  label = "Spore Cloud",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.3, 0.5, 0.1, 1},
  sparkColor = {0.5, 0.8, 0.2, 1},
  modelOpacity = 0.8,
  displayInfoID = 23389,
  camScale = 3.0,
  posAdjustZ = -1.2,
  panAdjustZ = 1.5,
}

T["lightning-ball"] = {
  label = "Lightning Ball",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.3, 0.5, 0.8, 1},
  sparkColor = {0.5, 0.8, 1.0, 1},
  modelOpacity = 1,
  displayInfoID = 24839,
  camScale = 1.0,
}

-- ======== FIRE / LAVA ========

T["fire-orb-bright"] = {
  label = "Fire Orb",
  statusBarTexture = M .. "orb_filling1",
  statusBarColor = {0.8, 0.3, 0.0, 1},
  sparkColor = {1.0, 0.5, 0.0, 1},
  modelOpacity = 1,
  displayInfoID = 25818,
  camScale = 2.0,
  posAdjustZ = -0.8,
  panAdjustZ = 1.0,
}

T["lava-globe"] = {
  label = "Lava Globe",
  statusBarTexture = M .. "orb_filling12",
  statusBarColor = {0.7, 0.2, 0.0, 1},
  sparkColor = {1.0, 0.4, 0.0, 1},
  modelOpacity = 1,
  displayInfoID = 38146,
  camScale = 1.2,
}

T["infernal-core"] = {
  label = "Infernal Core",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.6, 0.15, 0.0, 1},
  sparkColor = {1.0, 0.35, 0.0, 1},
  modelOpacity = 1,
  displayInfoID = 21079,
  camScale = 4.0,
  posAdjustZ = -2.0,
  panAdjustZ = 1.5,
}

T["living-bomb-sphere"] = {
  label = "Living Bomb",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.9, 0.4, 0.0, 1},
  sparkColor = {1.0, 0.6, 0.1, 1},
  modelOpacity = 0.9,
  displayInfoID = 46351,
  camScale = 0.8,
}

T["phoenix-ember"] = {
  label = "Phoenix Ember",
  statusBarTexture = M .. "orb_filling1",
  statusBarColor = {0.9, 0.35, 0.05, 1},
  sparkColor = {1.0, 0.6, 0.15, 1},
  modelOpacity = 1,
  displayInfoID = 26489,
  camScale = 1.5,
  posAdjustZ = -0.5,
  panAdjustZ = 1.0,
}

-- ======== FROST / ICE ========

T["frost-orb-cold"] = {
  label = "Frost Orb",
  statusBarTexture = M .. "orb_filling15",
  statusBarColor = {0.3, 0.6, 0.9, 1},
  sparkColor = {0.5, 0.8, 1.0, 1},
  modelOpacity = 0.9,
  displayInfoID = 29169,
  camScale = 3.5,
  posAdjustZ = -1.5,
  panAdjustZ = 1.5,
}

T["ice-sphere-frozen"] = {
  label = "Ice Sphere",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.4, 0.7, 1.0, 1},
  sparkColor = {0.6, 0.9, 1.0, 1},
  modelOpacity = 1,
  displayInfoID = 30414,
  camScale = 1.0,
}

T["blizzard-core"] = {
  label = "Blizzard Core",
  statusBarTexture = M .. "orb_filling4",
  statusBarColor = {0.2, 0.5, 0.8, 1},
  sparkColor = {0.5, 0.8, 1.0, 1},
  modelOpacity = 0.85,
  displayInfoID = 110326,
  camScale = 1.5,
  posAdjustZ = -0.5,
  panAdjustZ = 1.0,
}

T["frozen-core-crystal"] = {
  label = "Frozen Crystal",
  statusBarTexture = M .. "orb_filling15",
  statusBarColor = {0.5, 0.8, 1.0, 1},
  sparkColor = {0.7, 0.9, 1.0, 1},
  modelOpacity = 0.9,
  displayInfoID = 28470,
  camScale = 0.9,
}

-- ======== HOLY / LIGHT ========

T["holy-nova-orb"] = {
  label = "Holy Nova",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {1.0, 0.9, 0.5, 1},
  sparkColor = {1.0, 1.0, 0.7, 1},
  modelOpacity = 0.9,
  displayInfoID = 26013,
  camScale = 4.0,
  posAdjustZ = -1.5,
  panAdjustZ = 1.5,
}

T["divine-star"] = {
  label = "Divine Star",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {1.0, 0.85, 0.4, 1},
  sparkColor = {1.0, 1.0, 0.6, 1},
  modelOpacity = 1,
  displayInfoID = 47960,
  camScale = 1.2,
}

T["light-orb-naaru"] = {
  label = "Naaru Light",
  statusBarTexture = M .. "orb_filling15",
  statusBarColor = {1.0, 0.9, 0.6, 1},
  sparkColor = {1.0, 1.0, 0.8, 1},
  modelOpacity = 0.85,
  displayInfoID = 21043,
  camScale = 0.6,
}

T["sunwell-radiance"] = {
  label = "Sunwell Radiance",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {1.0, 0.8, 0.3, 1},
  sparkColor = {1.0, 0.95, 0.5, 1},
  modelOpacity = 1,
  displayInfoID = 23684,
  camScale = 2.5,
  posAdjustZ = -1.0,
  panAdjustZ = 1.25,
}

-- ======== FEL / CHAOS ========

T["fel-orb-green"] = {
  label = "Fel Orb",
  statusBarTexture = M .. "orb_filling10",
  statusBarColor = {0.3, 0.8, 0.0, 1},
  sparkColor = {0.5, 1.0, 0.1, 1},
  modelOpacity = 1,
  displayInfoID = 62598,
  camScale = 1.0,
}

T["fel-fire-globe"] = {
  label = "Fel Fire Globe",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.2, 0.7, 0.0, 1},
  sparkColor = {0.4, 1.0, 0.0, 1},
  modelOpacity = 1,
  displayInfoID = 73256,
  camScale = 1.5,
  posAdjustZ = -0.5,
  panAdjustZ = 1.0,
}

T["chaos-sphere"] = {
  label = "Chaos Sphere",
  statusBarTexture = M .. "orb_filling21",
  statusBarColor = {0.4, 0.7, 0.0, 1},
  sparkColor = {0.6, 1.0, 0.2, 1},
  modelOpacity = 0.9,
  displayInfoID = 68711,
  camScale = 0.8,
}

-- ======== WATER / AQUA ========

T["water-globe-pure"] = {
  label = "Water Globe",
  statusBarTexture = M .. "orb_filling15",
  statusBarColor = {0.1, 0.3, 0.6, 1},
  sparkColor = {0.2, 0.5, 0.9, 1},
  modelOpacity = 0.8,
  displayInfoID = 36774,
  camScale = 2.0,
  posAdjustZ = -0.8,
  panAdjustZ = 1.25,
}

T["tidal-sphere"] = {
  label = "Tidal Sphere",
  statusBarTexture = M .. "orb_filling6",
  statusBarColor = {0.0, 0.25, 0.5, 1},
  sparkColor = {0.1, 0.5, 0.8, 1},
  modelOpacity = 0.9,
  displayInfoID = 40055,
  camScale = 3.0,
  posAdjustZ = -1.5,
  panAdjustZ = 1.5,
}

-- ======== MISC / ENERGY / COSMIC ========

T["cosmic-nebula"] = {
  label = "Cosmic Nebula",
  statusBarTexture = M .. "orb_filling21",
  statusBarColor = {0.3, 0.1, 0.5, 1},
  sparkColor = {0.6, 0.3, 0.9, 1},
  modelOpacity = 0.9,
  displayInfoID = 102970,
  camScale = 1.0,
}

T["titan-sphere"] = {
  label = "Titan Sphere",
  statusBarTexture = M .. "orb_filling17",
  statusBarColor = {0.7, 0.6, 0.3, 1},
  sparkColor = {1.0, 0.9, 0.5, 1},
  modelOpacity = 1,
  displayInfoID = 86814,
  camScale = 0.8,
}

T["ethereal-glow"] = {
  label = "Ethereal Glow",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.4, 0.3, 0.6, 1},
  sparkColor = {0.7, 0.6, 1.0, 1},
  modelOpacity = 0.85,
  displayInfoID = 22444,
  camScale = 2.5,
  posAdjustZ = -1.0,
  panAdjustZ = 1.25,
}

T["runic-sphere-purple"] = {
  label = "Runic Sphere",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.5, 0.2, 0.7, 1},
  sparkColor = {0.8, 0.4, 1.0, 1},
  modelOpacity = 1,
  displayInfoID = 84507,
  camScale = 0.6,
}

T["soul-fragment-orb"] = {
  label = "Soul Fragment",
  statusBarTexture = M .. "orb_filling6",
  statusBarColor = {0.3, 0.6, 0.8, 1},
  sparkColor = {0.5, 0.8, 1.0, 1},
  modelOpacity = 0.9,
  displayInfoID = 59153,
  camScale = 1.0,
}

T["anima-globe-red"] = {
  label = "Anima Globe",
  statusBarTexture = M .. "orb_filling12",
  statusBarColor = {0.7, 0.15, 0.15, 1},
  sparkColor = {1.0, 0.3, 0.3, 1},
  modelOpacity = 1,
  displayInfoID = 97174,
  camScale = 0.9,
}

T["kyrian-orb-blue"] = {
  label = "Kyrian Orb",
  statusBarTexture = M .. "orb_filling15",
  statusBarColor = {0.4, 0.6, 0.9, 1},
  sparkColor = {0.6, 0.8, 1.0, 1},
  modelOpacity = 0.9,
  displayInfoID = 96477,
  camScale = 1.0,
}

T["venthyr-sphere-crimson"] = {
  label = "Venthyr Sphere",
  statusBarTexture = M .. "orb_filling12",
  statusBarColor = {0.6, 0.05, 0.1, 1},
  sparkColor = {0.9, 0.15, 0.2, 1},
  modelOpacity = 1,
  displayInfoID = 95758,
  camScale = 0.8,
}

T["death-coil-sphere"] = {
  label = "Death Coil",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.15, 0.4, 0.15, 1},
  sparkColor = {0.3, 0.7, 0.3, 1},
  modelOpacity = 1,
  displayInfoID = 23992,
  camScale = 3.5,
  posAdjustZ = -1.5,
  panAdjustZ = 1.5,
}

T["draconic-flame-sphere"] = {
  label = "Draconic Flame",
  statusBarTexture = M .. "orb_filling1",
  statusBarColor = {0.85, 0.5, 0.1, 1},
  sparkColor = {1.0, 0.7, 0.2, 1},
  modelOpacity = 1,
  displayInfoID = 111753,
  camScale = 1.2,
}

T["time-warp-sphere"] = {
  label = "Time Warp",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.6, 0.5, 0.2, 1},
  sparkColor = {0.9, 0.8, 0.3, 1},
  modelOpacity = 0.85,
  displayInfoID = 46242,
  camScale = 1.5,
  posAdjustZ = -0.5,
  panAdjustZ = 1.0,
}

T["prismatic-globe"] = {
  label = "Prismatic Globe",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.6, 0.4, 0.8, 1},
  sparkColor = {0.9, 0.7, 1.0, 1},
  modelOpacity = 0.9,
  displayInfoID = 83260,
  camScale = 1.0,
}

T["necrotic-orb"] = {
  label = "Necrotic Orb",
  statusBarTexture = M .. "orb_filling16",
  statusBarColor = {0.2, 0.35, 0.15, 1},
  sparkColor = {0.4, 0.6, 0.2, 1},
  modelOpacity = 1,
  displayInfoID = 37156,
  camScale = 2.0,
  posAdjustZ = -0.8,
  panAdjustZ = 1.25,
}

T["ext-none"] = {
  label = "None (Custom)",
  displayInfoID = 0,
  camScale = 1,
  modelOpacity = 0,
  statusBarColor = {1, 1, 1, 1},
  sparkColor = {1, 1, 1, 1},
}

-------------------------------------------------
-- BUILD SORTED LIST
-------------------------------------------------
local list = {}
for key, data in pairs(T) do
  if key ~= "ext-none" then
    table.insert(list, { key = key, label = data.label or key })
  end
end
table.sort(list, function(a, b) return a.label < b.label end)
table.insert(list, 1, { key = "ext-none", label = "None (Custom)" })
ns.orbTemplateExtendedList = list
