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

local AceGUI = LibStub("AceGUI-3.0")


function core.CookingLevellingWod(container)



--[[
local CrescentSaberfishFlesh = TSM_API.GetCustomPriceValue("dbmarket","i:109137")*150
local RawElekkMeat = TSM_API.GetCustomPriceValue("dbmarket","i:109134")*500
local SteamedScorpion = TSM_API.GetCustomPriceValue("dbmarket","i:109142")*100
local TaladorOrchid = TSM_API.GetCustomPriceValue("dbmarket","i:109129")*20


Add1 = CrescentSaberfishFlesh + RawElekkMeat
Add2 = Add1 + SteamedScorpion
Add3 = Add2 + TaladorOrchid




local Item = TSM_API.FormatMoneyString(Add3)

--]]


--[[ Scroll Frame ]]--
local scrollcontainer = AceGUI:Create("SimpleGroup") 
scrollcontainer:SetFullWidth(true)
scrollcontainer:SetFullHeight(true) 
scrollcontainer:SetLayout("Fill") 

container:AddChild(scrollcontainer)

local scroll = AceGUI:Create("ScrollFrame")
scroll:SetLayout("Flow") 
scrollcontainer:AddChild(scroll)
  
  local Space = AceGUI:Create("Label")
  Space:SetText("  ")
  Space:SetFullWidth(true)
  scroll:AddChild(Space)  
  
  --[[ Material List ]]--
  local desc = AceGUI:Create("Label")  
  desc:SetText("|cff00C78CMaterial List:")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
  local Space = AceGUI:Create("Label")
  Space:SetText("  ")
  Space:SetFullWidth(true)
  scroll:AddChild(Space)
  
  
  

  local desc = AceGUI:Create("Label")
  desc:SetText("1. Crescent Saberfish Flesh".." - ".."150")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
    local desc = AceGUI:Create("Label")
  desc:SetText("2. Raw Elekk Meat".." - ".."500")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
    local desc = AceGUI:Create("Label")
  desc:SetText("3. Steamed Scorpion".." - ".."100")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
    local desc = AceGUI:Create("Label")
  desc:SetText("4. Talador Orchid".." - ".."20")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  

--[[ Estimated Cost ]]--  

  local Space = AceGUI:Create("Label")
  Space:SetText("  ")
  Space:SetFullWidth(true)
  scroll:AddChild(Space) 

if (IsAddOnLoaded("TradeSkillMaster")) then
local CrescentSaberfishFlesh = TSM_API.GetCustomPriceValue("dbmarket","i:109137")*150
local RawElekkMeat = TSM_API.GetCustomPriceValue("dbmarket","i:109134")*500
local SteamedScorpion = TSM_API.GetCustomPriceValue("dbmarket","i:109142")*100
local TaladorOrchid = TSM_API.GetCustomPriceValue("dbmarket","i:109129")*20


Add1 = CrescentSaberfishFlesh + RawElekkMeat
Add2 = Add1 + SteamedScorpion
Add3 = Add2 + TaladorOrchid




local Item = TSM_API.FormatMoneyString(Add3)


  local desc = AceGUI:Create("Label")  
  desc:SetText("|cff00C78CEstimated Cost: ".."|cffffffff"..Item)
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)

  else
  
  		  local desc = AceGUI:Create("Label")
		  desc:SetText("|cffff6060Estimated Cost:".."|cffffffff TradeSkillMaster Not Installed For Estimated Cost")
		  desc:SetFullWidth(true)
		  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
		  scroll:AddChild(desc)
  
  
  
  
end   
  
  local Space = AceGUI:Create("Label")
  Space:SetText("  ")
  Space:SetFullWidth(true)
  scroll:AddChild(Space)


--[[ Trainer ]]-- 


if (IsAddOnLoaded("TomTom")) then 
  local ShadowlandsWaypoint = AceGUI:Create("Button")
  ShadowlandsWaypoint:SetText("Trainer Waypoint: Alliance")
  ShadowlandsWaypoint:SetWidth(350)
  scroll:AddChild(ShadowlandsWaypoint)
  ShadowlandsWaypoint:SetCallback("OnClick", function() 

DEFAULT_CHAT_FRAME.editBox:SetText("/way Stormshield 35.2 76.4") ChatEdit_SendText(DEFAULT_CHAT_FRAME.editBox, 0)
  
  end)
  
  local ShadowlandsWaypoint2 = AceGUI:Create("Button")
  ShadowlandsWaypoint2:SetText("Trainer Waypoint: Horde")
  ShadowlandsWaypoint2:SetWidth(350)
  scroll:AddChild(ShadowlandsWaypoint2)
  ShadowlandsWaypoint2:SetCallback("OnClick", function() 

DEFAULT_CHAT_FRAME.editBox:SetText("/way Warspear 45.6 44.2") ChatEdit_SendText(DEFAULT_CHAT_FRAME.editBox, 0)
  
  end)


		else
		
		  local desc = AceGUI:Create("Label")
		  desc:SetText("|cffff6060Waypoint:".."|cffffffff TomTom Not Installed For Waypoint")
		  desc:SetFullWidth(true)
		  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
		  scroll:AddChild(desc)
  
  
  
end


--[[ Levelling ]]--
  local Space = AceGUI:Create("Label")
  Space:SetText("  ")
  Space:SetFullWidth(true)
  scroll:AddChild(Space)

  local desc = AceGUI:Create("Label")
  desc:SetText("|cff00C78CStep 1:".."|cffffffff 1 - 20")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
  local Space = AceGUI:Create("Label")
  Space:SetText("  ")
  Space:SetFullWidth(true)
  scroll:AddChild(Space)

  local desc = AceGUI:Create("Label")
  desc:SetText("30x Grilled Saberfish")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
  local Space = AceGUI:Create("Label")
  Space:SetText("  ")
  Space:SetFullWidth(true)
  scroll:AddChild(Space)

  local desc = AceGUI:Create("Label")
  desc:SetText("|cff00C78CStep 2:".."|cffffffff 20 – 75")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
  local Space = AceGUI:Create("Label")
  Space:SetText("  ")
  Space:SetFullWidth(true)
  scroll:AddChild(Space)

  local desc = AceGUI:Create("Label")
  desc:SetText("100x Hearty Elekk Steak")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
    local Space = AceGUI:Create("Label")
  Space:SetText("  ")
  Space:SetFullWidth(true)
  scroll:AddChild(Space)

  local desc = AceGUI:Create("Label")
  desc:SetText("|cff00C78CStep 3:".."|cffffffff 75 - 95")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
  local Space = AceGUI:Create("Label")
  Space:SetText("  ")
  Space:SetFullWidth(true)
  scroll:AddChild(Space)

  local desc = AceGUI:Create("Label")
  desc:SetText("20x Talador Surf and Turf")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
    local Space = AceGUI:Create("Label")
  Space:SetText("  ")
  Space:SetFullWidth(true)
  scroll:AddChild(Space)

  local desc = AceGUI:Create("Label")
  desc:SetText("|cff00C78CStep 4:".."|cffffffff 95 - 100")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
  local Space = AceGUI:Create("Label")
  Space:SetText("  ")
  Space:SetFullWidth(true)
  scroll:AddChild(Space)

  local desc = AceGUI:Create("Label")
  desc:SetText("5x Feast of Blood")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
  
  
  
  
  
  
  
  
end