-----------------------------------------
-- Media listing for all fill textures --
-- Texture Size: 256 x 256 --------------
-- Circle  Size: 228 x 228 --------------
-----------------------------------------
local AddOnName, nsVars = ...
local ss = nsVars.SS

local type, pairs = type, pairs

local mtFillTextures = {
  textures = {
    primary = {
      ["bubbles"]        = "roth_orb_filling11.tga",
      ["darkstar"]       = "roth_orb_filling14.tga",
      ["diablo3"]        = "roth_orb_filling15.tga",
      ["dominion"]       = "roth_orb_filling19.tga",
      ["earth"]          = "roth_orb_filling2.tga",
      ["exile"]          = "roth_orb_filling18.tga",
      ["fraktal circle"] = "roth_orb_filling6.tga",
      ["fubble"]         = "roth_orb_filling16.tga",
      ["galaxy"]         = "roth_orb_filling4.tga",
      ["golf"]           = "roth_orb_filling13.tga",
      ["gradient"]       = "roth_orb_filling10.tga",
      ["icecream"]       = "roth_orb_filling8.tga",
      ["jupiter"]        = "roth_orb_filling5.tga",
      ["marble"]         = "roth_orb_filling9.tga",
      ["mars"]           = "roth_orb_filling3.tga",
      ["moon"]           = "roth_orb_filling1.tga",
      ["runes"]          = "roth_orb_filling20.tga",
      ["sigil orb"]      = "roth_orb_filling21.tga",
      ["silver"]         = "roth_orb_filling17.tga",
      ["sun"]            = "roth_orb_filling7.tga",
      ["swirl"]          = "roth_orb_filling22.tga",
      ["woodpepples"]    = "roth_orb_filling12.tga",
    },
    alternate = {
      [1] = "orb_filling1.tga",
      [2] = "orb_filling2.tga",
      [3] = "orb_filling3.tga",
      [4] = "orb_filling4.tga",
      [5] = "orb_filling5.tga",
      [6] = "orb_filling6.tga",
      [7] = "orb_filling7.tga",
    },
    split = {
      [1] = {
        [1] = "petFilling_health.tga",
        [2] = "petFilling_power.tga",
      },
    },
    swirl = {
      ["galaxy"] = {
        [1] = "orb_rotation_galaxy1.tga",
        [2] = "orb_rotation_galaxy2.tga",
        [3] = "orb_rotation_galaxy3.tga",
      },
      ["galaxy2"] = {
        [1] = "galaxy.tga",
        [2] = "galaxy2.tga",
        [3] = "galaxy4.tga",
      },
      ["bubbles"] = {
        [1] = "orb_rotation_bubbles1.tga",
        [2] = "orb_rotation_bubbles2.tga",
        [3] = "orb_rotation_bubbles3.tga",
      },
      ["iris"] = {
        [1] = "orb_rotation_iris1.tga",
        [2] = "orb_rotation_iris2.tga",
        [3] = "orb_rotation_iris3.tga",
      },
    },
    glow = {
      ["lowHealth"]      = "orb_lowhp_glow.tga",
      ["orbTransparent"] = "orb_transparent.tga",
    },
    metal = {
      ["aluminum wall plating"] = "metal\\aluminum_wall_plating.tga",
      ["brushed metal"]         = "metal\\brushed_metal.tga",
      ["brushed silver"]        = "metal\\brushed_silver.tga",
      ["brushed steel"]         = "metal\\brushed_steel.tga",
      ["chains"]                = "metal\\chains.tga",
      ["copper"]                = "metal\\copper.tga",
      ["diamond plate metal"]   = "metal\\diamond_plate_metal.tga",
      ["galvanized dark steel"] = "metal\\galvanized_dark_steel.tga",
      ["galvanized steel"]      = "metal\\galvanized_steel.tga",
      ["galvanized steel 2"]    = "metal\\galvanized_steel_2.tga",
      ["grafiti"]               = "metal\\grafiti.tga",
      ["iron door"]             = "metal\\iron_door.tga",
      ["iron plate"]            = "metal\\iron_plate.tga",
      ["metal shavings"]        = "metal\\metal_shavings.tga",
      ["metal tube"]            = "metal\\metal_tube.tga",
      ["metallic"]              = "metal\\metallic.tga",
      ["oxidized steel iron"]   = "metal\\oxidized_steel_iron.tga",
      ["pitted copper"]         = "metal\\pitted_copper.tga",
      ["polished iron slab"]    = "metal\\polished_iron_slab.tga",
      ["polished iron slab 2"]  = "metal\\polished_iron_slab_2.tga",
      ["rust"]                  = "metal\\rust.tga",
      ["rust metal stock"]      = "metal\\rust_metal_stock.tga",
      ["rusted heavy"]          = "metal\\rusted_heavy.tga",
      ["rusted metal pipe"]     = "metal\\rusted_metal_pipe.tga",
      ["rusted paint"]          = "metal\\rusted_paint.tga",
      ["rusted wet metal"]      = "metal\\rusted_wet_metal.tga",
      ["rusty rippled"]         = "metal\\rusty_rippled.tga",
      ["sanded swirl steel"]    = "metal\\sanded_swirl_steel.tga",
      ["scratched dark"]        = "metal\\scratched_dark.tga",
      ["spin aluminum"]         = "metal\\spin_aluminum.tga",
      ["wave brush steel"]      = "metal\\wave_brush_steel.tga",
    },
  },
};

mtFillTextures.get = function(group, index)
  if mtFillTextures.textures[group][index] and (type(mtFillTextures.textures[group][index]) == "table") then
    local textures = {}

    for i,v in pairs(mtFillTextures.textures[group][index]) do
      textures[i] = ss.SharedMedia.textureLocation..v
    end

    return textures
  else
    return  ss.SharedMedia.textureLocation..mtFillTextures.textures[group][index]
  end
end

mtFillTextures.getSwirlSize = function(index, targetSize)
  if (index == "bubbles") or (index == "iris") then
    return (targetSize * 1.1)
  else
    return targetSize
  end
end

mtFillTextures.list = function(group)
  return mtFillTextures.textures[group]
end

ss["FillTextures"] = setmetatable({}, { __index = mtFillTextures });
