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

local AceGUI = LibStub("AceGUI-3.0")


function core.EasternKingdomsSecretsUI(container)



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

end

-- BFA Tab
local function DrawGroup2(container)

core.FairyRingSecret(container)

end

-- Legion Tab
local function DrawGroup3(container)

core.NessySecret(container)

end

-- Wod Tab
local function DrawGroup4(container)

core.OldIronforgeSecret(container)

end

-- Mop Tab
local function DrawGroup5(container)

core.ThePeakSecret(container)

end


-- Cata Tab
local function DrawGroup6(container)

core.DwarfsVsBearsSecret(container)

end

-- Wotlk Tab
local function DrawGroup7(container)

core.AbandonedHomesSecret(container)

end


-- Wotlk Tab
local function DrawGroup8(container)

core.HiddenFarmSecret(container)

end


-- Wotlk Tab
local function DrawGroup9(container)

core.CaveandCampSecret(container)

end


-- Wotlk Tab
local function DrawGroup10(container)

core.AmaniRuinsMtsSecret(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)
      elseif group == "tab7" then
      DrawGroup7(container)
      elseif group == "tab8" then
      DrawGroup8(container)
      elseif group == "tab9" then
      DrawGroup9(container)
      elseif group == "tab10" then
      DrawGroup10(container)

   
   end
end


local frame = AceGUI:Create("Frame")
frame:SetTitle("Eastern Kingdoms - Secrets")
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="Demon Children", value="tab1"}, {text="Fairy Ring", value="tab2"}, {text="Nessy", value="tab3"}, {text="Old Ironforge", value="tab4"}, {text="The Peak", value="tab5"}, {text="Dwarfs Vs Bears", value="tab6"}, {text="Abandoned Homes", value="tab7"}, {text="Hidden Farm", value="tab8"}, {text="Cave and Camp", value="tab9"}, {text="Amani Ruins Mts", value="tab10"}})
tab:SetCallback("OnGroupSelected", SelectGroup)
tab:SelectTab("tab1")

frame:AddChild(tab)











end