local _, core = ...; -- Namespace

local AceGUI = LibStub("AceGUI-3.0")


function core.FarmedMounts(container)



-- Shadowlands Tab
local function DrawGroup1(container)
 
core.DungeonsGuide(container)




end

local function DrawGroup2(container)
 


core.DungeonsGuide2(container)



end

-- BFA Tab
local function DrawGroup3(container)

core.RaidsGuide(container)

end

local function DrawGroup4(container)

core.RaidsGuide2(container)

end


local function DrawGroup5(container)

core.RaidsGuide3(container)

end

-- Legion Tab
local function DrawGroup6(container)

core.WorldDropsGuide(container)

end






local function SelectGroup(container, event, group)
   container:ReleaseChildren()
   if group == "tab1" then
      DrawGroup1(container)
   elseif group == "tab2" then
      DrawGroup2(container)
   
      elseif group == "tab3" then
      DrawGroup3(container)
      elseif group == "tab4" then
      DrawGroup4(container)   
      elseif group == "tab5" then
      DrawGroup5(container)   
      elseif group == "tab6" then
      DrawGroup6(container) 
 
   end
end


local frame = AceGUI:Create("Frame")
frame:SetTitle("Dungeon, Raid, Open World Mount Guides")
frame:SetStatusText("|cff00C78CWorthIt-Guides")
frame:SetWidth(420)
frame:SetHeight(500)
frame:SetCallback("OnClose", function(widget) AceGUI:Release(widget) end)


frame:SetLayout("Fill")




local tab =  AceGUI:Create("TabGroup")
tab:SetLayout("Flow")
tab:SetTabs({{text="Dungeons", value="tab1"}, {text="Dungeons 2", value="tab2"}, {text="Raids", value="tab3"}, {text="Raids 2", value="tab4"}, {text="Raids 3", value="tab5"}, {text="World Drops", value="tab6"}})
tab:SetCallback("OnGroupSelected", SelectGroup)
tab:SelectTab("tab1")

frame:AddChild(tab)











end