----------------------------
-- Sphere Tooltip Creator --
----------------------------
local addon, ns = ...
local ss = ns.SS

local setmetatable = setmetatable
local CreateFrame, ToggleDropDownMenu = CreateFrame, ToggleDropDownMenu
local PetFrameDropDown, TargetFrameDropDown, PlayerFrameDropDown = PetFrameDropDown, TargetFrameDropDown, PlayerFrameDropDown

local mtTooltipInfo = {};

function mtTooltipInfo:New(unit)
  if unit and unit == "pet" then
    return CreateFrame("GameTooltip", ss._f.."PetToolTip", nil, "GameToolTipTemplate")
  elseif unit and unit == "target" then
    return CreateFrame("GameTooltip", ss._f.."TargetToolTip", nil, "GameToolTipTemplate")
  else
    return CreateFrame("GameTooltip", ss._f.."PlayerToolTip", nil, "GameToolTipTemplate")
  end
end

ss["TooltipInfo"] = setmetatable({}, { __index = mtTooltipInfo });

local mtGeneralTooltip = {};

function mtGeneralTooltip:New(index, region)
  region = region or ""

  local tooltip = CreateFrame("GameTooltip", ss._f..region.."MicroSphereTooltip"..index, nil, "GameToolTipTemplate")
  tooltip.FontString1 = tooltip:CreateFontString("FontString1")
  tooltip.FontString1:SetFont(ss.private.font.general, 16)

  return tooltip
end

ss["GeneralTooltip"] = setmetatable({}, { __index = mtGeneralTooltip });
