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

local AceGUI = LibStub("AceGUI-3.0")


function core.KalimdorEasterEggsUI(container)



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

end

-- BFA Tab
local function DrawGroup2(container)

core.GoblinBeachResortEasterEgg(container)

end

-- Legion Tab
local function DrawGroup3(container)

core.ShrineoftheFallenWarriorEasterEgg(container)

end

-- Wod Tab
local function DrawGroup4(container)

core.WKMRoomEasterEgg(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)
   

   
   end
end


local frame = AceGUI:Create("Frame")
frame:SetTitle("Kalimdor - Easter Eggs")
frame:SetStatusText("|cff00C78CWorthIt-Guides")
frame:SetWidth(400)
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="Armed Critters", value="tab1"}, {text="Goblin Beach Resort", value="tab2"}, {text="Shrine of the Fallen Warrior", value="tab3"}, {text="WKM Room", value="tab4"}})
tab:SetCallback("OnGroupSelected", SelectGroup)
tab:SelectTab("tab1")

frame:AddChild(tab)











end