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

local AceGUI = LibStub("AceGUI-3.0")


function core.CookingLevellingBFA(container)


--[[
local AromaticFishOil = TSM_API.GetCustomPriceValue("dbmarket","i:160711")*150
local BrinyFlesh = TSM_API.GetCustomPriceValue("dbmarket","i:152631")*800
local MeatyHaunch = TSM_API.GetCustomPriceValue("dbmarket","i:154898")*250
local MoistFillet = TSM_API.GetCustomPriceValue("dbmarket","i:168645")*320


Add1 = AromaticFishOil + BrinyFlesh
Add2 = Add1 + MeatyHaunch
Add3 = Add2 + MoistFillet



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. Aromatic Fish Oil".." - ".."150")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)

  local desc = AceGUI:Create("Label")
  desc:SetText("2. Briny Flesh".." - ".."800")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
    local desc = AceGUI:Create("Label")
  desc:SetText("3. Meaty Haunch".." - ".."250")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
    local desc = AceGUI:Create("Label")
  desc:SetText("4. Moist Fillet".." - ".."320")
  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 AromaticFishOil = TSM_API.GetCustomPriceValue("dbmarket","i:160711")*150
local BrinyFlesh = TSM_API.GetCustomPriceValue("dbmarket","i:152631")*800
local MeatyHaunch = TSM_API.GetCustomPriceValue("dbmarket","i:154898")*250
local MoistFillet = TSM_API.GetCustomPriceValue("dbmarket","i:168645")*320


Add1 = AromaticFishOil + BrinyFlesh
Add2 = Add1 + MeatyHaunch
Add3 = Add2 + MoistFillet



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 Boralus 71.2 10.8") 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 Zuldazar 38.0 14.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 - 35")
  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("35x Rank 1 - Kul Tiramisu")
  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 35 - 50")
  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("15 x Rank 2 - Kul Tiramisu")
  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 50 - 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("25x Honey-Glazed Haunches")
  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 75 - 140")
  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("80x Rank 2 - Sailor's Pie")
  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 140 - 155")
  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("15x Rank 1 - Abyssal-Fried Rissole")
  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 155 - 175")
  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("25x Rank 2 - Abyssal-Fried Rissole")
  desc:SetFullWidth(true)
  desc:SetFont("Fonts\\FRIZQT__.TTF", 13, '')
  scroll:AddChild(desc)
  
  
  
  
  
  
  
  
  
end