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

local AceGUI = LibStub("AceGUI-3.0")


function core.EngineeringLevellingShadowlands(container)


--[[
local LaestriteOre = TSM_API.GetCustomPriceValue("dbmarket","i:171828")*440
local Angerseye = TSM_API.GetCustomPriceValue("dbmarket","i:173109")*23
local Oriblase = TSM_API.GetCustomPriceValue("dbmarket","i:173108")*20
local Umbryl = TSM_API.GetCustomPriceValue("dbmarket","i:173110")*3
local DesolateLeather = TSM_API.GetCustomPriceValue("dbmarket","i:172089")*15
local PallidBone = TSM_API.GetCustomPriceValue("dbmarket","i:172092")*15


Add1 = LaestriteOre + Angerseye
Add2 = Add1 + Oriblase
Add3 = Add2 + Umbryl
Add4 = Add3 + DesolateLeather
Add5 = Add4 + PallidBone


local Item = TSM_API.FormatMoneyString(Add5)

--]]


--[[ 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. Latestrite Ore".." - ".."525")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
    local desc = AceGUI:Create("Label")
  desc:SetText("2. Oriblase".." - ".."33")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
  local desc = AceGUI:Create("Label")
  desc:SetText("3. Umbryl".." - ".."13")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
    local desc = AceGUI:Create("Label")
  desc:SetText("4. Desolate Leather".." - ".."130")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
  local desc = AceGUI:Create("Label")
  desc:SetText("5. Machinist Oil".." - ".."101")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
    local desc = AceGUI:Create("Label")
  desc:SetText("6. Porous Polishing Abrasive".." - ".."313")
  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 LaestriteOre = TSM_API.GetCustomPriceValue("dbmarket","i:171828")*440
	local Angerseye = TSM_API.GetCustomPriceValue("dbmarket","i:173109")*23
	local Oriblase = TSM_API.GetCustomPriceValue("dbmarket","i:173108")*20
	local Umbryl = TSM_API.GetCustomPriceValue("dbmarket","i:173110")*3
	local DesolateLeather = TSM_API.GetCustomPriceValue("dbmarket","i:172089")*15
	local PallidBone = TSM_API.GetCustomPriceValue("dbmarket","i:172092")*15


	Add1 = LaestriteOre + Angerseye
	Add2 = Add1 + Oriblase
	Add3 = Add2 + Umbryl
	Add4 = Add3 + DesolateLeather
	Add5 = Add4 + PallidBone


	local Item = TSM_API.FormatMoneyString(Add5)

  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")
  ShadowlandsWaypoint:SetWidth(350)
  scroll:AddChild(ShadowlandsWaypoint)
  ShadowlandsWaypoint:SetCallback("OnClick", function() 

DEFAULT_CHAT_FRAME.editBox:SetText("/way 38.1 44.7") 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 – 25:")
  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("Create 366x Handful of Laestrite Bolts")
  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 25 - 45:")
  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("Create 20x Wormfed Gear Assembly")
  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 45 - 60:")
  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("Create 16x Crafter's Mark")
  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 60 - 80:")
  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("Create 33x Wormfed Gear Assembly")
  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 5:".."|cffffffff 80 - 90:")
  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("Create 10x Infra-Green Reflex Sight")
  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 6:".."|cffffffff 90 - 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("Create 13x Grounded Ectoplasmic Pecs")
  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)














end